inbo / reporting-rshiny-grofwildjacht

Rshiny app for grofwildjacht
https://grofwildjacht.inbo.be/
MIT License
1 stars 1 forks source link

[BUG] TABEL: Aantal schadegevallen per type schade: numbers of columns of arguments do not match #487

Open SanderDevisscher opened 1 month ago

SanderDevisscher commented 1 month ago

Describe the bug When looking at the TABEL: Aantal schadegevallen per type schade with Data bron == "E-loket (ANB)" I get a message displaying numbers of columns of arguments do not match.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'faunabeheer.inbo.be' or 'faunabeheer-dev.inbo.be'
  2. Click on 'wildschade'
  3. Select Wild zwijn with all types of schade
  4. Scroll down to 'TABEL: Aantal schadegevallen per type schade'
  5. See error
  6. Set 'Data bron != "E-loket (ANB)"' the error disappears
  7. Set 'Data bron == "E-loket (ANB)"' the error reappears

Expected behavior Graph is displayed also when Data bron == "E-loket (ANB)"

Screenshots image

image

Additional context No similar errors exists with other graphs that allows setting data bron

Git SHA (after 0.3.1) d6d14c6037ed6b3462988acbc0e282f4b8f0ae0f

lcougnaud commented 3 days ago

There is a (maybe) related issue: the current function assumes that the schade code are unique across schade basis code. However, the 'WLSCHD' code seems to be available in the basis code: 'Andere' and 'Gewas', e.g. for 'Wild Zwijn':

         locatie schadeCode schadeBasisCode freq
1        Limburg     WLSCHD          ANDERE   18
2        Limburg     WLSCHD           GEWAS 1707
3 Vlaams Brabant     WLSCHD          ANDERE    4
4 Vlaams Brabant     WLSCHD           GEWAS  172

Is this expected? If so, the function should be updated to handle this scenario.

SanderDevisscher commented 2 days ago

This indeed is not expected ! W'll fix this in the backoffice.