── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): TierID, TierName
dbl (3): CollarID, E, N
dttm (1): DatetimeUTC
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
feldaufnahmen <-read_sf("Feldaufnahmen_Fanel.gpkg")#schnelle Darstellung einer Spalteplot(feldaufnahmen["Frucht"])
What information does the dataset contain?
Polygons depicting different kind of crops
What ist the geomatry type of the dataset?
Polygons
What is the coodinate system of the dataset?
CH1903+
Task 2
wildschwein_BE <- wildschwein_BE %>%filter(month(DatetimeUTC) %in%c(5, 6)) wildschwein_BE2 <-st_join(wildschwein_BE, feldaufnahmen)# for every location of wildboar, info for type of land coverwildschewein_BE3 <-st_join(feldaufnahmen, wildschwein_BE)# get polygon back -> this join not useful in this case# to verify if at same place -> for quick look at dataplot(feldaufnahmen["Frucht"])plot(st_geometry(wildschwein_BE), add =TRUE)
`summarise()` has grouped output by 'TierName', 'hour'. You can override using
the `.groups` argument.
wildschwein_smry %>%ggplot(aes(hour, perc, fill = Frucht))+geom_col() +facet_wrap(~TierName)
wildschwein_BE2 <- wildschwein_BE2 %>%mutate(hour =hour(ymd_hms(DatetimeUTC))) %>%group_by(TierName, hour, Frucht) %>%summarise(count =n(), .groups ="drop") %>%group_by(TierName, hour) %>%mutate(percentage = count /sum(count) *100)ggplot(wildschwein_BE2, aes(x = hour, y = percentage, fill = Frucht)) +geom_area(position ="stack") +facet_wrap(~TierName) +# Creates separate panels for each wild boartheme_minimal() +labs(x ="Time (rounded to the nearest hour)",y ="Percentage",fill ="Frucht" )
Task 4
veg <-rast("vegetationshoehe_LFI.tif")plot(veg, main ="Vegetation Height")
# high resolution vegetationlibrary(tmap)tmap_mode("plot")
ℹ tmap mode set to "plot".
tm_shape(veg) +tm_raster(palette =terrain.colors(10), title ="Vegetation Height [m]") +tm_layout(legend.outside =TRUE)
── tmap v3 code detected ───────────────────────────────────────────────────────
[v3->v4] `tm_tm_raster()`: migrate the argument(s) related to the scale of the
visual variable `col` namely 'palette' (rename to 'values') to col.scale =
tm_scale(<HERE>).[v3->v4] `tm_raster()`: migrate the argument(s) related to the legend of the
visual variable `col` namely 'title' to 'col.legend = tm_legend(<HERE>)'SpatRaster object downsampled to 2753 by 3634 cells.