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

Powering geospatial on the web with CartoDB

Andrew W Hill
September 13, 2012

Powering geospatial on the web with CartoDB

A presentation given to CIESEN in September 2012

Andrew W Hill

September 13, 2012
Tweet

More Decks by Andrew W Hill

Other Decks in Science

Transcript

  1. @andrewxhill
    Powering geospatial data
    on the web with CartoDB
    Wednesday, October 17, 12

    View Slide

  2. Wednesday, October 17, 12

    View Slide

  3. Guralnick et al., 2007
    Wednesday, October 17, 12

    View Slide

  4. Automated analysis
    Guralnick et al., 2007
    Wednesday, October 17, 12

    View Slide

  5. Data visualization
    Wednesday, October 17, 12

    View Slide

  6. Wednesday, October 17, 12

    View Slide

  7. Wednesday, October 17, 12

    View Slide

  8. Wednesday, October 17, 12

    View Slide

  9. http://
    protectedplanet.net/
    http://protectedplanet.net/
    Wednesday, October 17, 12

    View Slide

  10. Wednesday, October 17, 12

    View Slide

  11. Wednesday, October 17, 12

    View Slide

  12. Wednesday, October 17, 12

    View Slide

  13. http://rlat.kew.org/
    Wednesday, October 17, 12

    View Slide

  14. Wednesday, October 17, 12

    View Slide

  15. http://vizzuality.com/projects/imazon
    Wednesday, October 17, 12

    View Slide

  16. Wednesday, October 17, 12

    View Slide

  17. Wednesday, October 17, 12

    View Slide

  18. Wednesday, October 17, 12

    View Slide

  19. Wednesday, October 17, 12

    View Slide

  20. Wednesday, October 17, 12

    View Slide

  21. Wednesday, October 17, 12

    View Slide

  22. Wednesday, October 17, 12

    View Slide

  23. Wednesday, October 17, 12

    View Slide

  24. CartoDB Dashboard
    Wednesday, October 17, 12

    View Slide

  25. CartoDB Dashboard
    Wednesday, October 17, 12

    View Slide

  26. http://developers.cartodb.com/gallery/maps/
    johnsnow.html data - http://goo.gl/
    2q1Nq
    Data visualization/Data publication
    Wednesday, October 17, 12

    View Slide

  27. OpenStreetMap roads in London
    Wednesday, October 17, 12

    View Slide

  28. All street trees in San Franscisco
    Wednesday, October 17, 12

    View Slide

  29. http://developers.cartodb.com/gallery/maps/
    johnsnow.html data - http://goo.gl/
    2q1Nq
    Population density
    Wednesday, October 17, 12

    View Slide

  30. UNEP-WCMC/CBD Carbon Calculator for Protected Areas
    Wednesday, October 17, 12

    View Slide

  31. Election results in Spain visualization
    Wednesday, October 17, 12

    View Slide

  32. ProtectedPlanet - World Database on Protected Areas
    Wednesday, October 17, 12

    View Slide

  33. NGOAIDMAP - Mapping NGO projects in Haiti
    Wednesday, October 17, 12

    View Slide

  34. Temporal mapping http://goo.gl/KXIF1
    Wednesday, October 17, 12

    View Slide

  35. Wednesday, October 17, 12

    View Slide

  36. FILE EXT.
    SHP
    CSV
    KML
    XLS
    OSM
    TIFF
    GEO. TYPES
    ESRI
    JSON
    WKT
    KML
    RAST.
    GPS
    Wednesday, October 17, 12

    View Slide

  37. Wednesday, October 17, 12

    View Slide

  38. Wednesday, October 17, 12

    View Slide

  39. Wednesday, October 17, 12

    View Slide

  40. Wednesday, October 17, 12

    View Slide

  41. SQL API
    Wednesday, October 17, 12

    View Slide

  42. Maps API
    Wednesday, October 17, 12

    View Slide

  43. Wednesday, October 17, 12

    View Slide

  44. Wednesday, October 17, 12

    View Slide

  45. The challenges Process and visualize millions or rows.
    Show changes in data over time.
    Visualize up to 5 layers of information.
    Wednesday, October 17, 12

    View Slide

  46. We host and process the data with CartoDB.
    We generate a JSON file per tile containing
    the deforestation data codified in cells (each
    cell has a value for each time period -
    15days).
    How we did it
    {
    time: 0.00576543211,
    rows: [
    {
    upper_left_x: 16742472,
    upper_left_y: -2589569,
    time_series: [
    0,
    8,
    8,
    8,
    8,
    12,
    12,
    12,
    16,
    ...
    Wednesday, October 17, 12

    View Slide

  47. {
    time: 0.00576543211,
    rows: [
    {
    upper_left_x: 16742472,
    upper_left_y: -2589569,
    time_series: [
    0,
    8,
    8,
    8,
    8,
    12,
    12,
    12,
    16,
    ...
    Load all the information of the JSON files in
    memory using TypedArrays.
    Render the tiles in the client using the
    codified information -now in memory-. Each
    time the user moves the timeline, the tiles are
    rendered again.
    How we did it
    Wednesday, October 17, 12

    View Slide

  48. {
    time: 0.00576543211,
    rows: [
    {
    upper_left_x: 16742472,
    upper_left_y: -2589569,
    time_series: [
    0,
    8,
    8,
    8,
    8,
    12,
    12,
    12,
    16,
    ...
    Load all the information of the JSON files in
    memory using TypedArrays for better
    performance.
    Render the tiles in the client using the
    codified information. Each time the timeline is
    moved, the tiles are rendered again.
    How we did it
    Wednesday, October 17, 12

    View Slide

  49. {
    time: 0.00576543211,
    rows: [
    {
    upper_left_x: 16742472,
    upper_left_y: -2589569,
    time_series: [
    0,
    8,
    8,
    8,
    8,
    12,
    12,
    12,
    16,
    ...
    Load all the information of the JSON files in
    memory using TypedArrays for better
    performance.
    Render the tiles in the client using the
    codified information. Each time the timeline is
    moved, the tiles are rendered again.
    How we did it
    Wednesday, October 17, 12

    View Slide

  50. Wednesday, October 17, 12

    View Slide

  51. Wednesday, October 17, 12

    View Slide

  52. Wednesday, October 17, 12

    View Slide

  53. Example from Dan Hammer
    CartoDB-R
    library(RCurl)
    library(RJSONIO)
    library(CartoDB)
    library(stats)
    library(cluster)
    account.name cartodb(account.name)
    cartodb.test()
    data columns=c("x", "y"))
    N subset.data as.numeric)
    cid method="single"), h=100)
    png("~/cluster.png")
    plot(subset.data[,2], -subset.data[,1], col=cid)
    dev.off()
    Wednesday, October 17, 12

    View Slide

  54. GMaps and Leaflet
    Wednesday, October 17, 12

    View Slide

  55. Wednesday, October 17, 12

    View Slide

  56. Wednesday, October 17, 12

    View Slide

  57. American Museum of Natural History
    http://www.ecohacknyc.org/
    November 9th
    Wednesday, October 17, 12

    View Slide

  58. THANK
    YOU
    @ANDREWXHILL
    Wednesday, October 17, 12

    View Slide