Skip to content

Instantly share code, notes, and snippets.

@dannguyen
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save dannguyen/0d19d59d6e80cd069c5e to your computer and use it in GitHub Desktop.

Select an option

Save dannguyen/0d19d59d6e80cd069c5e to your computer and use it in GitHub Desktop.
NYPD Stop and Frisk 2014 update: Now there's official CSVs!

Gettin the data

Using bash:

Download the files

baseurl="http://www.nyc.gov/html/nypd/downloads/zip/analysis_and_planning/YYYY_sqf_csv.zip"
for year in $(seq 2003 2014); do
  url=$(echo $baseurl | sed "s/YYYY/$year/")
  echo $url
  curl -sO $url
done

Unzip the files

unzip -o "*.zip"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment