Skip to content

Commit

Permalink
added paper and master thesis
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzmo committed Nov 27, 2023
1 parent 2ad7f67 commit 7544fe0
Show file tree
Hide file tree
Showing 11 changed files with 960 additions and 53 deletions.
6 changes: 3 additions & 3 deletions docs/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -2670,7 +2670,7 @@ <h3>${suggestion.title}</h3>
}</style>
<!--/radix_placeholder_distill-->
<script src="site_libs/header-attrs-2.25/header-attrs.js"></script>
<script src="site_libs/htmlwidgets-1.6.2/htmlwidgets.js"></script>
<script src="site_libs/htmlwidgets-1.6.3/htmlwidgets.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<link href="site_libs/leaflet-1.3.1/leaflet.css" rel="stylesheet" />
<script src="site_libs/leaflet-1.3.1/leaflet.js"></script>
Expand Down Expand Up @@ -2791,8 +2791,8 @@ <h3 id="how-to-contact-us">How to contact us?</h3>
D-10315 Berlin, Germany</p>
<p><br></p>
<div class="layout-chunk" data-layout="l-screen-inset shaded">
<div class="leaflet html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-ecc29d1e25bda39ce606" style="width:624px;height:384px;"></div>
<script type="application/json" data-for="htmlwidget-ecc29d1e25bda39ce606">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"setView":[[52.5062,13.5211],14,[]],"calls":[{"method":"addProviderTiles","args":["CartoDB.Voyager",null,"Default Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":[null,null,"Terrain Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":["CartoDB.DarkMatter",null,"Dark Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addTiles","args":["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,"OpenStreetMap",{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"https://openstreetmap.org/copyright/\">OpenStreetMap<\/a>, <a href=\"https://opendatacommons.org/licenses/odbl/\">ODbL<\/a>"}]},{"method":"addPopups","args":[52.50628618988399,13.52116715397431,"<b>Leibniz Institute for<br>Zoo and Wildlife Research<\/b>",null,null,{"maxWidth":300,"minWidth":50,"autoPan":true,"keepInView":false,"closeButton":false,"className":""}]},{"method":"addLayersControl","args":[["Default Map","Terrain Map","Dark Map","OpenStreetMap"],[],{"collapsed":false,"autoZIndex":true,"position":"topright"}]}],"limits":{"lat":[52.50628618988399,52.50628618988399],"lng":[13.52116715397431,13.52116715397431]}},"evals":[],"jsHooks":[]}</script>
<div class="leaflet html-widget html-fill-item" id="htmlwidget-486220605101fad2573c" style="width:624px;height:384px;"></div>
<script type="application/json" data-for="htmlwidget-486220605101fad2573c">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"setView":[[52.5062,13.5211],14,[]],"calls":[{"method":"addProviderTiles","args":["CartoDB.Voyager",null,"Default Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":[null,null,"Terrain Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":["CartoDB.DarkMatter",null,"Dark Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addTiles","args":["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,"OpenStreetMap",{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"https://openstreetmap.org/copyright/\">OpenStreetMap<\/a>, <a href=\"https://opendatacommons.org/licenses/odbl/\">ODbL<\/a>"}]},{"method":"addPopups","args":[52.50628618988399,13.52116715397431,"<b>Leibniz Institute for<br>Zoo and Wildlife Research<\/b>",null,null,{"maxWidth":300,"minWidth":50,"autoPan":true,"keepInView":false,"closeButton":false,"className":""}]},{"method":"addLayersControl","args":[["Default Map","Terrain Map","Dark Map","OpenStreetMap"],[],{"collapsed":false,"autoZIndex":true,"position":"topright"}]}],"limits":{"lat":[52.50628618988399,52.50628618988399],"lng":[13.52116715397431,13.52116715397431]}},"evals":[],"jsHooks":[]}</script>
</div>
<p><br><br></p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div>
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2670,7 +2670,7 @@ <h3>${suggestion.title}</h3>
}</style>
<!--/radix_placeholder_distill-->
<script src="site_libs/header-attrs-2.25/header-attrs.js"></script>
<script src="site_libs/htmlwidgets-1.6.2/htmlwidgets.js"></script>
<script src="site_libs/htmlwidgets-1.6.3/htmlwidgets.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<link href="site_libs/leaflet-1.3.1/leaflet.css" rel="stylesheet" />
<script src="site_libs/leaflet-1.3.1/leaflet.js"></script>
Expand Down Expand Up @@ -2816,8 +2816,8 @@ <h2 class="appendix" id="contact">Contact</h2>
Coordination: Dr. Conny Landgraf<br />
<a href="mailto:assist6@izw-berlin.de">assist6[at]izw-berlin.de</a></p>
<div class="layout-chunk" data-layout="l-screen-inset shaded">
<div class="leaflet html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-eba91ea2a62ad1949ed6" style="width:650px;height:400px;"></div>
<script type="application/json" data-for="htmlwidget-eba91ea2a62ad1949ed6">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"setView":[[52.5062,13.5211],4,[]],"calls":[{"method":"addProviderTiles","args":["CartoDB.Voyager",null,"Default Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":["Stadia.StamenTerrain",null,"Terrain Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":["CartoDB.DarkMatter",null,"Dark Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addTiles","args":["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,"OpenStreetMap",{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"https://openstreetmap.org/copyright/\">OpenStreetMap<\/a>, <a href=\"https://opendatacommons.org/licenses/odbl/\">ODbL<\/a>"}]},{"method":"addPopups","args":[52.50628618988399,13.52116715397431,"<b>Leibniz Institute for<br>Zoo and Wildlife Research<\/b>",null,null,{"maxWidth":300,"minWidth":50,"autoPan":true,"keepInView":false,"closeButton":false,"className":""}]},{"method":"addLayersControl","args":[["Default Map","Terrain Map","Dark Map","OpenStreetMap"],[],{"collapsed":true,"autoZIndex":true,"position":"topright"}]}],"limits":{"lat":[52.50628618988399,52.50628618988399],"lng":[13.52116715397431,13.52116715397431]}},"evals":[],"jsHooks":[]}</script>
<div class="leaflet html-widget html-fill-item" id="htmlwidget-c669ec90508312fe6a4c" style="width:650px;height:400px;"></div>
<script type="application/json" data-for="htmlwidget-c669ec90508312fe6a4c">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"setView":[[52.5062,13.5211],4,[]],"calls":[{"method":"addProviderTiles","args":["CartoDB.Voyager",null,"Default Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":["Stadia.StamenTerrain",null,"Terrain Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addProviderTiles","args":["CartoDB.DarkMatter",null,"Dark Map",{"errorTileUrl":"","noWrap":false,"detectRetina":false}]},{"method":"addTiles","args":["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,"OpenStreetMap",{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"https://openstreetmap.org/copyright/\">OpenStreetMap<\/a>, <a href=\"https://opendatacommons.org/licenses/odbl/\">ODbL<\/a>"}]},{"method":"addPopups","args":[52.50628618988399,13.52116715397431,"<b>Leibniz Institute for<br>Zoo and Wildlife Research<\/b>",null,null,{"maxWidth":300,"minWidth":50,"autoPan":true,"keepInView":false,"closeButton":false,"className":""}]},{"method":"addLayersControl","args":[["Default Map","Terrain Map","Dark Map","OpenStreetMap"],[],{"collapsed":true,"autoZIndex":true,"position":"topright"}]}],"limits":{"lat":[52.50628618988399,52.50628618988399],"lng":[13.52116715397431,13.52116715397431]}},"evals":[],"jsHooks":[]}</script>
</div>
<h2 class="appendix" id="address">Address</h2>
<p>Leibniz Institute for Zoo and Wildlife Research<br />
Expand Down
3 changes: 2 additions & 1 deletion docs/msc-bsc-theses.html
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,8 @@ <h1>Msc/Bsc Theses</h1>
</div>
<p><br></p>
<ul>
<li><p>Larger tree diameter and high urbanisation level increases capture rates of red squirrels in Berlin. <strong>Alina Doreen Stemmer</strong>, <span class="desaturated">06.11.2023 MSc. FU Berlin, Department of Biology, Chemistry, Pharmacy, supervisors: S Kramer-Schadt, Sinah Drenske (IZW), Jonathan Jeschke (FU).</span></p></li>
<li><p>The acoustic communication of West African sabre-toothed frogs of the genus <em>Odontobatrachus</em> (<em>Anura</em>, <em>Odontiobatrachidae</em>). <strong>Saskia Piorecki</strong>, <span class="desaturated">03.11.2023 MSc. Fakultät VI Planen Bauen Umwelt, Institut für Ökologie der TU Berlin. Supervisors: S Kramer-Schadt, M.-O. Rödel (Museum für Naturkunde).</span></p></li>
<li><p>Larger tree diameter and high urbanisation level increases capture rates of red squirrels in Berlin. <strong>Alina Doreen Stemmer</strong>, <span class="desaturated">06.11.2023 MSc. FU Berlin, Department of Biology, Chemistry, Pharmacy. Supervisors: S Kramer-Schadt, Sinah Drenske (IZW), Jonathan Jeschke (FU).</span></p></li>
<li><p>Fine-scale movements and fitness: Feedback between foraging decisions and reproductive success of Common Starlings (<em>Sturnus vulgaris</em>). <strong>Johannes Till</strong>, <span class="desaturated">19.10.2023 BSc.
FU Berlin, Department of Biology, Chemistry and Pharmacy. Supervisors S Kramer-Schadt, M Grabow, Prof. Jens Rolff (FU).</span></p></li>
<li><p>Wildtiere in der Stadt: Die komplexe beziehung von Urbanisierung, menschlicher Wahrnehmung und Sozialökonomie. <strong>Titus M. Mußhoff</strong>, <span class="desaturated">30.08.2023 MSc.
Expand Down
2 changes: 1 addition & 1 deletion docs/posts/posts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"contents": "\r\n\r\nContents\r\nLoad {terra} package\r\nCreate example data\r\nAdd categorical column\r\nAdd numerical column\r\nMake the raster numerical\r\nCompare spatRasters\r\nCompare values\r\n\r\nCategorical rasters, such as land cover classes, can be tricky to deal with in R.\r\nImagine you get a raster (in {terra} the object is called spatRaster) with categories.\r\nIn {terra}, those categories are stored as labels. Additionally, a raster layer can have multiple labelling columns, in a way that we can activate the column with the information we want at the moment.\r\nFurthermore, we might want to operate with our rasters, for which we may need numerical values.\r\nFirst, we are going to see how to change or activate the labels to show in the categorical rasters.\r\nThen, we are going to see how to effectively transform this into numerical values.\r\nThe {Terra} changed the way how to do this compared to the {raster} package.\r\nHere are some tricks.\r\nLoad {terra} package\r\n\r\n\r\nlibrary(terra)\r\n\r\n\r\nCreate example data\r\nWe create a categorical raster as an example for our code\r\n\r\n\r\n# a simple spatRaster with 3 categories\r\nras <- rast(matrix(rep(c(\"forest\", \"farm\", \"urban\"), each = 3), nrow = 3, ncol = 3))\r\n\r\nras\r\n\r\nclass : SpatRaster \r\ndimensions : 3, 3, 1 (nrow, ncol, nlyr)\r\nresolution : 1, 1 (x, y)\r\nextent : 0, 3, 0, 3 (xmin, xmax, ymin, ymax)\r\ncoord. ref. : \r\nsource(s) : memory\r\ncategories : label \r\nname : lyr.1 \r\nmin value : farm \r\nmax value : urban \r\n\r\nplot(ras)\r\n\r\n\r\n\r\nOur new raster has the categories we gave it as the labels in the plot.\r\nHowever, internally this categories as associated with “Values”. To see how the internal “Values” relate to the label, we can call the table of categories for the raster\r\nvalue\r\n\r\n\r\n# this shows the categories and the numeric internal representative numeric value it automatically gets.\r\ncats(ras)\r\n\r\n[[1]]\r\n value label\r\n1 1 farm\r\n2 2 forest\r\n3 3 urban\r\n\r\nThis is something like a “master table” that tell the raster what to show.\r\nNow that we have access to it, we can transform it and add information as needed, for example reclassifying the classes of the data, and relink this information back to the raster object.\r\nAdd categorical column\r\nlets say you want to reclassify the data, you can add another column by using this:\r\n\r\n\r\nrecl_df <- cbind(as.data.frame(cats(ras)),\r\n data.frame(new_label = c(\"d\", \"f\", \"e\"))) # I shuffled the characters to show the difference in the end\r\n\r\n\r\n# the function `categories` links the new table we created to the raster and \"activates\" the column we want to use. \r\n# In this case the new added column called new_label. The column order is counted as the position of the column AFTER the Value column\r\nras_new_cat <- categories(ras, \r\n layer = 1, \r\n value = recl_df, \r\n active = 2) # column 2 (do not count the value column! It has to be numeric)\r\n\r\n# now our raster has two entries for the categories. We can select which one to show.\r\nras_new_cat\r\n\r\nclass : SpatRaster \r\ndimensions : 3, 3, 1 (nrow, ncol, nlyr)\r\nresolution : 1, 1 (x, y)\r\nextent : 0, 3, 0, 3 (xmin, xmax, ymin, ymax)\r\ncoord. ref. : \r\nsource(s) : memory\r\ncategories : label, new_label \r\nname : new_label \r\nmin value : d \r\nmax value : e \r\n\r\n\r\n\r\nplot(ras_new_cat)\r\n\r\n\r\n\r\nIf we want to go to the old labels, we just need to activate the old labels by indicating the column they are stored in {activeCat} function\r\n\r\n\r\nactiveCat(ras_new_cat) <- 1\r\nplot(ras_new_cat)\r\n\r\n\r\n\r\nAdd numerical column\r\nLet’s say we want to reclassify the spatRaster with a numeric value, we have to take one more step\r\nFirst, we add a column with the numerical value we want to our categorical raster “master table”\r\n\r\n\r\nrecl_df_num <- cbind(as.data.frame(cats(ras_new_cat)),\r\n new_value = c(5, 4, 6))\r\n\r\n# In this case the fourth (numeric) column will be activated\r\n\r\nras_new_cat_2 <- categories(ras, \r\n layer = 1, \r\n value = recl_df_num, \r\n active = 3) # column 4 (do not count the value column! It has to be numeric)\r\n\r\nplot(ras_new_cat_2)\r\n\r\n\r\n\r\nHere we see that the plot show us the numbers we just included, but the raster still reads then as categories\r\n\r\n\r\nras_new_cat_2\r\n\r\nclass : SpatRaster \r\ndimensions : 3, 3, 1 (nrow, ncol, nlyr)\r\nresolution : 1, 1 (x, y)\r\nextent : 0, 3, 0, 3 (xmin, xmax, ymin, ymax)\r\ncoord. ref. : \r\nsource(s) : memory\r\ncategories : label, new_label, new_value \r\nname : new_value \r\nmin value : 5 \r\nmax value : 6 \r\n\r\n# if we use a numerical call, like values for hte cells, we obtain an output that does not correspond with our new numbers\r\nvalues(ras_new_cat_2)\r\n\r\n new_value\r\n [1,] 2\r\n [2,] 1\r\n [3,] 3\r\n [4,] 2\r\n [5,] 1\r\n [6,] 3\r\n [7,] 2\r\n [8,] 1\r\n [9,] 3\r\n\r\nMake the raster numerical\r\nFor this we need the function called {catalyze} and the column in the “master table” that actually has the values we want to use as numeric.\r\nWe specify the column using the index parameter.\r\n\r\n\r\n# this function activates our desired column of the spatRaster\r\nras_new_num <- catalyze(ras_new_cat_2, index = 3) # column 3 for new_value\r\n\r\n# we select only the correct numerical column for the new raster\r\nras_new_num <- ras_new_num$new_value\r\n\r\n# only the numerical column is left\r\nras_new_num\r\n\r\nclass : SpatRaster \r\ndimensions : 3, 3, 1 (nrow, ncol, nlyr)\r\nresolution : 1, 1 (x, y)\r\nextent : 0, 3, 0, 3 (xmin, xmax, ymin, ymax)\r\ncoord. ref. : \r\nsource(s) : memory\r\nname : new_value \r\nmin value : 4 \r\nmax value : 6 \r\n\r\nplot(ras_new_num, type = \"continuous\") # with 'type' we decide to make numerical the legend\r\n\r\n\r\n\r\nCompare spatRasters\r\nLet’s compare the different spatRasters to see the differences\r\n\r\n\r\n\r\nAs you can see in the upper right plot that the categories got the internal count value from 1 to 3 instead of the given values.\r\nCompare values\r\nAnother way of checking if the correct numerical column is used is to show the categories in the spatRaster.\r\n\r\n\r\ncats(ras_new_cat_2)\r\n\r\n[[1]]\r\n value label new_label new_value\r\n1 1 farm d 5\r\n2 2 forest f 4\r\n3 3 urban e 6\r\n\r\ncats(ras_new_num)\r\n\r\n[[1]]\r\nNULL\r\n\r\nThe numeric spatRaster does not have any categories left, as expected.\r\n\r\n\r\n\r\n",
"preview": {},
"last_modified": "2023-11-20T10:54:12+01:00",
"last_modified": "2023-11-20T17:06:10+01:00",
"input_file": {}
},
{
Expand Down
Loading

0 comments on commit 7544fe0

Please sign in to comment.