class: title-slide, center, top background-image: url(data:image/png;base64,#img/LopezBrach_RioAdentro_titleslide.png) background-size: cover # <span style="color: white;">Obtaining reproducible reports on satellite hotspot data during a wildfire disaster</span> ### <span style="color: lightgrey;">Natalia Morandeira</span> .right[.tiny[Picture by [Sebastián López Brach](https://www.instagram.com/lopezbrachs/), "RÃo Adentro" project]] --- class: chapter-slide # <span style="color: SteelBlue;">Environmental topic</span> ### <span style="color: grey;">Background</span> --- ### Floodplain wetlands in South America + More than 20% of South America is covered by wetlands. + The dynamics of large floodplain wetlands (of the Amazonas, Orinoco and Paraná River) depend on flood pulses and climatic conditions. .center[<img src="data:image/png;base64,#img/LETyE_ParanaRiver.png" width="90%" alt="Aerial view of the Paraná River floodplain in Argentina. High water level: the floodplain has vigorous vegetation, shallow lakes and open-water"/>] .right[.tiny[Aerial view of the Paraná River floodplain in 2010, high water level. _Picture: LETyE-3iA-UNSAM archive_]] --- ### Wildfires in the Paraná River floodplain 🇦🇷 + In 2020, the Paraná River floodplain suffered from a severe drought. .center[<img src="data:image/png;base64,#img/LopezBrach_RioAdentro_dryfloodplain.png" width="85%" alt="Aerial view of the Paraná River floodplain in Argentina. The floodplain has dry vegetation except for two forest strips, dry shallow lakes and small areas with open-water. Some smoke from a fire is also seen"/>] .right[.tiny[Aerial view of the Paraná River floodplain in 2020, extremely low water level. _Picture: Sebastián López Brach_]] --- ### Wildfires in the Paraná River floodplain 🇦🇷 + The floodplain was subject to extended fires affecting at least **329,000 ha** (14% of the Paraná River Delta, 52% belonging to natural protected areas). .center[<img src="data:image/png;base64,#img/LopezBrach_RioAdentro_smoke.png" width="85%" alt="Aerial view of the Paraná River floodplain in Argentina. Dry vegetation, three shallow lakes and a watercourse, with a lot of dense smoke from fires"/>] .right[.tiny[Aerial view of the Paraná River floodplain in 2020. _Picture: Sebastián López Brach_]] --- class: chapter-slide # <span style="color: SteelBlue;">Satellite thermal hotspots</span> ### <span style="color: grey;">Spatial data</span> --- ### Satellite thermal hotspots products 🔥 .pull-left[ + **Physical background**: the energy emitted by the Earth in the Thermal Infrared wavelenght is related to surface temperature. + **Remote sensing:** Sensors on-board of satellites can measure the thermal infrared emissivity. + **Thermal hotspots:** very hot pixels are probably related to active fires.] -- .pull-right[ <span style="color: red;">**Fire hotspot products**</span> are shared within ca. 3 hours of the satellite observations by the Fire Information for Resource Management System (FIRMS-NASA). Freely accessible. .center[<img src="data:image/png;base64,#img/firms2.png" width="100%" alt="Screenshot of the FIRMS-NASA webpage, showing hotspots on the Paraná River Delta."/>] ] --- ### Hotspot products and sensor resolution #### Active fire in the Paraná River Delta .center[<img src="data:image/png;base64,#img/LopezBrach_RioAdentro_activefire1.png" width="75%" alt="Active fire, aerial photograph: smoke and flames"/>] .right[.tiny[_Picture: Sebastián López Brach_]] --- ### Hotspot products and sensor resolution **Example: low resolution sensor**, .center[<img src="data:image/png;base64,#img/activefire2.png" width="75%" alt="Active fire, aerial photograph: smoke and flames. Grided with 4 x 4 cells"/>] .right[.tiny[_Background picture: Sebastián López Brach_]] --- ### Hotspot products and sensor resolution **Example: low resolution sensor**, few <span style="color: red;">hotspots</span> corresponding to large hot areas .center[<img src="data:image/png;base64,#img/activefire3.png" width="75%" alt="Active fire, aerial photograph: smoke and flames. Grided with 4 x 4 cells, 10 pixels flagged as hotspots"/>] .right[.tiny[_Background picture: Sebastián López Brach_]] --- ### Hotspot products and sensor resolution **Example: medium resolution sensor**, .center[<img src="data:image/png;base64,#img/activefire4.png" width="75%" alt="Active fire, aerial photograph: smoke and flames. Grided with 8 x 9 cells"/>] .right[.tiny[_Background picture: Sebastián López Brach_]] --- ### Hotspot products and sensor resolution **Example: low resolution sensor**, more <span style="color: red;">hotspots</span> corresponding to smaller hot areas .center[<img src="data:image/png;base64,#img/activefire5.png" width="75%" alt="Active fire, aerial photograph: smoke and flames. Grided with 8 x 9 cells, 38 pixels flagged as hotspots"/>] .right[.tiny[_Background picture: Sebastián López Brach_]] --- class: chapter-slide # <span style="color: SteelBlue;">Spatial data assimilation and bilingual reports</span> ### <span style="color: grey;">Workflow: reproducible and automated</span> --- ### Monitoring an on-fire situation Quick analyses of the evolving disaster were needed. Peers & journalists asked for updated information. The lockdown and the fires prevented fieldwork, but satellite information was available and our lab has been conducting studies in the area for 20 years. .center[<img src="data:image/png;base64,#img/thisisfine.png" width="85%" alt="First two panels of the comic 'On fire'. The first panel shows a dog wearing a nice hat and having a cup of coffee, its house is on fire (flames and smoke all around the dog). The dog seems quiet, sit by a table. The second panel is a detail of the same scene and the dog says "This is fine" with flames on its back."/>] .right[.tiny["On fire" (first two panels), _comic by KC Green_]] --- ### Monitoring an on-fire situation .center[<img src="data:image/png;base64,#img/thisisnotfine.png" width="80%" alt="In the center, last panel of the comic 'On fire'. The dog is melting and burning. No house: just flames, smoke and a grassland behind the dog. In the background, a collage with multiple dissemination articles in several journals and in social networks. The collage is illustrative, not intended to be read in detail --some articles are in English and some in Spanish, only fragments are shown. Follow the link on the caption for an extended list of articles."/>] .right[.tiny["On fire" (last panel), _comic by KC Green_, on top of dissemination articles, posts on social networks and talks where info generated by this project were used. [Full list here](https://github.com/nmorandeira/Fires_ParanaRiverDelta#links-of-published-articles-interviews-and-talks-during-2020).]] --- ### Reproducible analysis and reports on R .pull-left[ #### <span style="color: SteelBlue;">Instructions for an end-user 1. Have a polygon layer of your study area in the _/data/study_area/_ folder. Just the 1st time! 1. Download the **zipped** [FIRMS-NASA data](https://firms.modaps.eosdis.nasa.gov/) and save them in the _/data/zip/_ folder of your R Project. <img src="data:image/png;base64,#img/firms.png" width="100%" alt="Screenshot of the FIRMS-NASA webpage, showing hotspots on the Paraná River Delta."/>] -- .pull-right[ <br><br> <span>3.</span> Knitr .center[<img src="data:image/png;base64,#img/code.png" width="130%" alt="Screenshot of the Rmd code highlighting the three steps mentioned in the slide."/>]] --- ### Processing steps in the workflow .pull-left[ #### <span style="color: SteelBlue;">a) File and geometric operations</span> 1. **Reading zip files** in a given folder. 1. **Unzipping** the data. 1. Reading the hotspot point shapefiles and creating **spatial objects**. 1. Look for **string patterns** in the name files (str_detect function) to create meaningful hotspot objects. A study area polygon shapefile was also read. 1. **Geometric operations**: merging the hotspot spatial objects, reprojection, clipping to the study area. 1. Plot an **interactive map** of the 2020 VIIRS hotspots. 1. Exporting hotspot objects to geopackages.] .pull-right[ <br><br> .center[<img src="data:image/png;base64,#img/hexstickers.png" width="80%" alt="Hex stickers: RStudio, rmarkdown, tidyverse, ggplot2, sf."/>] <span style="color: grey;">_Other libraries can be used to import MODIS imagery, but not for dealing with FIRMS-NASA products (APMK)_</span>] --- ### Processing steps in the script .pull-left[ #### <span style="color: SteelBlue;">b) Data tidying and plots </span> 1. Data **cleaning** and **tidying** operations on attribute tables. 1. Select the 2020 VIIRS hotspots, compute the daily and the cumulative number of hotspots. 1. **Plots** (English and Spanish): Daily hotspots; Cumulative hotspots. Export png versions. 1. **Compute the number of VIIRS hotspots** per month. Plot and export. Report the month with the highest proportion of potential active fires. 1. **Annual comparison:** VIIRS and MODIS number of active fire records per year. Plot and export. 1. **Generate reports:** English and Spanish versions (html or pdf).] .pull-right[ .center[<img src="data:image/png;base64,#img/informe_html.gif" width="120%" alt="Gif animation scrolling on an html Spanish report with several plots. It's not intended to be read, just illustrative. The main plots are shown in the next slides."/>] <br> <img src="data:image/png;base64,#img/2minutos.png" width="10%" alt="logo of the Argentinian punk rock band 2 minutos ("2 minutes")."/> <span style="color: SteelBlue;">**Processing time:**</span> less than 2 minutes (1:38'; in a 16 GB i7 laptop) ] --- ### Highlights of the 2020 Paraná River Delta fires .center[<img src="data:image/png;base64,#img/tmap.png" width="65%" alt="Map. Dots showing daily hotstpots on the Paraná River Delta, the background layer is OpenStreetMap. Most of the Paraná River Delta area is covered by dots"/>] .right[.tiny[2020 VIIRS hotspots in the Paraná River Delta. Screenshot of the interacive map generated with _tmap_ library]] --- ### Highlights of the 2020 Paraná River Delta fires + The number of VIIRS hotspots recorded in 2020 was 39,821. + The month with the highest number of hotspots was August, with 15,841 VIIRS hotspots (39.8% of the total hotspots recorded in 2020). .center[<img src="data:image/png;base64,#img/Hotspot_daily_2020-12-31.png" width="95%" alt="Map. Dots showing daily hotstpots on the Paraná River Delta, the background layer is OpenStreetMap. Most of the Paraná River Delta area is covered by dots"/>] --- ### Highlights of the 2020 Paraná River Delta fires + The number of VIIRS hotspots recorded in 2020 was 39,821. + The month with the highest number of hotspots was August, with 15,841 VIIRS hotspots (39.8% % of the total hotspots recorded in 2020). .center[<img src="data:image/png;base64,#img/Hotspot_cum_2020-12-31.png" width="95%" alt="Map. Dots showing daily hotstpots on the Paraná River Delta, the background layer is OpenStreetMap. Most of the Paraná River Delta area is covered by dots"/>] --- ### Historical fires in the Paraná River Delta .pull-left[ **VIIRS data** 2012 - present. Resolution: 375 m. The **39,821** hotspots recorded in 2020 were the highest in the last 9 years. .center[<img src="data:image/png;base64,#img/activefire5.png" width="80%" alt="Active fire, aerial photograph: smoke and flames. Grided with 4 x 4 cells, 10 pixels flagged as hotspots"/>] ] -- .pull-right[ **MODIS data** November 2001 - present. Resolution: 1 km. The **8,673** hotspots recorded in 2020 were the highest since 2009. .center[<img src="data:image/png;base64,#img/activefire3.png" width="80%" alt="Active fire, aerial photograph: smoke and flames. Grided with 4 x 4 cells, 10 pixels flagged as hotspots"/>] ] --- ### Historical fires in the Paraná River Delta **MODIS data** The cumulative MODIS hotspots recorded in 2020 were 8,673, the highest number of hotspots since 2008. .center[<img src="data:image/png;base64,#img/MODIS_20012020_EN.png" width="90%" alt="Barchart showing the annual number of MODIS hotspots: 2001, 132; 2002, 559; 2003, 1023; 2004, 6687; 2005, 267; 2006, 6065; 2007, 267; 2008, 13780; 2009 to 2019, less than 1000 per year; 2020, 8673 hotspots"/>] --- ### Future work + Analyze the relation between historical fire activity and **hydroclimatic trends**. + **Estimations of burned areas**, from thermal hotspots and optical remote sensing imagery (_e.g._ using growing regions with the _RSAGA_ library and the synthetic index Normalized Burn Ratio from Sentinel-2 or Landsat 8-OLI). .center[<img src="data:image/png;base64,#img/LopezBrach_RioAdentro_burned.png" width="72%" alt="Burned grasslands in the Paraná River floodplain"/>] .right[.tiny[Burned areas in the Paraná River floodplain in 2020. _Picture: Sebastián López Brach_]] --- ### Thanks for your attention! ¡Gracias! .center[**Natalia Morandeira**<br/> nmorandeira@unsam.edu.ar <svg viewBox="0 0 496 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> [Github repo of this project](https://github.com/nmorandeira/Fires_ParanaRiverDelta) [![DOI](data:image/png;base64,#https://zenodo.org/badge/286583706.svg)](https://zenodo.org/badge/latestdoi/286583706) 🇦🇷 Funding: ANPCyT - MinCyT PICT 2017-1256 🕸[Personal webpage](https://nmorandeira.netlify.app/) <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg> [@Nat\_Mora_](https://twitter.com/Nat_Mora_)] The 2020 pictures belong to a photographic-essay project by **Sebastián López Brach**, funded by NatGeo. Check his awesome work! <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg> [RÃo Adentro](https://www.instagram.com/lopezbrachs/) .center[<img src="data:image/png;base64,#img/LopezBrach_RioAdentro_last.png" width="85%" alt="Fire in the Paraná River flooplain, picture from the river"/> ]