Skip to main content

Get data from the crime map

Project description

Get data from the NYC Crime Map, and save them as geojson and CSV files.

Getting data I have already saved

If you just want to get the data in geojson or CSV format, go to

Running the program

If you want to run the program, perhaps to get the most recent data, you can run the program. I present a couple ways of doing this.

Installing from PyPI

You can install the package like so

sudo pip install nyc-crime-map

and then run it like so.


A data directory will be created inside your working directory, and you’ll find the results here.

cat nyc-crime-map/data/02378420399528461352-17772055697785505571.geojson
cat nyc-crime-map/data/02378420399528461352-17772055697785505571.csv

Running from the checked-out repository

Perhaps you don’t have pip installed; in that case, you can do this.

git clone git:// --recursive

# Delete the cached data.
rm nyc-crime-map/data/all_results/*

# Run the program.
cd nyc-crime-map

# View the results.
cat nyc-crime-map/data/02378420399528461352-17772055697785505571.geojson
cat nyc-crime-map/data/02378420399528461352-17772055697785505571.csv

More about the data

The data are stored in two tables.

  • 02378420399528461352-11853667273131550346
  • 02378420399528461352-17772055697785505571

The latter of these tables contains a “CR” field for the crime type; the former does not.

Read at!/nyc-crime-map/.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nyc-crime-map, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size nyc-crime-map-0.3.2.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page