@MrEPhysics | [email protected]
- Find notes here: bit.ly/cdb-cornell-notes
- Gist stored here: bit.ly/cornell-hack-cdb
- Cloud-based spatial analytics platform. i.e., Data Visualizations + Maps
- Not just mapping platform -- flexible database (PostgreSQL) in the cloud
- CartoDB.js -- JavaScript API
- Torque.js -- Temporal mappping JS API
- SQL API -- Data API
- Maps API -- Public maps/private data, static maps (export as images), etc.
- Import API -- Push files to your account
Most major formats supported: CSV, GeoJSON, KML, etc.
- Drag and drop
- Chrome Extension (beta version): https://github.com/juanignaciosl/cartodb-chrome-extension
Run SQL http://docs.cartodb.com/cartodb-editor.html#custom-sql
http://docs.cartodb.com/cartodb-editor.html#cartocss
Mathematical/statistical operations in data tables: http://www.postgresql.org/docs/9.3/static/functions-aggregate.html
- Mean, median, mode, etc.
- Std dev, regression, covariance
String processing: http://www.postgresql.org/docs/9.3/static/functions-string.html
Pattern Matching/RegEx: http://www.postgresql.org/docs/9.3/static/functions-matching.html
Format juggling:
Tons more: http://www.postgresql.org/docs/9.3/static/functions.html
Format:
http://{account_name}.cartodb.com/api/v2/sql?q={custom_sql_query}&format={desired_format}&filename={output_file_name}
format: csv, geojson, shp, etc.
Can easily use with Python pandas (pd.read_csv) and R (read.csv). Check out demo on Plotly I made last week: https://plot.ly/ipython-notebooks/cartodb/
PostGIS -- the geospatial extension to PostgreSQL
SELECT superhero.name
FROM city, superhero
WHERE ST_Contains(city.the_geom, superhero.the_geom)
AND city.name = 'Gotham'
Resources:
- Workshop: http://cartodb.github.io/training/inter/harvard.html
- Map Academy: http://academy.cartodb.com/courses/04-sql-postgis.html
Torque (documentation)
Examples:
- Twitter analysis: http://cartodb.s3.amazonaws.com/static_vizz/sunrise.html
- Zoom-dependent binning of data: https://team.cartodb.com/u/eschbacher/viz/68d07502-bf9a-11e4-b867-0e853d047bba/embed_map
- Heat maps + SQL API: http://bl.ocks.org/pramsey/922f6170dec2a3cd5da6
Get (better) free accounts here: https://cartodb.com/signup?plan=academy
If you already have an account and want the student upgrade, email me ([email protected]) and I'll bump you up.
- Me: @MrEPhysics
- GIS StackExchange/cartodb
- Doucmentation: SQL API, CartoDB.js, Import API, Maps API
- Map Academy
- Tutorials, etc.
Need help?? Tweet at me @MrEPhysics