In-class Exercises
Part 1: Spatial Joins
- Download this class's data.
- Open the shapefiles in school-districts and schools-join-sat-results.
- Use Join Attributes by Location (Summary) from the search bar to find the average (mean) SAT math score by school district.
- Style the school districts by the average score.
Part 2: Geocoding
- Open the Census Bureau's batch geocoder.
- Geocode the CSV file in the folder Trade Waste Hauler Licensees named haulers-excerpt-to-geocode.csv.
- Open the result in QGIS.
Part 3: Hexbins
Use hexbins to look at the density of uber_2014_04_01 or Graffiti_Locations.
- Open the points file of your choosing (uber_2014_04_01 or Graffiti_Locations).
- Move your project into a projection where you know the units (eg, 2263 is in feet).
- Use the QGIS search bar to search for Create grid.
- Select Hexagon for the grid type, set the grid extent to Use layer/canvas extent > Use extent from (your layer name).
- Set the Horizontal spacing and Vertical spacing to 1000 feet to start.
- Pick a suitable place to save to and create the grid.
- If the grid's hexagons are too large or too small, repeat the process but change the Horizontal spacing or Vertical spacing. These determine the height and width of the hexagons.
- Count the number of points in each hexagon and make a choropleth with the resulting layer.
Part 4: Heatmaps
Using the same points layer as last time, make a heatmap.
- Search for Heatmap (Kernel Density Estimation) in the QGIS search box.
- Set the radius to 2000 feet.
- Set the rows to 3000. This is the number of rows of pixels in the resulting raster. The columns should update automatically.
- Style the output raster with a Singleband Pseudocolor render type and select a color ramp.
- Create a few more heatmaps with varying radii and resolution (rows and columns).