Welcome to Advanced GIS, Lecture 12
            This is a web page that can be viewed as slides.
            → to move forward
            ← to go back
         
        
        
          
next two weeks (4/29, 5/6): project presentations
        
        
          
presentations
        
        
          
presentations
          around 10 minutes, a few minutes for Q&A
        
        
          presentations
          
            - background for your project—why are you working on it?
 
          
         
        
          presentations
          
            - background for your project—why are you working on it?
 
            - methodology—what is your process? where is your data from?
 
          
         
        
          presentations
          
            - background for your project—why are you working on it?
 
            - methodology—what is your process? where is your data from?
 
            - dead ends—what went wrong? what did you learn?
 
          
         
        
          presentations
          
            - background for your project—why are you working on it?
 
            - methodology—what is your process? where is your data from?
 
            - dead ends—what went wrong? what did you learn?
 
            - what is the current state of your project?
 
          
         
        
          presentations
          
            - background for your project—why are you working on it?
 
            - methodology—what is your process? where is your data from?
 
            - dead ends—what went wrong? what did you learn?
 
            - what is the current state of your project?
 
            - is there anything specific you want feedback on?
 
          
         
        
        
        
        
        
        
        
        
        
        
        
        
        
            
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:
        
        
        
        
        
        
        
            
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
        
        
        
        
            
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
        
        
        
        
        
        
        
        
        
        
        
        
        
            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
  )
)
         
        
        
        
        
          you can get google streetview imagery for a latitude and longitude
            source
         
        
          all you need is latitude, longitude, and ...
            source
         
        
        
            an API key from google (requires a credit card)
            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
        
        
        
            potential drawbacks:
            
              - your page will load all of the data at once!
 
            
         
        
            potential drawbacks:
            
              - your page will load all of the data at once!
 
              - you need somewhere to host the data (Glitch or GitHub should work fine)
 
            
         
        
            potential drawbacks:
            
              - your page will load all of the data at once!
 
              - you need somewhere to host the data (Glitch or GitHub should work fine)
 
              - you aren't using Carto, so styling and filtering is different
 
            
         
        
            
using the open data API
        
        
        
        
        
        
        
        
        
            
an API gives you access to data through a URL
        
        
            
you can often filter this data in the URL (so you load less data)
        
        
        
            API benefits:
            
              - you always get the latest data
 
            
         
        
            API benefits:
            
              - you always get the latest data
 
              - you don't have to store the data
 
            
         
        
            API potential drawbacks:
            
              - your page will still load all of the data it needs to show
 
            
         
        
            API potential drawbacks:
            
              - your page will still load all of the data it needs to show
 
              - if the server hosting the API goes away or moves, your page breaks
 
            
         
        
        
        
        
            
OpenStreetMap has an API you can use
        
        
        
            
"the free wiki map of the world"
        
        
            
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