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 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 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 Slide

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

    View Slide

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

    View Slide

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

    View 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 Slide

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

    View Slide

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

    View 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 Slide

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

    View Slide

  12. Some tools are great for
    analysis.

    View 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 Slide

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

    View 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 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 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 Slide

  18. Other tools are great for
    communication.

    View 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 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 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 Slide

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

    View 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 Slide

  24. Let’s make a map!
    1
    2

    View 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 Slide

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

    View Slide

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

    View Slide

  28. Let’s make a map!

    View Slide

  29. Let’s make a map!

    View Slide

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

    View Slide

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

    View Slide

  32. Let’s make a map!

    View Slide

  33. Let’s make a map!

    View Slide

  34. Let’s make a map!

    View Slide

  35. Let’s make a map!

    View Slide

  36. Let’s make a map!

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View 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 Slide

  42. Don’t forget to share your map!

    View Slide

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

    View Slide