Skip to main content
100%

Downloads a double-zipped shapefile from NYC Socrata, separates it, and uploads to CartoDB

✓ Published0🌍 Public
Aandrewbt
Last edited Mar 3, 2016
Created on Mar 3, 2016

This shell script downloads a double-zipped shapefile of New York City building data from the Socrata open-data API, unpacks it, and uploads the two resulting shapefiles to CartoDB as separate map layers. It uses `curl` for all HTTP requests, `unzip` and `zip` for archive manipulation, and the CartoDB SQL and Import APIs to drop existing tables, submit each zipped shapefile, and poll job status until import completion. The script handles platform-specific `sed` syntax for Darwin and Linux.

AI-generated description

Similar vizzes