diff --git a/ExtremeHeat.docx b/ExtremeHeat.docx deleted file mode 100644 index 08e2ad6ab..000000000 Binary files a/ExtremeHeat.docx and /dev/null differ diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 000000000..0f05b8e47 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,35 @@ +--- +title: "Land Surface Temperature 2022, Twin Cities" +date: "`r format(Sys.time(), '%d %B %Y')`" +output: + github_document: + toc: no +always_allow_html: yes +urlcolor: blue +--- + +This code repository is an attachment [for the resource on the Minnesota Geospatial Commons entitled Land Surface Temperature 2022, Twin Cities](https://gisdata.mn.gov/dataset/us-mn-state-metc-env-cva-lst2022). This repository contains javascript code to create and processes a high-resolution (10 meter) dataset on land surface temperatures from September 1, 2022 for the Twin Cities. + +This repository contains a folder "javascript_codes" where you can find JavaScript Google Earth Engine (GEE) code used to process and create the downscaled land surface temperature derived from Landsat thermal sensing using the spectral bands of Sentinel-2. The "r_postprocessing" file contains R scripts to post-processes the results of the downscaled raster data. + +## A brief description of the methodology: + +High resolution (10 meter) land surface temperature (LST) from September 1, 2022 is mapped for the seven-county metropolitan region of the Twin Cities. The goal of the map is to show the heat differences across the region and is not intended to show the maximum temperature that any specific area can reach. The raster dataset was computed at 30 meters using satellite imagery from Landsat 9 and downscaled to 10 meters using Copernicus Sentinel-2. These datasets were integrated using techniques modified from Ermida et al. 2020 and Onačillová et al. 2022). Open water was removed using ancillary data from OpenStreetMap and 2020 Generalized Land Use for the Twin Cities (Metropolitan Council). + +First, Landsat 9 imagery taken at 11:59 am CDT on September 01, 2022 was processed into 30-meter resolution LST (based on Ermida et al. 2020). At this time, the air temperature was 88° F at the Minneapolis-St. Paul International Airport (NOAA). A model predicting LST based on spectral indices of Normalized Difference Vegetation Index (NDVI), Normalized Difference Water Index (NDWI), and Normalized Difference Built-up Index (NDBI) was created and applied to 10-meter Sentenel-2 imagery. Sentinel-2 imagery was also taken on September 1, 2022, and this resulted in a 10-meter downscaled LST image (based on Onačillová et al. 2022). To account for anomalies in NDVI on the primary image date of September 1 (e.g., recently harvested agricultural fields), maximum NDVI occurring between July 1, 2022 and September 1, 2022 was used for both Landsat and Sentinel image processing. Water bodies were removed for all processing steps (OpenStreetMap 2023, Metropolitan Council 2021). + +This dataset is an update to the [2016 LST data for the Twin Cities Region (Metropolitan Council)](https://gisdata.mn.gov/dataset/us-mn-state-metc-env-cva-lst2016). + +### Sources: + +Ermida, S.L., Soares, P., Mantas, V., Göttsche, F.-M., Trigo, I.F., 2020. Google Earth Engine open-source code for Land Surface Temperature estimation from the Landsat series. Remote Sensing, 12 (9), 1471; [https://doi.org/10.3390/rs12091471](https://doi.org/10.3390/rs12091471). + +Metropolitan Council. 2021. Generalized Land Use 2020. Minnesota Geospatial Commons. [https://gisdata.mn.gov/dataset/us-mn-state-metc-plan-generl-lnduse2020](https://gisdata.mn.gov/dataset/us-mn-state-metc-plan-generl-lnduse2020) + +Metropolitan Council. 2017. Land Surface Temperature 2016, Twin Cities. Minnesota Geospatial Commons. [https://gisdata.mn.gov/dataset/us-mn-state-metc-env-cva-lst2016](https://gisdata.mn.gov/dataset/us-mn-state-metc-env-cva-lst2016) + +NOAA, National Oceanic and Atmospheric Administration, National Centers for Environmental Information, station USW00014922. September 1, 2022. + +Onačillová, K., Gallay, M., Paluba, D., Péliová, A., Tokarčík, O., Laubertová, D. 2022. Combining Landsat 8 and Sentinel 2 data in Google Earth Engine to derive higher resolution land surface temperature maps in urban environment. Remote Sensing, 14 (16), 4076. [https://doi.org/10.3390/rs14164076](https://doi.org/10.3390/rs14164076). + +OpenStreetMap contributors. 2023. Retrieved from [https://planet.openstreetmap.org](https://planet.openstreetmap.org) on April 12, 2023. diff --git a/README.md b/README.md index ed00af9bf..486966b9e 100644 --- a/README.md +++ b/README.md @@ -1 +1,76 @@ -# extreme.heat \ No newline at end of file +Land Surface Temperature 2022, Twin Cities +================ +18 July 2023 + +This code repository is an attachment [for the resource on the Minnesota +Geospatial Commons entitled Land Surface Temperature 2022, Twin +Cities](https://gisdata.mn.gov/dataset/us-mn-state-metc-env-cva-lst2022). +This repository contains javascript code to create and processes a +high-resolution (10 meter) dataset on land surface temperatures from +September 1, 2022 for the Twin Cities. + +This repository contains a folder “javascript_codes” where you can find +JavaScript Google Earth Engine (GEE) code used to process and create the +downscaled land surface temperature derived from Landsat thermal sensing +using the spectral bands of Sentinel-2. The “r_postprocessing” file +contains R scripts to post-processes the results of the downscaled +raster data. + +## A brief description of the methodology: + +High resolution (10 meter) land surface temperature (LST) from September +1, 2022 is mapped for the seven-county metropolitan region of the Twin +Cities. The goal of the map is to show the heat differences across the +region and is not intended to show the maximum temperature that any +specific area can reach. The raster dataset was computed at 30 meters +using satellite imagery from Landsat 9 and downscaled to 10 meters using +Copernicus Sentinel-2. These datasets were integrated using techniques +modified from Ermida et al. 2020 and Onačillová et al. 2022). Open water +was removed using ancillary data from OpenStreetMap and 2020 Generalized +Land Use for the Twin Cities (Metropolitan Council). + +First, Landsat 9 imagery taken at 11:59 am CDT on September 01, 2022 was +processed into 30-meter resolution LST (based on Ermida et al. 2020). At +this time, the air temperature was 88° F at the Minneapolis-St. Paul +International Airport (NOAA). A model predicting LST based on spectral +indices of Normalized Difference Vegetation Index (NDVI), Normalized +Difference Water Index (NDWI), and Normalized Difference Built-up Index +(NDBI) was created and applied to 10-meter Sentenel-2 imagery. +Sentinel-2 imagery was also taken on September 1, 2022, and this +resulted in a 10-meter downscaled LST image (based on Onačillová et +al. 2022). To account for anomalies in NDVI on the primary image date of +September 1 (e.g., recently harvested agricultural fields), maximum NDVI +occurring between July 1, 2022 and September 1, 2022 was used for both +Landsat and Sentinel image processing. Water bodies were removed for all +processing steps (OpenStreetMap 2023, Metropolitan Council 2021). + +This dataset is an update to the [2016 LST data for the Twin Cities +Region (Metropolitan +Council)](https://gisdata.mn.gov/dataset/us-mn-state-metc-env-cva-lst2016). + +### Sources: + +Ermida, S.L., Soares, P., Mantas, V., Göttsche, F.-M., Trigo, I.F., +2020. Google Earth Engine open-source code for Land Surface Temperature +estimation from the Landsat series. Remote Sensing, 12 (9), 1471; +. + +Metropolitan Council. 2021. Generalized Land Use 2020. Minnesota +Geospatial Commons. + + +Metropolitan Council. 2017. Land Surface Temperature 2016, Twin Cities. +Minnesota Geospatial Commons. + + +NOAA, National Oceanic and Atmospheric Administration, National Centers +for Environmental Information, station USW00014922. September 1, 2022. + +Onačillová, K., Gallay, M., Paluba, D., Péliová, A., Tokarčík, O., +Laubertová, D. 2022. Combining Landsat 8 and Sentinel 2 data in Google +Earth Engine to derive higher resolution land surface temperature maps +in urban environment. Remote Sensing, 14 (16), 4076. +. + +OpenStreetMap contributors. 2023. Retrieved from + on April 12, 2023. diff --git a/Google Earth Engine/ASTER_bare_emiss.js b/javascript_codes/ASTER_bare_emiss.js similarity index 100% rename from Google Earth Engine/ASTER_bare_emiss.js rename to javascript_codes/ASTER_bare_emiss.js diff --git a/Google Earth Engine/LST_Sept2022_TwinCities.js b/javascript_codes/LST_Sept2022_TwinCities.js similarity index 100% rename from Google Earth Engine/LST_Sept2022_TwinCities.js rename to javascript_codes/LST_Sept2022_TwinCities.js diff --git a/Google Earth Engine/Landsat_LST.js b/javascript_codes/Landsat_LST.js similarity index 100% rename from Google Earth Engine/Landsat_LST.js rename to javascript_codes/Landsat_LST.js diff --git a/Google Earth Engine/NCEP_TWP.js b/javascript_codes/NCEP_TWP.js similarity index 100% rename from Google Earth Engine/NCEP_TWP.js rename to javascript_codes/NCEP_TWP.js diff --git a/Google Earth Engine/SMW_coefficients.js b/javascript_codes/SMW_coefficients.js similarity index 100% rename from Google Earth Engine/SMW_coefficients.js rename to javascript_codes/SMW_coefficients.js diff --git a/Google Earth Engine/SMWalgorithm.js b/javascript_codes/SMWalgorithm.js similarity index 100% rename from Google Earth Engine/SMWalgorithm.js rename to javascript_codes/SMWalgorithm.js diff --git a/Google Earth Engine/cloudmask.js b/javascript_codes/cloudmask.js similarity index 100% rename from Google Earth Engine/cloudmask.js rename to javascript_codes/cloudmask.js diff --git a/Google Earth Engine/compute_FVC.js b/javascript_codes/compute_FVC.js similarity index 100% rename from Google Earth Engine/compute_FVC.js rename to javascript_codes/compute_FVC.js diff --git a/Google Earth Engine/compute_NDVI.js b/javascript_codes/compute_NDVI.js similarity index 100% rename from Google Earth Engine/compute_NDVI.js rename to javascript_codes/compute_NDVI.js diff --git a/Google Earth Engine/compute_emissivity.js b/javascript_codes/compute_emissivity.js similarity index 100% rename from Google Earth Engine/compute_emissivity.js rename to javascript_codes/compute_emissivity.js diff --git a/Google Earth Engine/water_features.zip b/javascript_codes/water_features.zip similarity index 100% rename from Google Earth Engine/water_features.zip rename to javascript_codes/water_features.zip diff --git a/ExtremeHeat.Rmd b/r_postprocessing/ExtremeHeat.Rmd similarity index 98% rename from ExtremeHeat.Rmd rename to r_postprocessing/ExtremeHeat.Rmd index a4ad3d795..7011593b4 100644 --- a/ExtremeHeat.Rmd +++ b/r_postprocessing/ExtremeHeat.Rmd @@ -37,13 +37,13 @@ The goal of the 2023 update on extreme heat is to do a major addition to the exi # Community specific temperatures ```{r} -ctus <- read_csv(file.path(here::here(), "data-raw/ExtremeHeat2022_ctus_max.csv"), +ctus <- read_csv(file.path(here::here(), "r_postprocessing/data-raw/ExtremeHeat2022_ctus_max.csv"), col_select = c(CTU_NAME, LST = max_LST)) %>% add_column(type = "max_LST") %>% - bind_rows(read_csv(file.path(here::here(), "data-raw/ExtremeHeat2022_ctus_min.csv"), + bind_rows(read_csv(file.path(here::here(), "r_postprocessing/data-raw/ExtremeHeat2022_ctus_min.csv"), col_select = c(CTU_NAME, LST = min_LST)) %>% add_column(type = "min_LST")) %>% - bind_rows(read_csv(file.path(here::here(), "data-raw/ExtremeHeat2022_ctus_mean.csv"), + bind_rows(read_csv(file.path(here::here(), "r_postprocessing/data-raw/ExtremeHeat2022_ctus_mean.csv"), col_select = c(CTU_NAME, LST = mean_LST)) %>% add_column(type = "mean_LST")) %>% mutate(LST = stringr::str_remove_all(LST, "\\{LST=|\\}|null"), @@ -52,7 +52,7 @@ ctus <- read_csv(file.path(here::here(), "data-raw/ExtremeHeat2022_ctus_max.csv" arrange(CTU_NAME) %>% select(CTU_NAME, min_LST, mean_LST, max_LST) -write_csv(ctus, file = file.path(here::here(), "figs/ctu_average.csv")) +write_csv(ctus, file = file.path(here::here(), "r_postprocessing/figs/ctu_average.csv")) ctus %>% @@ -76,7 +76,7 @@ ctus %>% labs(title = "Average temperature (land surface 2022)") # geom_pointrange() -ggsave(file = file.path(here::here(), "figs/ctu_average.png"), +ggsave(file = file.path(here::here(), "r_postprocessing/figs/ctu_average.png"), height = 20, width = 6) ``` @@ -659,7 +659,7 @@ filter(df, type == "Income", variable == "income_median") %>% plot.caption = element_text(vjust = -3, size = 7)) + scale_x_continuous(labels = scales::dollar) -ggsave(filename = file.path(here::here(), "figs/income_heat.png"), height = 4, width = 6) +ggsave(filename = file.path(here::here(), "r_postprocessing/figs/income_heat.png"), height = 4, width = 6) ``` diff --git a/MapTool.Rmd b/r_postprocessing/MapTool.Rmd similarity index 100% rename from MapTool.Rmd rename to r_postprocessing/MapTool.Rmd diff --git a/R/demographics.R b/r_postprocessing/R/demographics.R similarity index 100% rename from R/demographics.R rename to r_postprocessing/R/demographics.R diff --git a/R/geos_included.R b/r_postprocessing/R/geos_included.R similarity index 100% rename from R/geos_included.R rename to r_postprocessing/R/geos_included.R diff --git a/R/heat.R b/r_postprocessing/R/heat.R similarity index 100% rename from R/heat.R rename to r_postprocessing/R/heat.R diff --git a/R/past_weather.R b/r_postprocessing/R/past_weather.R similarity index 100% rename from R/past_weather.R rename to r_postprocessing/R/past_weather.R diff --git a/R/water.R b/r_postprocessing/R/water.R similarity index 100% rename from R/water.R rename to r_postprocessing/R/water.R diff --git a/data-raw/ExtremeHeat2022_blockgroups2020.csv b/r_postprocessing/data-raw/ExtremeHeat2022_blockgroups2020.csv similarity index 100% rename from data-raw/ExtremeHeat2022_blockgroups2020.csv rename to r_postprocessing/data-raw/ExtremeHeat2022_blockgroups2020.csv diff --git a/data-raw/ExtremeHeat2022_ctus_max.csv b/r_postprocessing/data-raw/ExtremeHeat2022_ctus_max.csv similarity index 100% rename from data-raw/ExtremeHeat2022_ctus_max.csv rename to r_postprocessing/data-raw/ExtremeHeat2022_ctus_max.csv diff --git a/data-raw/ExtremeHeat2022_ctus_mean.csv b/r_postprocessing/data-raw/ExtremeHeat2022_ctus_mean.csv similarity index 100% rename from data-raw/ExtremeHeat2022_ctus_mean.csv rename to r_postprocessing/data-raw/ExtremeHeat2022_ctus_mean.csv diff --git a/data-raw/ExtremeHeat2022_ctus_min.csv b/r_postprocessing/data-raw/ExtremeHeat2022_ctus_min.csv similarity index 100% rename from data-raw/ExtremeHeat2022_ctus_min.csv rename to r_postprocessing/data-raw/ExtremeHeat2022_ctus_min.csv diff --git a/data/GEE_MSP_HeatHistory.csv b/r_postprocessing/data/GEE_MSP_HeatHistory.csv similarity index 100% rename from data/GEE_MSP_HeatHistory.csv rename to r_postprocessing/data/GEE_MSP_HeatHistory.csv diff --git a/data/demographics.rda b/r_postprocessing/data/demographics.rda similarity index 100% rename from data/demographics.rda rename to r_postprocessing/data/demographics.rda diff --git a/data/heat.rda b/r_postprocessing/data/heat.rda similarity index 100% rename from data/heat.rda rename to r_postprocessing/data/heat.rda diff --git a/data/metro_stations_daily.rda b/r_postprocessing/data/metro_stations_daily.rda similarity index 100% rename from data/metro_stations_daily.rda rename to r_postprocessing/data/metro_stations_daily.rda diff --git a/data/msp_daily.rda b/r_postprocessing/data/msp_daily.rda similarity index 100% rename from data/msp_daily.rda rename to r_postprocessing/data/msp_daily.rda diff --git a/data/msp_temps.rda b/r_postprocessing/data/msp_temps.rda similarity index 100% rename from data/msp_temps.rda rename to r_postprocessing/data/msp_temps.rda diff --git a/data/water_features.zip b/r_postprocessing/data/water_features.zip similarity index 100% rename from data/water_features.zip rename to r_postprocessing/data/water_features.zip diff --git a/figs/.png b/r_postprocessing/figs/.png similarity index 100% rename from figs/.png rename to r_postprocessing/figs/.png diff --git a/figs/Age.png b/r_postprocessing/figs/Age.png similarity index 100% rename from figs/Age.png rename to r_postprocessing/figs/Age.png diff --git a/figs/Communications.png b/r_postprocessing/figs/Communications.png similarity index 100% rename from figs/Communications.png rename to r_postprocessing/figs/Communications.png diff --git a/figs/Households.png b/r_postprocessing/figs/Households.png similarity index 100% rename from figs/Households.png rename to r_postprocessing/figs/Households.png diff --git a/figs/Income.png b/r_postprocessing/figs/Income.png similarity index 100% rename from figs/Income.png rename to r_postprocessing/figs/Income.png diff --git a/figs/Language.png b/r_postprocessing/figs/Language.png similarity index 100% rename from figs/Language.png rename to r_postprocessing/figs/Language.png diff --git a/figs/Race.png b/r_postprocessing/figs/Race.png similarity index 100% rename from figs/Race.png rename to r_postprocessing/figs/Race.png diff --git a/figs/Tenure.png b/r_postprocessing/figs/Tenure.png similarity index 100% rename from figs/Tenure.png rename to r_postprocessing/figs/Tenure.png diff --git a/figs/ctu_average.csv b/r_postprocessing/figs/ctu_average.csv similarity index 100% rename from figs/ctu_average.csv rename to r_postprocessing/figs/ctu_average.csv diff --git a/figs/ctu_average.png b/r_postprocessing/figs/ctu_average.png similarity index 100% rename from figs/ctu_average.png rename to r_postprocessing/figs/ctu_average.png diff --git a/figs/income_heat.png b/r_postprocessing/figs/income_heat.png similarity index 100% rename from figs/income_heat.png rename to r_postprocessing/figs/income_heat.png diff --git a/figs/mn-heat-deaths.png b/r_postprocessing/figs/mn-heat-deaths.png similarity index 100% rename from figs/mn-heat-deaths.png rename to r_postprocessing/figs/mn-heat-deaths.png diff --git a/heatmap.png b/r_postprocessing/heatmap.png similarity index 100% rename from heatmap.png rename to r_postprocessing/heatmap.png