Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unrecognized faunabeheerzone gemeente in wildschade #478

Open
mvarewyck opened this issue Jun 13, 2024 · 0 comments
Open

[BUG] Unrecognized faunabeheerzone gemeente in wildschade #478

mvarewyck opened this issue Jun 13, 2024 · 0 comments
Assignees
Labels
backoffice issue met betrekking tot data kwaliteit bug

Comments

@mvarewyck
Copy link
Collaborator

Describe the bug
In the wildschade data there are many (1029) records for which the fbz_gemeente is not available/unknown in the spatial data. This is because the assigned 'FaunabeheerZone' is wrong.

To Reproduce

> schadeData <- loadRawData(type = "wildschade")
> readS3(file = "spatialData_sf.RData")
> subSpatial <- spatialData$fbz_gemeentes
> 
> toCheck <- schadeData$fbz_gemeente[!schadeData$fbz_gemeente %in% subSpatial$NAAM]
> toCheck <- unique(toCheck[!is.na(toCheck)])
> length(toCheck)
[1] 1029
> head(sort(toCheck))
[1] "1_Aalter"    "1_Aarschot"  "1_Alken"     "1_Antwerpen" "1_As"       
[6] "1_Assenede" 

It's due to the assigned FaunabeheerZone

> schadeData[grep("Stekene", schadeData$fbz_gemeente), c("fbz_gemeente", "ID", "gemeente_afschot_locatie", "FaunabeheerZone")]
# A tibble: 12 × 4
   fbz_gemeente ID                        gemeente_afschot_loc…¹ FaunabeheerZone
   <chr>        <chr>                     <chr>                  <chr>          
 1 4_Stekene    856832-559                Stekene                4              
 2 4_Stekene    856832-560                Stekene                4              
 3 4_Stekene    695928-39                 Stekene                4              
 4 4_Stekene    853936-244                Stekene                4              
 5 4_Stekene    NP-202743482              Stekene                4              
 6 4_Stekene    NP-167845908              Stekene                4              
 7 4_Stekene    NP-186309836              Stekene                4              
 8 4_Stekene    NP-192102648              Stekene                4              
 9 9_Stekene    NP-212846457              Stekene                9              
10 6_Stekene    NP-212846458              Stekene                6              
11 5_Stekene    NP-255012457              Stekene                5              
12 4_Stekene    3af1373a-76c3-4557-b4ef-… Stekene                4              

Expected behavior
We check whether all locations are available in the spatial data, so currently the R CMD check fails

Git SHA (after 0.3.1)
a9d6da8

@mvarewyck mvarewyck added the bug label Jun 13, 2024
@SanderDevisscher SanderDevisscher added the backoffice issue met betrekking tot data kwaliteit label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backoffice issue met betrekking tot data kwaliteit bug
Projects
None yet
Development

No branches or pull requests

3 participants