Analyzing Housing value data
This is a continuation of the buffer exercise in GET THE DATA
- Import Census housing data (wa-housing-data.csv):
- Notice: housing-data.csv has already been wrangled.
- Add Delimited Text Layer or Menu Bar > Layer > Add Delimited Text Layer
- Configure inputs as follows:
File Name: housing-data.csv
File Format: CSV
First record has field names: (Checked)
No geometry (attribute only table): (Selected)
OK to add
- View Census housing-data.csv:
- Right-click housing-data (in layer list) > Open attribute table
- Import Washington Census tracts (tl_2014__53_tract.shp)
Important: Did you check the projection of the Census tracts shapefile? Be sure your shapefile CRS is EPSG:2927.
‘on the fly’ projection is selected - Save Census tract (tl_2014_53_tract.shp) with ESPG:2927:
- Right-click tl_2014_53_tract.shp (layer list) > Save As
- Configure as follows: ESRI Shapefile with EPSG:2927, Output filename: wa-tracts.shp, Add saved file to map: (Checked)
- Remove current tl_2014_53_tract.shp
- Open wa-tracts attribute table and housing-data to find the key that will be used to join the tables. HINT: It’s GEOID and GEO.id2.
notes: discuss field types, e.g. cannot compare a string to a number. – add image – - Join Census housing data (housing-data.csv) to Census tracts (wa-tracts.sho):
- Open Processing Toolbox (Menu Bar > Processing > Toolbox), search for “join attributes table”, then double-click “Join attributes table”
- Configure Join attributes table as follows:
Input layer: wa-tracts
Input layer 2: housing-data
Table field: GEOID
Table field 2: GEO.id2
Output layer: (Save to file..) tracts-housing-data.shp
IMPORTANT: The concept behind this join is tabular (non-locational-data) joined to spatial data, not spatial data to tabular data. So, you must have spatial data (wa-tracts.shp) as the primary input and tabular data (housing-data.csv) as the secondary input. Notice in the Joing attributes table inputs below.
NOTICE: “Layers do not all use the same CRS. This can cause unexpencted results.” Remember, the housing-data.csv does not have any locational data associated with it. Click Yes, to continue.
- Open Processing Toolbox (Menu Bar > Processing > Toolbox), search for “join attributes table”, then double-click “Join attributes table”
- Confirm output: housing data joined to tracts. Output is named “Output layer”, rename to “tracts_housing_data.shp” (right-click layer > Rename). Hover over the layer in the layer list to view the source path.
- Normalize housing data - tract house count X median tract house value = total tract home value: (you’ll need point data to have a more accurate analysis)
- Right-click tracts_housing_data > Open Attribute Table > Toggle editing mode > Open field calculator
- If you had downloaded the original ACS .csv with annotations then you would be able to easily find what the column headers mean. Or, you could locate the ACS metadata. But we have provided the difinitions below:
HC01_VC118 = Total Housing Units (Owner-occupied)
HC01_VC127 = Estimated Median Housing Unit (Owner-occupied)
We would have calculated total housing * median housing (total) but the ACS does not provide these metrics. - Configure inputs as follows:
- View your ouputs. Notice there are some NULL values:
- intersect buffered-merged-joined data with reclassified-rasterized geology layer
- intersect buffered faults and streams:
- intersect buffered faults and streams:
- calculate stream_fault_intersection shape area:
- calculate tracts_housing shape area:
- spatial join stream_fault_intersection + tracts_housing: (this one takes a while)
- data will be used in Raster Analysis