PRACTICE 10
Memories of urban environments
goal
This problem aims to introduce methods for mapping differences between conditions of sub-regions from whole regions. The general framework will help you explore distributive environmental (in)justice in built environments and the central question: are the costs and benefits of the built environment distributed unevenly among groups or classes of society?
This problem also introduces:
-
a workflow to compute land surface temperature (LST) from Landsat collections using a module by Sofia Ermida;
-
a community module of color palettes to help display raster images, but generates a noticeable delay in the execution of any script that calls it;
-
methods for changing aggregation levels of regions with attributes of feature collections.
By the end of the tutorial, you should have a script that reproduces the layers shown in the app below. You should also be able to rerun your analysis for any city in the USA with HOLC maps simply by changing one variable of your script.
context
This case study concerns the environmental legacies of redlining that are embedded in many (most) American cities. Your practical goal is to run the analysis by Hoffman et al (2020) with more recent LST data and create visuals inspired by the work of Nadja Popovich and Brian Palmer in the second reading for this week.
For more background on redlining and the history of the Home Owners’ Loan Corporation (HOLC), please review the resources at Mapping Inequality from the University of Richmond.
deliverables
Please complete the checkup on Canvas by 5pm on Friday 11/22. Because of the holiday next week, this will be a hard deadline. If your travel plans make this deadline impossible, please contact me for an extension before the deadline.
workflow
Please work through the steps of the workflow outlined below. Many steps draw on patterns introduced earlier in the course and I keep the scaffolding for these steps quite light. This aims to help you practice for the upcoming IP.
00 Start a script
/*
// ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
AUTHOR:
DATE: 11/20/2024
TITLE: practice-10.js
Investigate environmental legacies of HOLC with LST.
// ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
*/
var geo = require("users/jhowarth/eePatterns:modules/geo.js");
print("geo methods dictionary", geo.help); // Prints dictionary of all tools in module.
print("geo palettes", geo.iPalettes); // Prints dictionary of all palettes in module.
// Module for EE community palettes.
var palettes = require('users/gena/packages:palettes');
print("Community palettes", palettes);
01 Make and display Layer 1
// ------------------------------------------------------------------------
// 1. Make and display Layer 1.
// ------------------------------------------------------------------------
var holc_address = "projects/ee-primer/assets/holc_numeric_grades"
02 Make and display Layer 2
// ------------------------------------------------------------------------
// 2. Make and display Layer 2.
// ------------------------------------------------------------------------
03 Define & display levels of aggregation
// ---------------------------------------------------------------------
// 3. Define levels of aggregation for HOLC data.
// ---------------------------------------------------------------------
// Define and display all holc zones of a city as a single, multipart feature.
// Define each holc grade as a single, multipart features.
// Print aggregation levels.
04 Create LST datasets from Landsat
Here is a starter script to help get started with Sofia’s module.
// ------------------------------------------------------------------------
// 4. Create LST datasets from Landsat.
// ------------------------------------------------------------------------
// Module to compute LST from Landsat.
var LandsatLST = require('users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js');
// Define arguments for LST module.
var date_start = '2020-07-01'; // Filter by time start.
var date_end = '2024-09-01'; // Filter by time end.
var region = holc; // Filter by location.
var use_ndvi = true; // Use NDVI in computation (true or false).
// Compute LST from L9 collection.
// Compute LST from L8 collection.
// Print to inspect your work!
05 Merge image collections
// ------------------------------------------------------------------------
// 5. Merge image collections.
// ------------------------------------------------------------------------
06 Filter merged collection
Filter the dataset for images collected in summer months (June and August) with cloud cover less that 10 percent. Also select only the ‘LST’ band from the images.
// ------------------------------------------------------------------------
// 6. Filter merged collection.
// ------------------------------------------------------------------------
07 Flatten, convert, rename, clip
Please do the following:
- calculate the average (mean) temperature of summer months collection (result of step 6) for each pixel;
- convert units of reduced image from Kelvin (units that result from LST module) to Fahrenheit;
- rename the band “AVG_LST_F” in the output image;
- clip to the holc_extent.
To convert from K to F:
- Subtract 273.15 from Kelvin temperature
- Multiply by 1.8
- Add 32
// ------------------------------------------------------------------------
// 7. Flatten, convert, rename, clip.
// ------------------------------------------------------------------------
08 Display Layer 5
I include a viz dictionary below to help you use the community palettes module. For more help on this, please refer to the module’s docs.
// ------------------------------------------------------------------------
// 8. Display as Layer 5.
// ------------------------------------------------------------------------
var output_viz = {
bands: ["AVG_LST_F"],
min: 85,
max: 115,
palette: palettes.colorbrewer.YlOrRd[9]
};
09 Make and display Layer 6
// ------------------------------------------------------------------------
// 9. Make and display Layer 6.
// ------------------------------------------------------------------------
10 Compute difference
// ------------------------------------------------------------------------
// 10. Compute difference: mean of parts - mean of whole.
// ------------------------------------------------------------------------
// Use zonal statistics to calculate mean lst in each aggregation level.
// Convert each of above to image.
// Compute difference: mean_parts - mean_whole
11 Display Layer 7
// ------------------------------------------------------------------------
// 11. Display Layer 7.
// ------------------------------------------------------------------------
12 Chart difference
// ---------------------------------------------------------------------
// 12. Chart difference for each part.
// ---------------------------------------------------------------------
// Define chart arguments.
var chart_arguments = {
data_image: difference, // Image used for Layer 7.
class_image: image_nominal, // Image used for Layer 2.
aoi: aoi_dissolve_whole, // Feature collection for Layer 3.
reducer: ee.Reducer.mean(),
scale: 30,
class_labels: geo.iPalettes.iHOLC.labels,
title: 'Difference of grade from average LST',
palette: geo.iPalettes.iHOLC.palette,
ha_label: "degrees (F)"
};
var myChart = geo.uiChart.makeBarChartByClass(chart_arguments);
Map.add(myChart);
This work is licensed under CC BY-NC-SA 4.0