class: center, title-slide, middle background-image: url("img/CASA_Logo_no_text_trans_17.png") background-size: cover background-position: center <style> .title-slide .remark-slide-number { display: none; } </style> # Remotely Sensing Cities and Environments ### Lecture 4: Policy applications ### 02/02/2022 (updated: 30/01/2024)
[a.maclachlan@ucl.ac.uk](mailto:a.maclachlan@ucl.ac.uk)
[andymaclachlan](https://twitter.com/andymaclachlan)
[andrewmaclachlan](https://github.com/andrewmaclachlan)
[Centre for Advanced Spatial Analysis, UCL](https://www.ucl.ac.uk/bartlett/casa/)
[PDF presentation](https://github.com/andrewmaclachlan/CASA0023-lecture-4/blob/main/index.pdf) <a href="https://github.com/andrewmaclachlan" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff; color:#151513; position: absolute; top: 0; border: 0; left: 0; transform: scale(-1, 1);" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style> --- # How to use the lectures - Slides are made with [xaringan](https://slides.yihui.org/xaringan/#1) -
In the bottom left there is a search tool which will search all content of presentation - Control + F will also search - Press enter to move to the next result -
In the top right let's you draw on the slides, although these aren't saved. - Pressing the letter `o` (for overview) will allow you to see an overview of the whole presentation and go to a slide - Alternatively just typing the slide number e.g. 10 on the website will take you to that slide - Pressing alt+F will fit the slide to the screen, this is useful if you have resized the window and have another open - side by side.
--- # Lecture outline .pull-left[ ### Part 1: Example applcations ### Part 2: Policy challenges ] .pull-right[ <img src="img/satellite.png" width="100%" /> .small[Source:[Original from the British Library. Digitally enhanced by rawpixel.](https://www.rawpixel.com/image/571789/solar-generator-vintage-style) ]] --- class: inverse, center, middle # Before we can explore policy we really need to look at what remotely sensed data can provide answers to... --- class: inverse, center, middle # So...a brief overview...but of course this depends on the data you are using --- # Data from sensors Depends on a the combination of spectral bands, resolutions + cost. .pull-left[ * Multi-temporal land cover (or land use) mapping * Spectral signatures / libraries* * Change detection - e.g. urban or forest * Vegetation stress - illegal logging * Precipitation * Elevation models (or point data) - such as LiDAR * Temperature * Night time lights (urban development) ] .pull-right[ * Forest fire monitoring / predicting / "hot spot" detecting * Pollution monitoring * Drought indices * Informal housing detection * Water level data - monitoring * Building or network outline (polygon / line) extraction * Environmental monitoring (e.g. Aral Sea) * Estimations of resources - forest, water, snow, ice, green space ] --- # Different wavelengths show us different things... .pull-left[ <img src="img/spectral_table.png" width="100%" /> .small[Source:[USGS](https://www.usgs.gov/faqs/what-are-best-landsat-spectral-bands-use-my-research) ]] .pull-right[ <img src="img/spectral_viewer.png" width="100%" /> .small[Source:[USGS](https://landsat.usgs.gov/spectral-characteristics-viewer) ]] --- # Urban expansion **Sensor** * Landsat <img src="img/urban_area.png" width="35%" style="display: block; margin: auto;" /> .small[Figure 2. Urban expansion within the Perth Metropolitan Region (PMR) between 1990 and 2015. Vast urban growth has been observed in PMR with graduating colours exhibiting outward expansion (a); (b) and (c) exhibit static snapshots of urban extent from 2000 (b) and 2015 (c); whilst (d) depicts percentage of urban change per subnational administrative boundary (Local Government Area; LGA).Source:[MacLachlan et al. 2017](https://www.mdpi.com/2073-445X/6/1/9) ] --- # Air pollution and LULC **Sensors** * Sentinel-3 Sea and Land Surface Temperature * Sentinel-5 Precursor Major Air Pollutants LULC transformation on air pollution, increase MAP (Major Air Pollutants) and LST * Used regression...LULC as independent (explanatory) and LST, pollution etc were dependent * Honeycombing - hex grids for different sensor data, values interpolated to same resolution <img src="img/LST_honeycombing.jpg" width="40%" style="display: block; margin: auto;" /> .small[Fig. 2. The classified honeycomb dataset for LST, PM₂.₅, SO₂, NO₂, CO, and O₃..Source:[Fuldalu and Alta, 2021](https://www.sciencedirect.com/science/article/pii/S2212095521001887?casa_token=0kyJ1dZmkm0AAAAA:syu0WnpPpsCKiY6PiBfzkf2epGa5uldthCpOt1Hey9_pmOF_uel1WpuYECTvF0jr3uzcRCrbd5k#f0005) ] --- class: inverse, center, middle # Land Use and (?) Land Cover (LULC) --- # Urban green spaces **Sensors / data** .pull-left[ * Landsat (medium res 17%) * Sentinel] .pull-right[ * LiDAR $ * High spatial resolution (38%) $ * High + medium res = 9% ] Studies * Accessibility to urban green spaces - usual kind of stuff * Also, now types of vegetation - DEM, elevation models and relationship to well being and health * Google street view! - sky view factor and iTree * Google Earth Engine - Compare health benefits in relation to green space over 25 cities * Vegetation health - targeted intervention * Landscape indexes - mean patch size, patch density and edge density .small[Remote sensing of urban green spaces: A review. Source:[Shahtahmassebi et al. 2021](https://www.sciencedirect.com/science/article/pii/S1618866720307639?casa_token=ZrACATZktIAAAAAA:9bCBg0pBWBsIPmYMufywYK54cyPXoImsgNxQCN_JBR2zUQ50mvnKHcKZ9CnB2ywCNNsOCw-tpBU#!) ] --- # Disaster response / preparedness **Sensor** Sentinel-2 spectral imagery * Image difference (post event - pre-event) * View-shed analysis (building outlines / DEM) <img src="img/spectral_sig_diff.png" width="80%" style="display: block; margin: auto;" /> .small[Building a 3D Model of the Beirut Explosion. Source:[Ollie Ballinger](https://oballinger.github.io/beirut-3D-model/) ] --- # Disaster response / preparedness 2 <img src="img/GIF_1.gif" width="50%" style="display: block; margin: auto;" /> .small[Building a 3D Model of the Beirut Explosion. Source:[Ollie Ballinger](https://oballinger.github.io/beirut-3D-model/) ] --- class: inverse, center, middle # Synthetic Aperture Radar (SAR) ## Covered more in the last week.... ## Some of the next few slides taken from the last week** --- # SAR background Synthetic Aperture Radar: * Active sensors * Have surface texture data * See through weather and clouds * Different wavelengths - different applications <img src="img/SAR_bands.png" width="50%" style="display: block; margin: auto;" /> .small[What is Synthetic Aperture Radar?. Source:[NASA Earth Data](https://earthdata.nasa.gov/learn/backgrounders/what-is-sar) ] --- # Comparisons <img src="img/ecolocation_types.jpg" width="50%" style="display: block; margin: auto;" /> .small[Sound waves and sound reflection is used by bats and dolphins to echolocate; this process was studied and used to improve underwater sonar that we use in submarines and other water vessels. Source:[askabiologistasu](https://askabiologist.asu.edu/echolocation#:~:text=Like%20bat%20echolocation%2C%20radar%20is,submarines%20and%20other%20water%20vessels.) ] * [Ripple tank simulator](http://www.falstad.com/ripple/) --- # SAR background 2 * Also different ploarizations - orientation of the plane in which EMR waves transmitted.. > Polarization refers to the orientation of the plane in which the transmitted electromagnetic wave oscillates. While the orientation can occur at any angle, SAR sensors typically transmit linearly polarized. The horizontal polarization is indicated by the letter H, and the vertical polarization is indicated by V. <img src="img/SARPolarization.jpg" width="75%" style="display: block; margin: auto;" /> .small[What is Synthetic Aperture Radar?. Source:[NASA Earth Data](https://earthdata.nasa.gov/learn/backgrounders/what-is-sar) ] --- # SAR polarization .pull-left[ * Also different ploarizations: * orientation of the plane in which EMR waves transmitted.. * "direction of travel of an electromagnetic wave vector’s tip: vertical (up and down), horizontal (left to right), or circular (rotating in a constant plane left or right)." * Single = 1 horizontal (or vertical) * Dual = transmits and receives both horizontal and vertical * HH = emitted in horizontal (H) and received in horizontal (H) ] .pull-right[ <img src="img/polarisation.png" width="100%" style="display: block; margin: auto;" /> .small[Polarization. Source:[Wetland Monitoring and Mapping Using Synthetic Aperture Radar](https://www.intechopen.com/chapters/63701) ] * Can change when interacting with materials ] --- # SAR polarization Different surfaces respond differently to the polarizations * Rough scattering (e.g. bare earth) = most sensitive to VV * Volume scattering (e.g. leaves) = cross, VH or HV * Double bounce (e.g. trees / buildings) = most sensitive to HH. <img src="img/SARPolarization.jpg" width="100%" style="display: block; margin: auto;" /> .small[What is Synthetic Aperture Radar?. Source:[NASA Earth Data](https://earthdata.nasa.gov/learn/backgrounders/what-is-sar) ] --- # SAR image <img src="img/SAR.png" width="75%" style="display: block; margin: auto;" /> Paper also goes through some correction methods that should be familiar! .small[Urban objects detection from C-band synthetic aperture radar (SAR) satellite images through simulating filter properties. Source:[Deepak Kumar, 2021](https://www.nature.com/articles/s41598-021-85121-9) ] --- # SAR image 2 "multitemporal colour composite SAR image, rice growing areas in the Mekong River delta, Vietnam 1996." .pull-left[ "Three SAR images acquired by the ERS satellite during 5 May, 9 June and 14 July in 1996 are assigned to the red, green and blue channels respectively for display. The colourful areas are the rice growing areas, where the landcovers change rapidly during the rice season. The greyish linear features are the more permanent trees lining the canals. The grey patch near the bottom of the image is wetland forest. The two towns appear as bright white spots in this image. An area of depression flooded with water during this season is visible as a dark region." ] .pull-right[ <img src="img/multitemporal colour composite SAR image.png" width="100%" style="display: block; margin: auto;" /> ] .small[SAR Images. Source:[CRISP](https://crisp.nus.edu.sg/~research/tutorial/sar_int.htm) ] --- # SAR background 3 Scattering can change based on wavelength Further penetration then the volume scattering will change <img src="img/SARtree_figure2.jpg" width="100%" style="display: block; margin: auto;" /> .small[What is Synthetic Aperture Radar?. Source:[NASA Earth Data](https://earthdata.nasa.gov/learn/backgrounders/what-is-sar) ] --- # SAR background 4 Some terms: > Backscatter is the portion of the outgoing radar signal that the target redirects directly back towards the radar antenna The higher the backscattered intensity = rougher the surface. It is "unitless" Can be converted to "backscatter coefficient, or sigma nought", measured in decibel (dB) units = normalised measure of the radar return from a distributed target If the signal is from backscatter is not desired = "clutter" * Has been used in urban monitoring BUT... * Corner reflections in urban environments * Shadowing - building behind another not imaged * Speckle - grainy, from scattering on ground - "salt and pepper" .small[Source:[NASA Earth Data](https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-1-sar/definitions#:~:text=Backscatter%20is%20the%20portion%20of,by%20which%20backscatter%20is%20formed.) ] .small[Source:[Urban Area Delineation Using InSAR Products](https://webapps.itc.utwente.nl/librarywww/papers/msc_2002/gfm/luhega.pdf) ] --- # SAR background .pull-left[ * Wavelength of SAR can change application <img src="img/SAR_bands_NASA.png" width="100%" style="display: block; margin: auto;" /> ] .pull-right[ * Remember this is on the electromagnetic spectrum (EMR) <img src="img/SAR_bands_EMR.jpg" width="100%" style="display: block; margin: auto;" /> ] .small[What is Synthetic Aperture Radar?. Source:[NASA Earth Data](https://earthdata.nasa.gov/learn/backgrounders/what-is-sar) ] --- # Amplitude (backscatter) and phase .pull-left[ A SAR signal has both **amplitude** (backscatter) and **phase** data ** Backscatter (amplitude)** * Polarization * VV = surface roughness * VH = volume of surface (e.g. vegetation has a complex volume and can change the polarization) * Permativity (dielectric constant) - how **reflective** is the property which means **reflective back to the sensor**. Water usually reflects it off elsewhere * The return **value**, also remember the band (wavelength) ] .pull-right[ <img src="img/amplitude_example.png" width="100%" style="display: block; margin: auto;" /> * Wind makes the water move and reflect back to the sensor (under VV) .small[NASA Data Made Easy: Part 2- Introduction to SAR. Source:[NASA Earth Data](https://www.youtube.com/watch?v=Zfn7P395O40) ] ] --- # Amplitude (backscatter) and phase .pull-left[ A SAR signal has both **amplitude** (backscatter) and **phase** data **Phase** * Location of wave on the cycle when it comes back to the sensor ] .pull-right[ <img src="img/phas_shift.png" width="100%" style="display: block; margin: auto;" /> .small[InSAR. Source:[Pascal Castellazzi](https://www.researchgate.net/figure/Principle-of-the-InSAR-techniques-the-phase-difference-observed-by-comparing-two-SAR_fig1_342916517) ] ] --- # SAR floods **Sensor** * Sentinel-1 SAR ENSO phases but this is from Australian La Niña 2022 * trade winds from south america intensity * draw up cool deep waters and increase thermocline * temp difference increases, walker circulation intensifies - feedback loop * more cloud + more rain + cyclones in West Pacific <img src="img/SAR1.jpg" width="35%" style="display: block; margin: auto;" /> .small[Eastern Australia Floods. Source:[brockmann-consult](https://www.brockmann-consult.de/eastern-australia-floods/) ] --- # ENSO **El Niño–Southern Oscillation (ENSO)** .center[ <iframe width="560" height="315" src="https://www.youtube.com/embed/WPA-KpldDVc?start=111" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ] --- # Me on SAR > Although SAR images over urban areas provide low quality images due to problems associated with radar imaging in such an environment (i.e. multiple bouncing, layover and shadowing), SAR texture measures can provide valuable information in discerning urban areas (Dell’Acqua et al., 2003; Zhu et al., 2012). Isolated scattering of residential areas and crowded backscatters of inner city high density areas permit classification refinement, thus textural measures such as those descried within the spatial domain can aid identification of alternative urban forms (Zhu et al., 2012). >However, the lack of freely available SAR data that temporally coincides with other satellite imagery (e.g. Landsat) frequently precludes extensive use --- class: inverse, center, middle # To use SAR or not to use SAR...that is the question... --- # InSAR Interferometry Synthetic Aperture Radar (InSAR) * Take two RADAR observations of the target (e.g. the ground) * Use the phase difference * Phase = > "total number of cycles of the wave at any given distance from the transmitter, including the fractional part" * Phase difference - SUBTRACT the values (measured phase values) at two different measurement points * Differential distance depends on the height of the terrain (topography) * Used for creating DEMs * Monitoring displacement of ground - earthquakes etc .small[INTERFEROMETRY EXPLAINED - MORE DETAIL. Source:[NASA SRTM](https://www2.jpl.nasa.gov/srtm/instrumentinterfmore.html) ] --- # InSAR 2 Key terms * Coherence Map > Coherence is defined as the degree of similarity of backscattering response (or reflection characteristic of as measured by the SAR sensor) between corresponding ground cells in both SAR image of an InSAR pair. > Something is coherent when they are in phase (vibrate in unison) * Differential Interferometry Synthetic Aperture Radar (DInSAR) - more on this later > "quantification of the ground displacement that occurred between the two acquisitions can be achieved" through a "differential interferogram" .small[Source:[Michel Gay](http://www.permanet-alpinespace.eu/archive/pdf/WP6_1_dinsar.pdf) ] --- # SAR applications SAR applications, an emerging trend: https://www.mdpi.com/journal/remotesensing/special_issues/Urban_SAR * [Damage detection](https://www.sciencedirect.com/science/article/pii/S0924271621000010?casa_token=Peuv4YfQjsEAAAAA:wAdc-R2tEjK7L4maY6ZcOio3YyIZPnb7HgqXi5SQZAeIoYq8bApu9iA6H-281attgj1dwQ-IPz8) * [Urban area mapping](https://www.sciencedirect.com/science/article/pii/S0034425721002352?casa_token=6kKdHHJ_GZ4AAAAA:LDl85LIgl6O8G_NNSgxfBgcGw7vpRrS0JAd5STW5obGnGDuO2l0RmkdzzLqLEbqNbO0MSzdhFPU) * [Urban flooding (lower backscatter coefficient)](https://www.mdpi.com/2071-1050/12/14/5784) * Landslides * Earthquakes * Data fusion* / DEM creation --- # Monitoring forests + illegal logging [Hansen, M.C., Potapov, P.V., Moore, R., Hancher, M., Turubanova, S.A., Tyukavina, A., Thau, D., Stehman, S.V., Goetz, S.J., Loveland, T.R., Kommareddy, A., Egorov, A., Chini, L., Justice, C.O., Townshend, J.R.G., 2013. High-Resolution Global Maps of 21st-Century Forest Cover Change. Science 342, 850–853.]( https://doi.org/10.1126/science.1244693) **Sensor** * Landsat (2000 to 2012) Monitoring forest loss and illegal logging * Pre-processing > "Landsat pre-processing steps included: (i) image resampling, (ii) conversion of raw digital values (DN) to top of atmosphere (TOA) reflectance, (iii) cloud/shadow/water screening and quality assessment (QA), and (iv) image normalization" > The stack of QA layers was used to create a perpixel set of cloud-free image observations which in turn was employed to calculate timeseries spectral metrics. --- # Monitoring forests + illegal logging 2 * Creating metrics > Metrics represent a generic feature space that facilitates regionalscale mapping and have been used extensively with MODIS and AVHRR data > (i) reflectance values representing maximum, minimum and selected percentile values (ii) mean reflectance values for observations between selected percentiles (iii) slope of linear regression of band reflectance value versus image date. In support of this reference is given to [Hansen et al. 2010](https://www.pnas.org/doi/epdf/10.1073/pnas.0912668107)...supplementary material... > The time-sequential MODIS 32-dayinputs were transformed to annual metrics to produce a more generalized feature space --- # Monitoring forests + illegal logging 3 > "a more generalized feature space" * Feature space = scattergram of two bands (or things that have been made into bands) * Can be used for very basic classification - selecting the values that represent land cover .pull-left[ <img src="img/Multi_Hyper-spectral_Image_feature_space.svg" width="100%" style="display: block; margin: auto;" /> .small[Feature space. Source:[Wikimedia commons 2022](https://commons.wikimedia.org/wiki/File:Multi_Hyper-spectral_Image_feature_space.svg) ] ] .pull-right[ <img src="img/Spectral-curves-scatter-plot.png" width="80%" style="display: block; margin: auto;" /> .small[Spectral curves on the scatter plot. Source:[50northspatial](http://www.50northspatial.org/n-dimensional-spectral-feature-space-envi/) ] ] --- # Monitoring forests + illegal logging 4 * Training data (in supervised machine learning) > Training data to relate to the Landsat metrics were derived from image interpretation methods, including mapping of crown/no crown categories using very high spatial resolution data such as Quickbird imagery, existing percent tree cover layers derived from Landsat data (29), and global MODIS percent tree cover (30), rescaled using the higher spatial resolution percent tree cover data sets <img src="img/training_data.png" width="80%" style="display: block; margin: auto;" /> .small[REMAP method. Source:[UN-SPIDER](https://www.un-spider.org/news-and-events/news/new-online-remote-sensing-application-land-cover-classification-and-monitoring) ] --- # Monitoring forests + illegal logging 5 * Classification (supervised or unsupervised) > Decision trees are hierarchical classifiers (top down) that predict class membership by recursively partitioning (splitting) a data set into more homogeneous or less varying subsets, referred to as nodes <img src="img/Hansen_forest_change.jpeg" width="50%" style="display: block; margin: auto;" /> .small[FIG. 2 Regional subsets of 2000 tree cover and 2000 to 2012 forest loss and gain.(A) Paraguay, centered at 21.9°S, 59.8°W; (B) Indonesia, centered at 0.4°S, 101.5°E; (C) the United States, centered at 33.8°N, 93.3°W; and (D) Russia, centered at 62.1°N, 123.4°E. Source:[Hansen et al. 2013](https://www.science.org/doi/10.1126/science.1244693) ] Used in Brazil to [target illegal logging]( https://news.mongabay.com/2019/04/how-a-sheriff-in-brazil-is-using-satellites-to-stop-deforestation/) --- # Monitoring forests + illegal logging 6 > Decision trees are hierarchical classifiers that predict class membership by recursively partitioning a data set into more homogeneous or less varying subsets, referred to as nodes * A random forest classifier is a collection of decision trees * Take something complex and force into many decisions = if-else conditions or also called divide and conquer. * Often requires hyperparameters to train the model (or control the learning process) - e.g. the choices we've made in the past...sort of... * DBSCAN (radius of points, Epsilon or MinPts - to make a cluster) * Spatial weight matrix (type and then weight) * Split the data into more and more homogeneous subsets (filtering!) this can be limited through * pre-pruning - set a number of iterations before * post-pruning - reduce groups afterwards based on accuracy. Tree fully grows but will be overfit. --- # Decision trees..briefly .pull-left[ <img src="img/decision_tree.png" width="100%" style="display: block; margin: auto;" /> .small[Decision tree. Source:[towardsai](https://towardsai.net/p/programming/decision-trees-explained-with-a-practical-example-fe47872d3b53)] ] .pull-right[ <img src="img/DT_terms.png" width="100%" style="display: block; margin: auto;" /> .small[Decision tree. Source:[towardsai](https://towardsai.net/p/programming/decision-trees-explained-with-a-practical-example-fe47872d3b53)] <img src="img/DT_process.png" width="100%" style="display: block; margin: auto;" /> .small[Decision tree. Source:[towardsai](https://towardsai.net/p/programming/decision-trees-explained-with-a-practical-example-fe47872d3b53)] ] --- # Decision trees..briefly 2 .pull-left[ **Post pruning** In post-pruning first, it goes deeper and deeper in the tree to build a complete tree. If the tree shows the overfitting problem then pruning is done as a post-pruning step. We use a cross-validation data to check the effect of our pruning. **Using cross-validation data, it tests whether expanding a node will make an improvement or not**. If it shows an improvement, then we can continue by expanding that node. But if it shows a reduction in accuracy then it should not be expanded i.e, the node should be converted to a leaf node. ] .pull-right[ **tidymodels** In R we have the new parsnip package... it let's us change models without changing the data / packages... **Type** = random forest, decision trees etc **mode** = classification or regression **engine** Specific package or model fit... ] --- # Decision trees..briefly 3 * Prepare the model and testing / training ```r library(tidymodels) tidymodels_prefer() data(Chicago) n <- nrow(Chicago) Chicago <- Chicago %>% select(ridership, Clark_Lake, Quincy_Wells) Chicago_train <- Chicago[1:(n - 7), ] Chicago_test <- Chicago[(n - 6):n, ] dt_reg_spec <- decision_tree(tree_depth = 30) %>% # This model can be used for classification or regression, so set mode set_mode("regression") %>% set_engine("rpart") dt_reg_spec ``` --- # Decision trees..briefly 4 * Fit the train data to the tree * Test it with the testing data ```r set.seed(1) dt_reg_fit <- dt_reg_spec %>% fit(ridership ~ ., data = Chicago_train) dt_reg_fit predict(dt_reg_fit, Chicago_test) ``` --- # Droughts ### Who is still watering their garden in a drought? .pull-left[ * Southern California 2022 drought and water shortage - [cities of Conejo Valley](https://www.conejochamber.org/news/details/state-reduces-water-allocation-to-5-due-to-historically-dry-winter-and-low-reservoir-levels-03-21-2022) and Thousand Oaks * Various [rules about watering for residential properties](https://www.conejovalleyguide.com/welcome/emergency-water-conservation-measures-go-into-effect-on-june-1-2022-conejo-valley-water-providers) * Sentinel moisture index to spot who is watering too much? This is... .center[ `\(NDMI = \frac{(B08 - B11)}{(B08 + B11)}\)` ] * How can the cities prevent this... ] .pull-right[ <img src="img/drought_index.jfif" width="100%" style="display: block; margin: auto;" /> .small[See the Twitter thread for other examples. Source:[@ai6yrham](https://twitter.com/ai6yrham/status/1537146383475437568/photo/1) ] ] --- # Forest fires * Dates back to the most cited paper on the topic - "Application of remote sensing and geographic information systems to forest fire hazard mapping", Chuvieco and Congalton 1989. .pull-left[ Used: * **Sensor** Landsat TM 1984 * vegetation, elevation, slope, aspect and road/ house proxmity = fire hazard map compared to burned map from Landsat * Did a weighted overlay of the layers - giving hazard value of 0 to 255, some layers had assigned values (e.g. aspect of 90-180 a value of 0) * Vegetation was from a classified Landsat TM image - classified 16 categories * No accuracy assessment * I assume they manually delineated the burned area pixels ] .pull-right[ <img src="img/hazard.png" width="100%" /> .small[Source:[Chuvieco and Congalton 1989](https://reader.elsevier.com/reader/sd/pii/0034425789900230?token=3F5F9030CFCBBA7544083535303388C8CC1F2D5496F0FFBC273C3673EBFED7B66B2FCAD3EE3B7A6441301FDDAAC7E659&originRegion=eu-west-1&originCreation=20220527153008) ]] --- # Forest fires 2 Whilst somewhat more complex with additional variables and analysis this approach is still being used...e.g. .pull-left[ 9 parameters in creating a fire action plan for Ecuador... Fire severity - **Landsat-8 OLI** 2014 and 2020 `\(dNDVI = pre NDVI − post NDVI\)` `\(dNBR = NBRpre − NBRpost\)` (similar to NDVI) Verified from field visits Call this a severity model? but kept the indices separate Used this to designate safe escape routes.. ] .pull-right[ <img src="img/action_plan.png" width="80%" /> .small[Source:[Morante-Carballo et al. 2022](https://www.mdpi.com/2072-4292/14/8/1783) ]] --- class: inverse, center, middle # Which variables used remote sensing? -- ## Only the severity which wasn't even overlaid directly -- ## The study was somewhat confusing with a focus on severity (the aim) which then changed to a fire action plan that didn't show severity as a factor -- ## No method was given for the action plan development --- # Combining this into a model... [**Modeling the relationships between historical redlining, urban heat, and heat-related emergency department visits: An examination of 11 Texas cities**, Li et al. 2022](https://journals.sagepub.com/doi/10.1177/23998083211039854) Data: * Red lined districts .shp (more on this in future lecture) * Social vulnerability factors from American community survey: population aged 65 and older, non-White population, Hispanic population, lower-income population, individuals living alone, and populations who do not speak English well. * Normalised by population * Visit to emergency departments for heat related illness * LST data from the ECO2LSTE product within the 1 June and 31 August 2018–2020 window * **One daytime and one nighttime imagery set** with best quality flags were selected for each city (Figure 2), and summary measures such as mean daytime/nighttime LST, minimum daytime/nighttime LST, and maximum daytime/nighttime LST were determined with reference to ZCTA boundaries --- class: center, middle ## Not clear what a set is ? ## A single image? --- # Combining this into a model...2 Methods: * spatial autoregressive model (SAR) instead * this means models that contain geogrpahic areas like... Lag and error model * this means spatial regression! * recall from [CASA0005](https://andrewmaclachlan.github.io/CASA0005repo/explaining-spatial-patterns.html) * lag = include values of near by polygons * error = residuals of values in near polygons Modelling: * LST * heat-related ED visits Output: * "these results suggest that inequalities in urban heat island conditions exist not only between the historically defined redlined and non-redlined zones but also between contemporary geographic units that contain more versus fewer historically redlined areas." --- class: center, middle ## Refresher... ## In what circumstance might we use a spatial regression model? -- ## Where are residuals (errors) in linear regression are spatially autocorrelated (e.g. from Moran's I telling us how similar nearby objects our based on a weight matrix) --- # The key .pull-left[ * The key is *usually* **combining the remote sensing data** with GIS or other datasets to answer questions * The remotely sensed data is consistent over days, months and years * Often papers don't: * Link to population / people * Say how we can inform policy... ] .pull-right[ **For example** * Where should initiatives be targeted for reducing air pollution * What areas / population are most at risk from forest fires or where should remediation be targeted * How can illegal monitoring be most effectively stopped ] --- # The key in detail.. > Our findings suggest that these challenges are distributed unevenly, and that historically redlined neighborhoods bear a disproportionately heavy burden. Existing heat-hazard prevention and mitigation plans are mostly based on entire region or city-level conditions, **while few policies and initiatives pay attention to the inequalities rooted in long-standing spatial patterns of disinvestment and segregation in cities**. Understanding how disparities in heat-related health conditions may have emerged through historical housing segregation can focus attention and resources on redressing these structural inequalities Questions / critical reflection: * If i am a city planner how can we start to address this * What areas should i start with (funding often limited) * What stage in the planning process might this come * Who would be responsible (e.g. what department) * What skills do they need * What benefits can this bring to the city (often finances!) * How does this help the city align with global agendas * What stakeholders do i need to consider --- # The key in detail.. Often these considerations and questions are easily achievable from the data we have... For example... * The regression models will have produced Coefficient estimates * They represent a one unit change in the independent ($x$) represents a drop or rise in dependent ($y$) - note this study didn't show this. * In spatial regression we can also compute direct and indirect effects due to the lag * We will have the spatial data for these variables....that we can map ... * We also have the Coefficient t-value: * greater the relative effect that particular independent variable is having on the dependent variable --- # Example of integrating analysis... <img src="img/fbuil-06-519599-g005.jpg" width="80%" style="display: block; margin: auto;" /> .small[Source:[MacLachlan et al. 2021](https://www.frontiersin.org/articles/10.3389/fbuil.2020.519599/full)] --- class: inverse, center, middle ## We will explore methods in the next few weeks ## But first we will explore policy to understand where remote sensing data can be applied. --- # Global policy documents * New Urban Agenda = standards and principles for planning, construction, development, management and urban improvement An example of commitments... Environmentally sustainable and resilient urban development subsection .panelset[ .panel[.panel-name[point 64] > We also recognize that urban centres worldwide, especially in developing countries, often have characteristics that make them and their inhabitants especially vulnerable to the adverse impacts of climate change and other natural and human-made hazards, > **including earthquakes, extreme weather events, flooding, subsidence, storms, including dust and sand storms, heatwaves, water scarcity, droughts, water and air pollution, vector-borne diseases and sea level rise,** > which particularly affect coastal areas, delta regions and small island developing States, among others. ] .panel[.panel-name[point 65] > We commit ourselves to facilitating the > **sustainable management of natural resources in cities and human settlements in a manner that protects and improves the urban ecosystem and environmental services, reduces greenhouse gas emissions and air pollution and promotes disaster risk reduction and management**, >by supporting the development of disaster risk reduction strategies and periodical assessments of disaster risk caused by natural and human-made hazards, including standards for risk levels.. ] .panel[.panel-name[point 67] >We commit ourselves to promoting the creation and maintenance of well-connected and well distributed networks of > **open, multipurpose, safe, inclusive, accessible, green and quality public spaces, to improving the resilience of cities to disasters and climate change, including floods, drought risks and heat waves** > to improving food security and nutrition, physical and mental health, and household and ambient air quality, to reducing noise and promoting attractive and liveable cities, human settlements and urban landscapes and to prioritizing the conservation of endemic species. ] ] --- # Global policy documents * Sustainable Development Goals (SDG) = targets with measurable indicators for monitoring * Full indicators and notes on [SDG indicators](https://unstats.un.org/sdgs/metadata/?Text=&Goal=11&Target=) .panelset[ .panel[.panel-name[Goal 11] * Goal 11: Make cities and human settlements inclusive, safe, resilient and sustainable ] .panel[.panel-name[Target 11.5] * Target 11.5: By 2030, significantly reduce the number of deaths and the number of people affected and substantially decrease the direct economic losses relative to global gross domestic product caused by disasters, including water-related disasters, with a focus on protecting the poor and people in vulnerable situations ] .panel[.panel-name[Monitoring 11.5] * 11.5.1 Number of deaths, missing persons and directly affected persons attributed to disasters per 100,000 population * 11.5.2 Direct economic loss attributed to disasters in relation to global gross domestic product (GDP) * 11.5.3 (a) Damage to critical infrastructure and (b) number of disruptions to basic services, attributed to disasters ] .panel[.panel-name[Data 11.5] * 11.5.1 (and .2) Data provider at national level is appointed Sendai Framework Focal Points. In most countries disaster **data are collected by line ministries and national disaster loss databases are established and managed by special purpose agencies including national disaster management agencies, civil protection agencies, and meteorological agencies**. The Sendai Framework Focal Points in each country are responsible of data reporting through the Sendai Framework Monitoring System. * 11.5.3 National disaster loss database, reported to UNISDR...**Not every country has a comparable national disaster loss database that is consistent with these guidelines** (although current coverage exceeds 89 countries). Therefore, by 2020, it is expected that all countries will build/adjust national disaster loss databases according to the recommendations and guidelines by the OEIWG. ] ] --- class: inverse, center, middle # Positives and negatives with this guidance? ??? All about monitoring, doesn't say how to do it...but this is changing --- # Global policy documents Some new additions that have included spatial data...e.g... .panelset[ .panel[.panel-name[Target 11.7] By 2030, provide universal access to safe, inclusive and accessible, green and public spaces, in particular for women and children, older persons and persons with disabilities * Indicator 11.7.1: Average share of the built-up area of cities that is open space for public use for all, by sex, age and persons with disabilities > Satellite imagery (open sources), documentation outlining publicly owned land and community-based maps are the main sources of data. But...EO is included... > High resolution satellite imagery or Google Earth imagery can be used in this analysis. Open data sources such as OpenStreetMap (OSM) have some polygon data on open spaces in many cities ] .panel[.panel-name[Target 11.6] By 2030, reduce the adverse per capita environmental impact of cities, including by paying special attention to air quality and municipal and other waste management * Indicator 11.6.2: Annual mean levels of fine particulate matter (e.g. PM2.5 and PM10) in cities (population weighted) > Sources of data include ground measurements from monitoring networks, collected for 3,000 cities and localities (WHO 2016) around the world, satellite remote sensing, population estimates... > estimated with improved modelling using data integration from satellite remote sensing, population estimates, topography and ground measurements (WHO, 2016a; Shaddick et al, 2016) * The paper by Shaddick is hard to follow with no code. ] .panel[.panel-name[Reflections] These are two examples but comment on the complexity of the approaches.. * Who are they targeted at, what end user * Who could replicate them * Are they useful - how could the results be used ] ] --- # Metropolitan policy documents Under the theme of disaster (flooding, landslides, drought, heatwaves etc) .panelset[ .panel[.panel-name[London] **Increasing efficiency and resilience** * These environmental threats are real and present, and London must be prepared for them. London’s homes and infrastructure must be protected against the increasing likelihood of heatwaves, and developments must plan for a more integrated approach to water management, while minimising flood risk. **Policy SI 12 Flood risk management ** * Development Plans should use the Mayor’s Regional Flood Risk Appraisal and their Strategic Flood Risk Assessment as well as Local Flood Risk Management Strategies, where necessary, to identify areas where particular and cumulative flood risk issues exist and develop actions and policy approaches aimed at reducing these risks. .panel[.panel-name[OneNYC 2050] * References the sustainable development goals * Has a hazards matrix <img src="img/NYC.png" width="40%" style="display: block; margin: auto;" /> .small[Source:[oneNYC](https://1w3f31pzvdm485dou3dppkcq-wpengine.netdna-ssl.com/wp-content/uploads/2019/11/OneNYC-2050-A-Livable-Climate-11.7.pdf) ]] ] .panel[.panel-name[OneNYC 2050 2] * Discusses coastal resiliency as an example of rising sea levels and flooding...BUT?..how do they do it? .pull-left[ <img src="img/floods1.png" width="70%" style="display: block; margin: auto;" /> ] .pull-right[ <img src="img/floods2.png" width="70%" style="display: block; margin: auto;" /> ] .small[Source:[oneNYC](https://1w3f31pzvdm485dou3dppkcq-wpengine.netdna-ssl.com/wp-content/uploads/2019/11/OneNYC-2050-A-Livable-Climate-11.7.pdf) ]] .panel[.panel-name[Cape Town] [Cape Town Municipal Spatial Development Framework](https://www.capetown.gov.za/work%20and%20business/planning-portal/regulations-and-legislations/cape-town-spatial-development-framework#section-docs). Scroll to document downloads. * 2015-2018 "worst recorded drought in the city’s history, is a stark reminder that all cities will need to become more robust, resilient and efficient" * "The Cape Town Spatial Development Framework (CTSDF) was approved in May 2012 and established a long-term spatial vision and policy framework for the City after extensive technical drafting and public participation." * "Careful management of development to avoid developing in high flood risk areas" States policies and their requirements ...BUT...HOW.... * Ollie and I wrote a [paper on Cape Town's response to COVID that demonstrates the challenges within government.](https://www.mdpi.com/2071-1050/15/3/1853) ] .panel[.panel-name[Ahmedabad] * 2010 severe heatwave leading to 1,344 additional deaths * [2016 Heat Action Plan](https://www.nrdc.org/sites/default/files/ahmedabad-heat-action-plan-2016.pdf): * Awareness and outreach * Early warning system * Capacity of health care professionals * Reduce heat exposure and promote adaptive mesaures ...and mapping high risk areas, although mapping was removed later in the document (page 11) * Doesn't seem to appear in the publications, although spatial analysis is listed as a long term opportunity in the second paper: - [Development and Implementation of South Asia’s First Heat-Health Action Plan in Ahmedabad (Gujarat, India)](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4024996/) - [Rising Temperatures, Deadly Threat: Recommendations for Ahmedabad’s Government Officials](https://www.nrdc.org/sites/default/files/india-heat-government-officials-IB.pdf) ] ] --- # Local policy documents In most of the previous examples the documents were created by the metropolitan government: * Greater London Authority * Ahmedabad Municipal Corporation * City of New York Usually these are considered an upper tier They set the strategic plan for the city and may have other responsibilities such as fire, policing, transport and development guidelines. Lower tier government then carries out or adheres to these goals, for example.... * The Western Australian Planning Commission sets the statutory planning guidance that is carried out by local cities, such as the City of Perth and City of Fremantle. * The Greater London Authority set the strategic goals for London with London Boroughs providing local services. --- # Local policy documents 2 **BUT** there are variations to this rule.. .panelset[ .panel[.panel-name[City of Cape Town] * The City of Cape Town is a metropolitan municipality or Category A municipality, there is no local municipality below it. * However, **above** the City of Cape Town is the Provincial government that is responsible for topics such as: agriculture, education, health and public housing. As such the City sets it's own development plan and then implements it (whilst adhering to relevant Provincial topics). ] .panel[.panel-name[New York] * City of New York is responsible for public education, correctional institutions, public safety, recreational facilities, sanitation, water supply, and welfare services * 5 Boroughs under it act as spokespeople * City Council has 51 members from districts of about 157,000 * New York City is responsible for setting and enacting the policy. State government is above it. ] ] --- # Summary * Wide variety of EO data that could be used * Some studies fail to integrate their outputs with requirements of local areas, governments or cities with generic statements * What use is it? * Cities set policies but often focus on legislation or monitoring as opposed to prevention.... * How can we achieve their goals and improve urban areas more effectively in a data informed manner ?