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

Big Data Week: Spatial Data, Visualization, and CartoDB

Big Data Week: Spatial Data, Visualization, and CartoDB

This talk expands upon my previous demo of spatial tools and visualization with CartoDB. Topics covered include design considerations, scientific visualization vs communication, relevance of big data, and a step-by-step walkthrough on basic map creation in CartoDB.

Presented during Big Data Week (http://bigdataweek.com/) at Penn State.

Joshua Stevens

April 24, 2013
Tweet

More Decks by Joshua Stevens

Other Decks in Science

Transcript

  1. Open Source Spatial
    Data Management:
    CartoDB

    View full-size slide

  2. Table of contents:
    1.............Considerations
    2.............Big Data
    3.............Art, Science, and The Scary
    Places in the Middle
    4.............Why CartoDB?
    5............Making a Map with
    CartoDB
    6............Q & A

    View full-size slide

  3. Spatial is special.
    “Everything is related to everything else,
    but near things are more related than
    distant things.”
    - Waldo Tobler (1970)
    Preface:

    View full-size slide

  4. Geographic visualization should be
    forward thinking.
    Step 1: Look ahead. What is your
    goal? How will you accomplish it?

    View full-size slide

  5. With CartoDB your map could be
    static...
    ...or animated.

    View full-size slide

  6. Your map could stand alone...
    ...or be part of a larger story.

    View full-size slide

  7. Big Data are
    more than
    just ‘big.’
    “Big data is more than simply a
    matter of size; it is an opportunity to
    find insights in new and emerging
    types of data and content...”
    - IBM
    Step 2: Consider your data.

    View full-size slide

  8. Volume Variety Velocity Vinculation
    of big data
    V’s
    The four

    View full-size slide

  9. Geographic data are frequently big (one or more V’s).

    View full-size slide

  10. Step 3: Decide if you’re looking for answers or communicating results.
    (or both)
    - Andy Woodruff, “Apart from being dead, Art and Science are strong in web
    cartography.”http://andywoodruff.com/blog/apart-from-being-dead-art-and-science-
    are-strong-in-web-cartography/
    “Web cartography is not about maps;
    it’s about hacks for moving data
    around.”
    Graphic from MacEachren, A.M. (1994) “Visualization in modern
    cartography: Setting the agenda.” Redrawn by Roth (2011).

    View full-size slide

  11. So how does this
    relate to
    CartoDB?
    To find out, let’s look at
    what other tools do.

    View full-size slide

  12. Some tools are great for
    analysis.

    View full-size slide

  13. http://at-cam.blogspot.com
    ArcGIS
    http://blog.ushahidi.com
    ✓ De facto standard GIS
    ✓ 10.1 on campus labs
    ✓ 1-year licenses for students
    ✓ Raster and vector analysis
    ✓ Hundreds of tools
    ✓ Model builder (see left)
    ✓ Python

    View full-size slide

  14. ArcGIS Online
    http://www.arcgis.com

    View full-size slide

  15. Quantum GIS
    (QGIS for short)
    ✓ Windows, OS X, Linux
    ✓ Open Source
    ✓ GDAL
    ✓ PostgreSQL/PostGIS, OSM
    ✓ Raster and vector analysis
    ✓ Hundreds of tools
    ✓ Python
    ✓ Increasingly mainstream

    View full-size slide

  16. PostGIS
    Spatially-enabled PostgreSQL
    ✓ Windows, OS X, Linux
    ✓ Open Source (GPL)
    ✓ Very powerful. Very fast.
    ✓ Often used in conjunction with
    other tools
    No direct GUI

    View full-size slide

  17. R
    With Spatial Packages
    ✓ A stats favorite
    ✓ Excels at point patterns, trends,
    and interpolation
    ✓ So-so visualization
    ✓ Recommend packages: ggplot2,
    maps, splancs, spatstat, mapproj
    R Studio w/ ggplot2 + maps
    http://www.statisfaction.wordpress.com

    View full-size slide

  18. Other tools are great for
    communication.

    View full-size slide

  19. TileMill
    ✓ A MapBox project
    ✓ CartoCSS for styling
    ✓ Smart selectors + compositing
    ✓ Shapefiles, PostGIS, SQLite,
    GeoJSON, CSV...
    ✓ Export to web, mobile, tiles, PDF,
    SVG, PNG...
    ✓ Publish to MapBox (free and $)
    ✓ Open Source

    View full-size slide

  20. MapBox
    ✓ Cloud-based map design
    ✓ Add public layers, base maps
    ✓ Load data from TileMill
    ✓ Embed or share
    ✓ Free account = 3,000 views per
    month
    ✓ MapBox.js library

    View full-size slide

  21. D3
    ✓ JavaScript for SVG styled with
    CSS
    ✓ Huge (and growing!) set of
    examples
    ✓ Impressive geographic capability
    ✓ Steep learning curve
    ✓ Maps are only one facet of D3
    Data-Driven Documents

    View full-size slide

  22. Where does CartoDB fit in all of this?
    Communication
    Analysis Cloud-ready

    View full-size slide

  23. Where does CartoDB fit in all of this?
    DB-driven (PostgreSQL, PostGIS)
    Scriptable tools and extensions
    Support for SHP, CSV, GeoJSON
    Tie into R for analysis
    Cloud-based online editor
    Pair with JavaScript libraries (D3,
    MapBox.js, etc)
    Base map from TileMill, MapBox
    SVG rendering
    Animation
    Interaction
    Communication
    Analysis Cloud-ready
    You guessed it!

    View full-size slide

  24. Let’s make a map!
    1
    2

    View full-size slide

  25. Let’s make a map!
    3
    Any plans for academics?
    “Yes we have. Contact us for getting
    more information. We are quite
    friends of academics so, you will
    get a lot of benefits.”
    - CartoDB

    View full-size slide

  26. Let’s make a map!
    4
    Need data? No sweat: https://gist.github.com/jscarto/4541842

    View full-size slide

  27. Let’s make a map!
    Need data? No sweat: https://gist.github.com/jscarto/4541842
    5

    View full-size slide

  28. Let’s make a map!

    View full-size slide

  29. Let’s make a map!

    View full-size slide

  30. Let’s make a map!
    Points, lines and polygons = geometric primitives essential to GIS + cartography

    View full-size slide

  31. Let’s make a map!
    6
    Data type can be String, Number (float), Date, or Boolean

    View full-size slide

  32. Let’s make a map!

    View full-size slide

  33. Let’s make a map!

    View full-size slide

  34. Let’s make a map!

    View full-size slide

  35. Let’s make a map!

    View full-size slide

  36. Let’s make a map!

    View full-size slide

  37. Let’s make a map!
    Copy (ctrl- or ⌘-c) all 67 lines of MapStyle.css

    View full-size slide

  38. Let’s make a map!
    Paste (ctrl- or ⌘-v) all 67 lines of MapStyle.css

    View full-size slide

  39. Let’s make a map!
    More interesting heat map. Notice zoom level = 7.

    View full-size slide

  40. Let’s make a map!
    Discrete points visible at zoom level = 10.

    View full-size slide

  41. Let’s make a map!
    1
    2
    3
    CartoCSS Breakdown
    1 2 3
    + + +... = multilayer symbol for heat map Smart selectors enable variable-driven design

    View full-size slide

  42. Don’t forget to share your map!

    View full-size slide

  43. Thanks!
    Questions?
    Email:
    [email protected]
    Twitter:
    @jscarto
    Slides online at:
    speakerdeck.com/jscarto

    View full-size slide