node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org ยป



A node.js module for working with NYC's BYTES of the BIG APPLE datasets.

nyc-bytes automatically downloads, extracts, and exposes a stream of objects from any of the supported datasets. Most datasets return object representations of the records. MapPluto returns GeoJSON Polygons converted from New York - Long Island State Plane Coordinate System (NAD83) to standard Latitude/Longitude (WGS84) for easy mapping use.

Currently Supported Datasets

  • MapPluto
  • NYC Zoning Tax Lot Database
  • PAD (Property Address Directory)


npm install nyc-bytes

Each dataset is exposed as a singleton object that must be initialized. This ensures that the underlying files are downloaded, extracted, and ready for use. Initializing the dataset returns a Promise that returns once the dataset has finished initializing.

const Bytes = require('nyc-bytes');

const dataset = Bytes.Pluto;
dataset.init().then(() => {
  console.log('Dataset ready.');
  const stream =;
  // do something with stream
}).catch((err) => {
  • Pluto - var dataset = Bytes.Pluto;
  • MapPluto - var dataset = Bytes.MapPluto; (requires ogr2ogr)
  • NYC Zoning Tax Lot Database - var dataset = Bytes.ZoningTaxLot;
  • PAD (Property Address Directory) - var dataset = Bytes.PAD;[options])

The dataset's underlying data is accessible like any other standard node stream.

const stream =;
stream.on('readable', () => {
  const record =;
  // do something with the record
stream.on('end', () => {

You can also use the stream in flowing mode by attaching a data event listener.

const stream =;
stream.on('data', (record) => {
  // do something with the record
stream.on('end', () => {

Lastly, you can also pipe the stream like you would any other readable stream.

const stream =;
const writableStream = somehowGetWritableStream();


  • boroughs - default: ['MN','BX','BK','QN','SI'] - Array of boroughs to return in the stream.
  • table - default: 'BOTH' - Which table ('BBL'|'ADR') to return (only applicable to PAD dataset)
  • sanitize - default: true - Removes extra whitespaces. (only applicable to PAD dataset) Ex.
"EAST   45 STREET               "




  • Add datasets - open an issue to suggest a dataset you'd like to see.