Closed SanderDevisscher closed 4 months ago
It occurs when the selected dataset contains municipalities which are assigned to different provinces. I've now updated the code such that it no longer takes the length but sum of 'aantal' in that case. This was the reason that reported numbers were so small (length instead of sum).
@SanderDevisscher Ideally this should be also fixed in the data at the back-end. E.g. in 2020 I found
# file "rshiny_reporting_data_geography_processed.parquet"
geoData <- loadRawData(type = "geo")
subGeoData <- unique(geoData[!is.na(geoData$gemeente_afschot_locatie) & geoData$afschotjaar == 2020 & geoData$provincie %in% c("Limburg", "Antwerpen"), c("gemeente_afschot_locatie", "provincie")])
selectGemeentes <- which(duplicated(subGeoData$gemeente_afschot_locatie))
subGeoData[subGeoData$gemeente_afschot_locatie %in% subGeoData$gemeente_afschot_locatie[selectGemeentes], ]
# # A tibble: 4 × 2
# gemeente_afschot_locatie provincie
# <chr> <fct>
# 1 Lommel Limburg
# 2 Tessenderlo Limburg
# 3 Tessenderlo Antwerpen
# 4 Lommel Antwerpen
hmm this issue has been fixed in the backoffice but it hasn't been deployed yet see https://github.com/inbo/reporting-rshiny-grofwildjacht/issues/456#issuecomment-1980772005.
Describe the bug When downloading data from the kencijfers table (dashboard > populatie > Tabel kencijfers) for the year 2020 you get a lot of 1's and some 2s but nothing higher in both observations & animal shot. While according to the map there are communes with more boars shot. for example in Beringen there were 148 boars shot in 2020. When looking at the data for other years then 2020 the downloaded data seems ok. I've not done a in depth investigation.
To Reproduce Steps to reproduce the behavior:
Expected behavior a csv is downloaded with correct number of individuals shot/observed for the selected year