← Methods 3

In-class Exercises

Part 1: Geoprocessing

  1. Download this class's data.
  2. Clip nys_census_tracts to the Borough Boundaries. That is, remove the parts of the tracts that are outside of the borough boundaries.
  3. Select resulting census tracts in a selected borough.
  4. Buffer Graffiti_Locations by 500 feet.
  5. How many Public_School_locations are within 500 feet of a point in Graffiti_Locations? Use Vector > Research Tools > Select by location.

Part 2: Attribute Joins

  1. Open the file Public_School_locations in QGIS.
  2. Open the CSV SAT_Results.csv in QGIS using the Add Delimited Text Layer tool.
  3. Attribute join the SAT results to the public schools. Use DBN from SAT_Results, ATS_CODE from the Public_School_locations.
  4. Style the schools using the joined data.
  5. Select only schools that successfully joined to the SAT results and save the joined layer as a new shapefile.

Part 3: Download census data

  1. Go to American FactFinder.
  2. Select Guided Search, then click get me started.
  3. Download data counting owners and renters:
    1. Select I'm looking for information about housing.
    2. Expand Occupancy Characteristic.
    3. Click Owner/Renter (Tenure in Occupied Units) . Click Next.
    4. Under Select a geographic type select Census Tract.
    5. Select New York. You can skip "Select a county".
    6. Select All Census Tracts within New York.
    7. Click Add To Your Selections.
    8. Click Next.
    9. When asked if you're looking for data for a race or ethnic group, click Skip This Step.
    10. Now you should see a list of available tables. Select Tenure up at the top of the list.
    11. Now you should see the data you selected. Click Modify Table and Transpose Rows/Columns, which should flip the table vertically and give you more rows than columns.
    12. Finally, click Download, select Use, and OK without changing any options.

Part 4: Join census data

  1. First, prepare your data:
    1. In Excel or some other spreadsheet program, open the owners and renters CSV downloaded in the previous part.
    2. Rename HD01_VD01 to total_households.
    3. Rename HD01_VD02 to total_owners.
    4. Rename HD01_VD03 to total_renters.
    5. Delete row 2, which should contain Id, Id2, Geography, etc.
    6. Delete all columns that do not have headers that start with GEO and that we did not rename.
    If it helps, this week's data contains an edited version of this CSV (in ACS_16_5YR_B25003).
  2. Open your the CSV in QGIS.
  3. Open your clipped NYC census tracts from Part 1 in QGIS.
  4. Join the CSV to the shapefile.