Doing the GIS thing, for real this time (a deep dive)

Now we'll do LINIQES again, but this time we're cooking up all the ingredients ourselves: Maps, data, analysis. Mmmmm-hmm! 


LOAD: This time, we won't just work with what My World gives us. We are going to (1) fetch a map, and (2) load that puppy into My World 

  • Let's get a map from the Census Burea: http://www.census.gov/cgi-bin/geo/shapefiles2013/main
    • ...I'm going to be doing this with school districts, but I guess you could pick something else. 
    • ...unified school districts, PA --> download, unzip/extract
    • Look in the extracted / unzipped folder: Are we scared by this? No. Look at dbf file through text editor -- it's just a list of values, headed by a little gobbledy-gook
    • There's the map file, the index file, and a couple supporting files. (For example, the prj tells the software what projection the map file is in)
  • Now how do we LOAD this into MyWorld?
    • Back on the "Construct" tab, find the file folder button. (Or just go to File > Import Layer From File.) 
    • Working through the dialog boxes: Unprojected lat-lon is your friend; everything else is guess-and-check. So: Pick lat-lon and cross your fingers; add another layer (e.g., US States) if you want to test your end result against the result of what's in the My World database. 


INTERFACE: Nothing new here...same old interface.


NAVIGATE: Nothing new here...same old navigation possibilities. However, I hope you're using the more advanced techniques by now: Draw a box, flip back in views if necessary, zoom to layer extent if necessary, etc. 


INSPECT: Make sure you are looking at the right info (i.e., school districts) by finding the Allentown School District, Bethlehem Area School District, etc. 

 

QUERY...boy, there's not much data in this file, is there? But can we get more data? Data associated with school districts? Oh, yes we can, and this is going to move us toward the EDIT stage. One thing that will help us, and will teach you a little more about GIS, is to make a selection by latitude & longitude

  • Go to "Analyze"
  • ..."Select"
  • ..."By Spatial Relationships"
  • ..."By Latitude & Longitude"
  • ...and pick the box from -75 to -76 longitude, 40 to 41 latitude
  • ...(as always, I recommend saving as a new layer)

This will give you a subset of school districts, those in and around the Lehigh Valley

 

EDIT: We're going to (1) go fetch data, and (2) get that data into My World. It's going to take a little spreadsheet and text editor kung fu, though, so bear with me.

  • Get school district data: http://www.portal.state.pa.us/portal/server.pt/community/school_assessments/7442
    • ...I'll be going with the "2011-12 PSSA Math and Reading Results - All Students - District Totals (Excel)"
    • Download and open the Excel file. 
    • Look at the "District" column. Does it match the "Name" column in your GIS map from the Census Bureau? Sort of, yes, but it has to be exact. 
    • Massage the data. Note that this requires some spreadsheet kung-fu. While spreadsheet-fu is an important life skill (just like tying your shoes), it is not the topic of this lesson. So: Feel free to grab this pre-massaged spreadsheet and then work on your spreadsheet skills later: 2012 PSSA Math Reading Districtwide Total All Students Group_ready_for_import.csv
      • Trim un-wanted rows and columns from the Excel spreadsheet. 
      • Grab the "District" column, throw into text editor. 
      • Replace "SD" with "School District"
      • Modify > Text Case > Capitalize to fix the rest of that column
      • Paste this column back into Excel
      • Save as CSV (comma separated values)
      • (If you want: Look at this file in a text editor -- it should look pretty much like a happy dataset, ready to be imported into your GIS)
  • Merge this spreadsheet data with your GIS map
    • "Edit" tab
    • Double-click your target layer
    • Find the "Add New Fields From File" button just above the spreadsheet
    • Navigate to where you saved your CSV
    • (Don't forget to switch "Files of Type" to csv!!!)
    • ...and you should be good to go from here. Just read the dialog boxes. 

Now get back out to "Visualize" and see what you have! What patterns can you observe? 

To get fancy: Can you make the map display a percentage of students who scored ABOVE basic in math or reading? 

Now SAVE your project and upload it to the Forum for today's class.Â