Welcome to Advanced GIS, Lecture 12

This is a web page that can be viewed as slides.

→ to move forward

← to go back

Advanced GIS

Class 12

work session next week (4/21)

work session next week (4/21)

bring your project and have some questions to work through

project presentations 4/28, 5/5

presentations

presentations

around 10 minutes, a few minutes for Q&A

presentations

presentations

presentations

presentations

presentations

source
source
source
source
source
source
source
source
source
source
source

at some point you might want to start programming on your own computer

(you don't have to for this class)

a typical process is:

1. edit the code in a code editor

2. test code in your browser

3. put code online with GitHub

code editors:

source
source
source

keep each project in a folder

the easiest way to put this in GitHub is dragging and dropping

make sure you select all of the contents of the project folder

you don't have to use GitHub to host a site

source
source

it's often hard to put your own HTML pages on Wordpress or Squarespace

you might consider hosting a map on Glitch or GitHub, and include the map in another site using an <iframe>

<iframe 
  src="https://flaxen-bait.glitch.me/"
  width="500"
  height="400"></iframe>

leaflet plugins

leaflet-control-geocoder
leaflet-control-geocoder
Leaflet.MiniMap
Leaflet.MiniMap
leaflet-markercluster
leaflet-markercluster
Leaflet.draw
Leaflet.draw
source
source
source
SELECT SUM(number_of_persons_injured)
FROM nypd_motor_vehicle_collisions
WHERE ST_Within(
  ST_Transform(the_geom, 2263),
  ST_Transform(
    ST_SetSRID(ST_GeomFromGeoJSON(geoJSON), 4326),
    2263
  )
)

look through the list of Leaflet plugins and find one or two that are interesting

source
source

you can get google streetview imagery for a latitude and longitude

source

all you need is latitude, longitude, and ...

source
source

an API key from google (requires a credit card)

source
source

more info in the docs

source

you don't have to use Carto for this part

you can get your overlay data from other sources

if you have a GeoJSON, you can load that directly with Leaflet

source

potential drawbacks:

potential drawbacks:

potential drawbacks:

using the open data API

source

an API gives you access to data through a URL

you can often filter this data in the URL (so you load less data)

source

API benefits:

API benefits:

API potential drawbacks:

API potential drawbacks:

OpenStreetMap has an API you can use

source

"the free wiki map of the world"

source
source

how's it work?

features are "tagged" with attributes

leisure=park

railway=subway

there are a few ways to figure out how people tag features

1. look at the map

2. look at the wiki

getting data using overpass turbo

source
source

remix this Glitch and try searching for something else using OpenStreetMap and Overpass