Get current boundaries for administrative boundaries in New York City in the simple features sf format. Available boundaries are boroughs, public use microdata areas (PUMAs), community districts (CDs), neighborhood tabulation areas (NTAs), census tracts, and census blocks. Either get all boundaries of a selected geography or a filtered subset.

nyc_boundaries(geography = c("borough", "puma", "nta", "cd", "tract",
  "block", "school", "police", "council", "cong"), filter_by = NULL,
  region = NULL, add_acs_data = FALSE, resolution = c("low", "high"))



The requested administrative boundaries. Possible values are "borough", "puma", "cd", "nta", "tract", or "block".


The geography to filter by. If NULL, all boundaries of selected geography are returned.


A character vector of regions to filter by. Selected regions much match the geography indicated by filter_by argument.


If TRUE, selected demographic, social, and economic data from the U.S. Census Bureau American Community Survey is appended to boundaries.


The resolution of the map. Defaults to lower resolution.


An sf object of administrative boundaries


For more information about the metadata included with boundaries, see borough_sf, puma_sf, cd_sf, nta_sf, tract_sf, or block_sf. For information about the census estimates returned, see borough_acs_data, puma_acs_data, nta_acs_data, tract_acs_data, or block_census_data.


if (require(sf)) { # get sf boundaires all_nyc_boroughs <- nyc_boundaries(geography = "borough") greenpoint_williamsburg_ntas <- nyc_boundaries( geography = "nta", filter_by = "puma", region = "4001", resolution = "high" ) queens_brooklyn_tracts <- nyc_boundaries( geography = "tract", filter_by = "borough", region = c("queens", "brooklyn"), add_acs_data = TRUE ) # plot boundaries plot(st_geometry(all_nyc_boroughs)) plot(st_geometry(greenpoint_williamsburg_ntas)) plot(queens_brooklyn_tracts["pop_white_pct_est"]) }
#> Loading required package: sf
#> Linking to GEOS 3.5.0, GDAL 2.1.0, PROJ 4.8.0