Skip to content

The NYC Boundaries Map – is an open source tool for viewing and querying overlapping administrative boundaries in NYC.

License

Notifications You must be signed in to change notification settings

BetaNYC/nyc-boundaries

Repository files navigation

Boundaries-Map

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.

How to Contribute

How to build

  • 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 visit localhost:3000

How to do the deployment

  • 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

Key Terms

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

Backend Services

Carto

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

Carto.js v4

We use Carto.js to create and style map layers from data stored in the BetaNYC Carto account.

NYC Planning Lab's GeoSearch API

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.

Fetch API

We use the Fetch API for browser-based Web requests to the Carto SQL API and the GeoSearch API.

Change Log

v1.1

  • Add historic districts

v1.0

v0.9.1e

  • [75] Update fonts to improve accessibility and performance

v0.9e

  • [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

v0.8e

  • [15] A point is now plotted when searching for a specific address.

v0.7e

  • [13] The BIDs shapefile was added to Boundaries Map, along with the ability to query districts that overlap with BIDs.

v0.6e

  • [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.

v0.5e

  • [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.

Copyrights

Please see license file for details.

  • Non-code, Creative Commons Attribution 4.0
  • Code, GNU General Public License

Have Questions?

Contact Zhi Keng He or Noel Hidalgo.

About

The NYC Boundaries Map – is an open source tool for viewing and querying overlapping administrative boundaries in NYC.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published