Skip to content

Instantly share code, notes, and snippets.

@nygeog
Created April 21, 2017 17:06
Show Gist options
  • Save nygeog/723773ee611dca6ab1f85830a21f83f0 to your computer and use it in GitHub Desktop.
Save nygeog/723773ee611dca6ab1f85830a21f83f0 to your computer and use it in GitHub Desktop.
CartoDB Import API Example w/ Python
from cartodb import CartoDBAPIKey, CartoDBException, FileImport
from _secret_info import cartodb_domain, API_KEY
cl = CartoDBAPIKey(API_KEY, cartodb_domain)
fi = FileImport('nyctrees2015.csv', cl, create_vis='true', privacy='public') # Import csv file, set privacy as 'link' and create a default viz
fi.run() #https://github.com/CartoDB/cartodb-python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment