Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CartoDB 1.0: Dynamic map visualizations and ana...

jatorre
April 10, 2012

CartoDB 1.0: Dynamic map visualizations and analysis made easy

In this session we will showcase some of the fundamental use cases for CartoDB; showcasing the User Interface, the SQL API and the maps API. We will do so by providing a live demo.

We will start by showing how to import data, visualize the data on a map, customize the way it looks using Carto CSS-like language, filter it using PostGIS SQL and share it on the web.

CartoDB can be use to perfrom on-the-fly analysis. For example, finding the intersection between the official NY Police Department data and the data available on Stop Frisk and Ask. We will perform a live analysis, looking at where the most people are stopped by police in NYC. Next, the outputs of the analysis will be used to generate a choropleth map of New York.

In the last part we will show how to use the SQL API to build a mobile web application to find your closest New York City parks.

jatorre

April 10, 2012
Tweet

More Decks by jatorre

Other Decks in Technology

Transcript

  1. SELECT * FROM nyc_wifi WHERE ST_Intersects( the_geom, ST_Buffer( ST_SetSRID('POINT(-73.9967 40.7248)'::geometry

    , 4326), 0.001)) 5 http://examples.cartodb.com/tiles/ nyc_wifi/15/9648/12318.png?sql= SELECT * FROM nyc_wifi WHERE ST_Intersects( the_geom, ST_Buffer( ST_SetSRID('POINT(-73.9967 40.7248)'::geometry , 4326), 0.001)) http://examples.cartodb.com/api/v1/sql?q= SELECT * FROM nyc_wifi WHERE ST_Intersects( the_geom, ST_Buffer( ST_SetSRID('POINT(-73.9967 40.7248)'::geometry , 4326), 0.001))
  2. .BQT"1* https://viz2.cartodb.com/tiles/madrid_osm_point_copy/13/4011/3087.png?sql=WITH%20f50m_atm%20AS %20(SELECT%2050%20as%20distance,st_transform(ST_Union(st_buffer(ST_transform(the_geom,954009), 50)),3857)%20as%20the_geom_webmercator%20FROM%20madrid_osm_point_copy),f100m_atm%20as%20(SELECT %20100%20as%20distance,st_transform(ST_Union(st_buffer(ST_transform(the_geom,954009),100)), 3857)%20as%20the_geom_webmercator%20FROM%20madrid_osm_point_copy),f200m_atm%20as%20(SELECT %20200%20as%20distance,st_transform(ST_Union(st_buffer(ST_transform(the_geom,954009),200)), 3857)%20as%20the_geom_webmercator%20FROM%20madrid_osm_point_copy),f300m_atm%20as%20(SELECT %20300%20as%20distance,st_transform(ST_Union(st_buffer(ST_transform(the_geom,954009),300)), 3857)%20as%20the_geom_webmercator%20FROM%20madrid_osm_point_copy)%20select%20*%20from%20(SELECT

    %20*%20FROM%20f50m_atm%20UNION%20SELECT%20*%20FROM%20f100m_atm%20UNION%20SELECT%20*%20FROM %20f200m_atm%20UNION%20SELECT%20*%20FROM%20f300m_atm)%20as%20tmp%20ORDER%20BY%20distance %20DESC&style=%23madrid_osm_point_copy%7b%0d%0a+++%5bdistance %3d50%5d%7b%0d%0a+++polygon-fill%3a%2347AC00%7d%0d%0a%5bdistance %3d100%5d%7b%0d%0a+++polygon-fill%3a%23EFF000%7d%0d%0a%5bdistance %3d200%5d%7b%0d%0a+++polygon-fill%3a%23EB8900%7d%0d%0a%5bdistance %3d300%5d%7b%0d%0a+++polygon-fill%3a%23F00D00%7d%0d%0apolygon- opacity%3a1%3b%0d%0a+++line-opacity%3a1%3b%0d%0a+++line-color%3a %23FFFFFF%3b%0d%0a+++%7d
  3. level0 (full extent on 24x30 pixel) avg: 10070.ms <— SimpTP

    46390 v 8094/8094 g avg: 3190.5ms <— vanilla 4845240 v 8094/8094 g avg: 645.24ms <— Snap 4164 v 697/8094 g avg: 640.53ms <— Simp 27279 v 8094/8094 g level1 (full extent on 295x400 pixels) avg: 10185.ms <— SimpTP 47498 v 8094/8094 g avg: 3233.2ms <— vanilla 4845240 v 8094/8094 g avg: 741.77ms <— Snap 106232 v 7889/8094 g [crowded] avg: 707.78ms <— Simp 34438 v 8094/8094 g *** level2 (1/3 of extent on 600x400 pixels) avg: 3335.9ms <— SimpTP,Snap 14004 v 2183/2183 g avg: 945.04ms <— vanilla 1462892 v 2183/2183 g avg: 476.34ms <— Snap,SimpTP 18282 v 2179/2183 g *** avg: 230.86ms <— Snap 60761 v 2179/2183 g [crowded] avg: 216.49ms <— Simp 13299 v 2183/2183 g *** level4 (1/10 of extent on 600x400 pixels) avg: 853.96ms <— SimpTP 10476 v 547/547 g avg: 218.95ms <— vanilla 327660 v 547/547 g avg: 195.80ms <— Snap,SimpTP 14094 v 547/547 g avg: 74.150ms <— Simp 10287 v 547/547 g *** avg: 70.242ms <— Snap 67041 v 547/547 g [spiky] level4 (1/10 of extent on 600x400 pixels - PRESIMPLIFIED!) avg: 54.777ms <— Simp 13459 v 545/545 g avg: 53.419ms <— Snap 13459 v 545/545 g avg: 52.430ms <— vanilla 13459 v 545/545 g avg: 49.978ms <— SimpNCD 13459 v 545/545 g "MNPTUBTSFTPMVUJPOBSZBTUIF*QBE http://blog.cartodb.com/
  4. 'VTJPO5BCMFTMJNJUBUJPOT .#TJ[FMJNJU WFSUJDFTQFSUJMFMJNJU 0OMZUIFGJSTU,TIBQFTXJMMCFSFOEFSFE 0OMZUIFGJSTU SPXTPGEBUBJOBUBCMFBSFNBQQFEPSJODMVEFEJORVFSZSFTVMUT"GUFSUIFGJSTU, UIFTFSPXTBSF OPUEJTQMBZFE .BYOVNCFSPGWFSUJDFTTVQQPSUFEQFSUBCMFJTNJMMJPO "DFMMPGEBUBJO'VTJPO5BCMFTTVQQPSUTBNBYJNVNPGNJMMJPODIBSBDUFST

    8IFO[PPNFEGBSUIFSPVU UBCMFTXJUINPSFUIBOGFBUVSFTXJMMTIPXEPUT OPUMJOFTPSQPMZHPOT  42-BQJBMMPXTGPSSFRVFTUTTFDPOE VQUPGJWF'VTJPO5BCMFTMBZFSTUPBNBQ POFPGXIJDIDBOCFTUZMFEXJUIVQUPGJWFTUZMJOHSVMFT 4DBMF)PSJ[POUBMMZWT7FSUJDBMMZ