The NYC Boundaries Map is a tool for viewing and querying overlapping administrative boundaries in NYC.
Various governmental bodies at the city, state, and federal level divide NYC's geography into a series of districts. Sometimes these districts are drawn to outline communities that will share common representation (e.g. by a community board, a council member, or a congressional member). Other times these districts are drawn to divide the work of a city agency (e.g. police precincts, fire battilions, and sanitation districts). For the most part, every governmental body divides the city in a different way, and in order to know who to collaborate with around issues in their district, those representing the districts within this governmental body need to know which districts of other governmental boundaries orverlap with their own district. For instance, community boards may want to know which council members to call when a pressing issue faces their district so need to know which council districts overlap with their community district. A council member running on a platform of school reform will need to know which school districts overlap with their council district.
Understanding how administrative boundaries overlap is also important for interpreting city datasets and summarizing information across multiple geographies. Sometimes, within city datasets, values are reported at a district level. For instance, DSNY reports the monthly tonnage of waste collected for each sanitation district in NYC. In order to get a sense of how much waste is collected within a community district, an analyst would need to better understand how community districts overlap with sanitation districts. In this particular example, community districts share the same boundaries as sanitation districts, so it is possible to know how much waste is collected per community district. However, when districts do not share the same boundaries, it becomes much more difficult to know how much of the value to allocate to each overlapping boundary. Boundaries Map helps visualize this issue.
- File an issue via this repo's issue cue
- Request a feature via this repo's issue cue
- Run
npm install
- Create an .env file with your Carto API key with access to select and query from your layers. See .example.env for an example file.
- Run
npm run dev
and visitlocalhost:3000
- Push the changes from the local side
- Add this code: git subtree push --prefix public/ origin gh-pages
- GitHub Action will automatically run the deployment
In the following section, we define the terms that will be used throughout this document.
Administrative Boundary: a geospatial representation of NYC divided into a series of districts in order to organize administrative work at the City, State, or Federal level District: one division of an administrative boundary District Unique Identifier: a number or name to uniquely identify a district
Most of the data for Boundaries Map is stored in BetaNYC's Carto account.
cd
- Shapefile of community districts
- Published on the NYC Open Data Portal
pp
- Shapefile of police precincts
- Published on the NYC Open Data Portal
dsny
- Shapefile of sanitation districts
- Published on the NYC Open Data Portal
fb
- Shapefile of fire battilions
- Published on the NYC Open Data Portal
sd
- Shapefile of school districts
- Published on the NYC Open Data Portal
hc
- Shapefile of health center districts
- Published on the NYC Open Data Portal
cc
- Shapefile of city council districts
- Published on the NYC Open Data Portal
nycongress
- Shapefile of Congressional Districts
- Published on the NYC Open Data Portal
sa
- Shapefile of State Assembly Districts
- Published on the NYC Open Data Portal
ss
- Shapefile of State Senate Districts
- Published on the NYC Open Data Portal
nta
- Shapefile of Neighborhood Tabulation Areas
- Published on the NYC Open Data Portal
hd
- Shapefile of Historic Districts
- Published on the NYC Open Data Portal
bid
- Shapefile of Business Improvement Districts
- Published on the NYC Open Data Portal
ibz
- Shapefile of Industrial Business Zones
- Published on EDC's website
We use Carto.js to create and style map layers from data stored in the BetaNYC Carto account.
When users enter a text address into the location search field, the system queries GeoSearch for the lat/lon of that location. The map re-centers to this lat/lon.
We use the Fetch API for browser-based Web requests to the Carto SQL API and the GeoSearch API.
- Add historic districts
- Application completely rewritten to use Svelte, TypeScript and Mapbox
- Application redesigned using Tailwind
- Map now supports zooming with hotkeys
- Map can now be interacted with directly by clicking a district
- Map now automatically zooms to fit a selected district, address, or coordinate
- Districts for each boundary may now be filtered and selected directly from the sidebar
- URLs can now link directly to a specific district on the map (e.g. https://boundaries.beta.nyc/?map=cd&dist=101), or a specific coordinate (e.g. https://boundaries.beta.nyc/?lng=-73.972178431416&lat=40.773847961804876)
- All shapefiles updated to include 2022 redistricting
- [75] Update fonts to improve accessibility and performance
-
[22] A script to download and aggregate all boundaries to 'all_bounds.geojson'
-
[30] Reverted back to scroll wheel for zooming
-
[26] Switched GeoClient API to Planning Lab's GeoSearch for address autocomplete
-
[29] Added ZipCodes layer and Refactored Code to use a single Carto dataset
- [15] A point is now plotted when searching for a specific address.
- [13] The BIDs shapefile was added to Boundaries Map, along with the ability to query districts that overlap with BIDs.
- [8] Parks were displaying on the map as community districts. These were removed by updating the Carto SQL source code to exclude all community districts with a unique identifier greater than the number of community districts in each borough.
- [9] Users can query how any administrative boundary district overlaps overlaps with all other administrative boundary districts
- [10] A reset map link was added beneath the location search bar so that users can set the map back to its initial zoom level after running a location search.
- [2] On community board select, the map returns all overlapping districts in that community board.
- [1] On location search, the map returns list of districts at that location.
- [3] Description and Instructions were added.
Please see license file for details.
- Non-code, Creative Commons Attribution 4.0
- Code, GNU General Public License
Contact Zhi Keng He or Noel Hidalgo.