Raquel Alegre
Research Software Development Group
University College London
UCL, 14th March 2016
20% data points in CartoDB
400K points: ~3% of the data points in CartoDB
Demo!
Were Emission Control Areas effective?
Future of ShipViz
CartoDB and Python
pip install cartodb
from cartodb import CartoDBAPIKey
API_KEY ='YOUR_CARTODB_API_KEY'
cartodb_domain = 'YOUR_CARTODB_DOMAIN'
cl = CartoDBAPIKey(API_KEY, cartodb_domain)
CartoDB-Python
from cartodb import FileImport
fi = FileImport("test.csv", cl)
fi.run()
from cartodb import URLImport
fi = URLImport("http://acdmy.org/d/counties.zip", cl)
fi.run()
CartoDB-Python
from cartodb import CartoDBAPIKey, CartoDBException
API_KEY ='YOUR_CARTODB_API_KEY'
cartodb_domain = 'YOUR_CARTODB_DOMAIN'
cl = CartoDBAPIKey(API_KEY, cartodb_domain)
try:
print(cl.sql('select * from mytable'))
except CartoDBException as e:
print("some error ocurred", e)
CartoDB and Javascript