Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Jul 26, 2024
1 parent a31dfac commit cfa2c8c
Show file tree
Hide file tree
Showing 14 changed files with 3,654 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e5786886
ca29e417
1,074 changes: 1,041 additions & 33 deletions interactive-deforestation-map.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion search.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"href": "interactive-deforestation-map.html",
"title": "Interactive Deforestation Map",
"section": "",
"text": "This script downloads WDPA data for a specified country and generates a web map displaying the selected protected areas (PAs) including a buffer region around it. Please adjust the params object in the YAML header to your requirements.\n\n\nCode\nbasemap_custom <-\n leaflet() |>\n # add external map providers\n addTiles(group = \"OpenStreetMap\") |>\n addProviderTiles(providers$Esri.WorldImagery, group=\"Satellite\") |>\n addProviderTiles(providers$CartoDB.Positron, group=\"CartoDB\") |>\n addProviderTiles(providers$Esri.WorldShadedRelief, group=\"Topography\") |>\n addProviderTiles(providers$NASAGIBS.ViirsEarthAtNight2012, group=\"Nightlights\") |>\n addTiles(\n \"https://tiles.globalforestwatch.org/umd_tree_cover_loss/latest/dynamic/{z}/{x}/{y}.png\",\n group = \"Forest Cover Loss (2001-2020)\",\n attribution = \"Hansen, M. C., P. V. Potapov, R. Moore, M. Hancher, S. A. Turubanova, A. Tyukavina, D. Thau, S. V. Stehman, S. J. Goetz, T. R. Loveland, A. Kommareddy, A. Egorov, L. Chini, C. O. Justice, and J. R. G. Townshend. 2013. “High-Resolution Global Maps of 21st-Century Forest Cover Change.” Science 342 (15 November): 850–53. Data available on-line from: http://earthenginepartners.appspot.com/science-2013-global-forest.\"\n ) |>\n addTiles(\n \"https://tiles.globalforestwatch.org/umd_regional_primary_forest_2001/latest/dynamic/{z}/{x}/{y}.png\",\n group = \"Regional Primary Forests (2001)\",\n attribution = \"Hansen, M. C., P. V. Potapov, R. Moore, M. Hancher, S. A. Turubanova, A. Tyukavina, D. Thau, S. V. Stehman, S. J. Goetz, T. R. Loveland, A. Kommareddy, A. Egorov, L. Chini, C. O. Justice, and J. R. G. Townshend. 2013. “High-Resolution Global Maps of 21st-Century Forest Cover Change.” Science 342 (15 November): 850–53. Data available on-line from: http://earthenginepartners.appspot.com/science-2013-global-forest.\"\n ) |>\n addFullscreenControl() |>\n # add legend(s)\n addLayersControl(\n baseGroups = c(\"Satellite\", \"CartoDB\", \"OpenStreetMap\", \"Topography\", \"Nightlights\"),\n overlayGroups = c(\"Protected Area\", \"Buffer Zone\", \"Forest Cover Loss (2001-2020)\", \"Regional Primary Forests (2001)\"),\n options = layersControlOptions(collapsed = FALSE)) |>\n # uncheck some layers in layer control\n hideGroup(group = c(\"Regional Primary Forests (2001)\",\"Labels (PA Names)\"))\n\ndeforestation_map <- basemap_custom |>\n addPolygons(data = buffer, fillOpacity = 0.0, opacity = 0.8, color = params$col_bf, smoothFactor = 0, weight =params$lwd_bf, group = \"Buffer Zone\",\n dashArray = \"10 8\") |>\n addPolygons(data = wdpa, fillOpacity = 0.0, opacity = 1.0, color = params$col_pa, smoothFactor = 0, weight = params$lwd_pa, group = \"Protected Area\")\n\n\n\n\n\n\n\n\n\n\nFound a column named 'assetid'. Overwritting its values with a unique identifier.\n\n\nWarning in check_namespace(\"progressr\", error = FALSE): R package 'progressr' required.\nPlease install via `install.packages('progressr')`FALSE\n\n\nWarning in .check_single_asset(result, chunk):\n\n\n\nLoss of forest cover over time\n\n\nCode\nggplot(data = inds) +\n geom_col(aes(x=datetime, y=losses, fill=buffer), position=ifelse(params$stacked, \"stack\", \"dodge\")) +\n labs(x = \"Year\", y = \"Forest cover losses (in ha)\", fill = \"Zone\") +\n scale_x_datetime(date_breaks = \"1 year\", date_labels = \"%Y\") +\n scale_fill_manual(values = c(params$col_pa, params$col_bf)) +\n theme_classic() +\n theme(\n axis.title=element_text(size=16),\n axis.text=element_text(size=14),\n axis.text.x=element_text(angle=60, hjust=1),\n legend.position=\"bottom\"\n )"
"text": "This document can be used to visualize a single protected area from the World Database on Protected Areas (WDPA) on an interactive web map. The map displays the selected protected areas (PAs) including a buffer region around it. The barplot shows the amount of forest cover loss over time for the PA itself as well as for the buffer zone around it. You can adjust the params object in the YAML header to your requirements.\n\n\nCode\nbasemap_custom <-\n leaflet() |>\n # add external map providers\n addTiles(group = \"OpenStreetMap\") |>\n addProviderTiles(providers$Esri.WorldImagery, group=\"Satellite\") |>\n addProviderTiles(providers$CartoDB.Positron, group=\"CartoDB\") |>\n addProviderTiles(providers$Esri.WorldShadedRelief, group=\"Topography\") |>\n addProviderTiles(providers$NASAGIBS.ViirsEarthAtNight2012, group=\"Nightlights\") |>\n addTiles(\n \"https://tiles.globalforestwatch.org/umd_tree_cover_loss/latest/dynamic/{z}/{x}/{y}.png\",\n group = \"Forest Cover Loss (2001-2020)\",\n attribution = \"Hansen, M. C., P. V. Potapov, R. Moore, M. Hancher, S. A. Turubanova, A. Tyukavina, D. Thau, S. V. Stehman, S. J. Goetz, T. R. Loveland, A. Kommareddy, A. Egorov, L. Chini, C. O. Justice, and J. R. G. Townshend. 2013. “High-Resolution Global Maps of 21st-Century Forest Cover Change.” Science 342 (15 November): 850–53. Data available on-line from: http://earthenginepartners.appspot.com/science-2013-global-forest.\"\n ) |>\n addTiles(\n \"https://tiles.globalforestwatch.org/umd_regional_primary_forest_2001/latest/dynamic/{z}/{x}/{y}.png\",\n group = \"Regional Primary Forests (2001)\",\n attribution = \"Hansen, M. C., P. V. Potapov, R. Moore, M. Hancher, S. A. Turubanova, A. Tyukavina, D. Thau, S. V. Stehman, S. J. Goetz, T. R. Loveland, A. Kommareddy, A. Egorov, L. Chini, C. O. Justice, and J. R. G. Townshend. 2013. “High-Resolution Global Maps of 21st-Century Forest Cover Change.” Science 342 (15 November): 850–53. Data available on-line from: http://earthenginepartners.appspot.com/science-2013-global-forest.\"\n ) |>\n addFullscreenControl() |>\n # add legend(s)\n addLayersControl(\n baseGroups = c(\"Satellite\", \"CartoDB\", \"OpenStreetMap\", \"Topography\", \"Nightlights\"),\n overlayGroups = c(\"Protected Area\", \"Buffer Zone\", \"Forest Cover Loss (2001-2023)\", \"Regional Primary Forests (2001)\"),\n options = layersControlOptions(collapsed = FALSE)) |>\n # uncheck some layers in layer control\n hideGroup(group = c(\"Regional Primary Forests (2001)\",\"Labels (PA Names)\"))\n\ndeforestation_map <- basemap_custom |>\n addPolygons(data = buffer, fillOpacity = 0.0, opacity = 0.8, color = params$col_bf, smoothFactor = 0, weight =params$lwd_bf, group = \"Buffer Zone\",\n dashArray = \"10 8\") |>\n addPolygons(data = wdpa, fillOpacity = 0.0, opacity = 1.0, color = params$col_pa, smoothFactor = 0, weight = params$lwd_pa, group = \"Protected Area\")\n\n\n\n\n\n\n\n\n\nLoss of forest cover over time\n\n\nCode\nplt <- ggplot(data = inds) +\n geom_col(aes(x=datetime, y=losses, fill=buffer), position=ifelse(params$stacked, \"stack\", \"dodge\")) +\n labs(x = \"Year\", y = \"Forest cover losses (in ha)\", fill = \"Zone\") +\n scale_x_datetime(date_breaks = \"1 year\", date_labels = \"%Y\") +\n scale_fill_manual(values = c(params$col_pa, params$col_bf)) +\n theme_classic() +\n theme(\n axis.title=element_text(size=16),\n axis.text=element_text(size=14),\n axis.text.x=element_text(angle=60, hjust=1),\n legend.position=\"bottom\"\n ) \n\nggplotly(plt)"
}
]
1 change: 1 addition & 0 deletions site_libs/crosstalk-1.2.1/css/crosstalk.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cfa2c8c

Please sign in to comment.