Use package data or the {tigris} package to get Maryland data from the U.S. Census Bureau
Source:R/get_md_tigris.R
get_md_tigris.Rd
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 withset_mapmaryland_options()
.- erase_water
If
TRUE
, erase any geometry intersecting with md_water; Default:FALSE
. IfTRUE
, and erase_data is notNULL
, 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.