get_md_tigris: Use package data or the {tigris} package to get Maryland data...

View source: R/get_md_tigris.R

get_md_tigrisR Documentation

Use package data or the {tigris} package to get Maryland data from the U.S. Census Bureau

Description

Get package data with Maryland counties, U.S. Congressional District, or Census designated places by name or GeoID or use the tigris package to download state data.

Usage

get_md_tigris(
  name = NULL,
  type = "counties",
  crs = getOption("mapmaryland.crs", default = 3857),
  erase_water = FALSE,
  ...
)

Arguments

name

Name matching a value in the namelsad, namelsad, or geoid columns of md_counties, md_census_places, md_congressional_districts, or one of the data sets available for download with {tigris}; Default: NULL

type

Type of data to return, Default: "counties"; See details for supported options.

crs

coordinate reference system. Defaults to getOption("mapmaryland.crs", default = 3857). This option can be set with set_mapmaryland_options().

erase_water

If TRUE, erase any geometry intersecting with md_water; Default: FALSE. If TRUE, and erase_data is not NULL, md_water is combined and unioned with erase_data.

...

Additional parameters passed on to {tigris} functions.

Details

Use {mapmaryland} packaged data or use tigris U.S. Census Bureau API:

Supported options that access data included with the {mapmaryland} package include "counties", "census places", "congressional districts", "legislative districts", and "water".

Options that access data by calling one of several tigris functions for downloading data from the U.S. Census Bureau API include "senate district", "tracts", "block groups", "blocks", "pumas", "voting districts", "zctas", "roads", "primary secondary roads", "area water", "linear water", and "landmarks".

tigris functions that do not use a "state" parameter (e.g. tigris::coastline or tigris::rails) are not supported by this function.

Value

A simple feature object matching the type provided.


elipousson/mapmaryland documentation built on Nov. 3, 2024, 5:11 a.m.