cartodb in the gis curriculum

17
CARTODB IN THE GIS CURRICULUM Carsten Kessler Department of Geography & Center for Advanced Research of Spatial Information · Hunter College · CUNY http://carsten.io · @carstenkessler

Upload: carsten-kessler

Post on 22-Mar-2017

201 views

Category:

Education


0 download

TRANSCRIPT

CARTODB IN THE GIS CURRICULUM

Carsten Kessler Department of Geography & Center for Advanced Research of Spatial Information · Hunter College · CUNY

http://carsten.io · @carstenkessler

USING CARTODB IN…

• Undergraduate level:

• Intro to GIScience

• Graduate:

• Advanced GIS

• Free & Open Source GIS

INTRO TO GISCIENCE (UNDERGRAD)

• Uses CartoDB in very first lab

• … even before they get to touch a desktop GIS

• Goal: Make a first (very simple) Web map

• Explore and analyze the map, using CartoDB’s visualizations

• NYC open data WiFi hotspots

Lab 1: Let’s make a Visualization

We’re going to work with some data on WIFI hotspots

ADVANCED GIS (GRAD)

• Covers relational (spatial) DBs, object-oriented modeling,

point pattern analysis, interpolation techniques, etc.

• Uses CartoDB in bonus lab (without guidance)

• Students create interactive world map of most visited

museums

• Data extracted from Wikipedia

FOSSGIS

• Taught as 1-week training course and regular 1-semester

grad course

• Solid knowledge of desktop GIS principles required

• Idea: transfer what students already know about GIS to the

world of Open Source GIS

• … and sneak in some programming skills

STRUCTURE

• Desktop GIS (QGIS)

• Spatial DBs (PostGIS)

• Spatial data analysis in Python and R

• Web mapping, server (Geoserver) and client (Leaflet)

• Final project

STRUCTURE

• Desktop GIS (QGIS)

• Spatial DBs (PostGIS)

• CartoDB

• Spatial data analysis in Python and R

• Web mapping, server (Geoserver) and client (Leaflet)

• Final project

APPLICATION EXAMPLE

• “Identify playgrounds near high-traffic streets in NYC”

• Used throughout the course

• Combination of spatial and thematic queries

• Solving the same problem in QGIS, PostGIS, R, Python,

CartoDB, … highlights differences

• Simple enough

Data: http://carsten.io/cartocamp.zip

TASK

• Identify playgrounds in NYC that are within 50m of a street

with more than 100,000 cars per day.

• Let’s do this…

CARTODB SQL API

• The same query can be used to export the matching

playgrounds directly:http://carsten.cartodb.com/api/v2/sql?

format=GeoJSON&q=SELECT distinct play.cartodb_id,

play.the_geom, play.accessible FROM play, nyc_streets

WHERE nyc_streets.aadt > 100000 and ST_DISTANCE

(play.the_geom::geography,

nyc_streets.the_geom::geography) < 50

… AND USE DIRECTLY IN

EXTERNAL WEB MAPS

THANK YOU!

Carsten Kessler Department of Geography & Center for Advanced Research of Spatial Information · Hunter College · CUNY

http://carsten.io · @carstenkessler

SELECT DISTINCT play.cartodb_id, play.the_geom_webmercator, play.accessible FROM play, nyc_streets WHERE nyc_streets.aadt > 100000 and ST_DISTANCE (play.the_geom::geography, nyc_streets.the_geom::geography) < 50

POSTGIS SQL QUERIES IN CARTODB