inbo/reporting-rshiny-grofwildjacht

[Feature] Tabel kencijfers

SanderDevisscher opened this issue · 13 comments

Suggested Title

Tabel kencijfers

INFO:

ANB asked us to add the following information in table form (1 row per item):

  • Totaal aantal gemeenten: Number of communes with reported observations1 above the threshold2 for the selected year.
  • Dezelfde gemeentes: Number of communes with reported observations1 above the threshold2 for the selected year and the previous year followed by a list of the communes.
  • Nieuwe gemeentes: Number of communes with reported observations1 above the threshold2 for the selected year and below the threshold for the previous year followed by a list of the communes.
  • Niet meer in deze gemeentes: Number of communes with reported observations1 below the threshold2 for the selected year and above the threshold for the previous year followed by a list of the communes.

1 both afschot & observations
2 I suggest we add a threshold slider for observations allowing the user to decide how much weight they give to the observations. Default 1? min: 1 -> max: 10 ?

Position

  • Dashboard > populatie > Tabel kencijfers (levels province\flanders)

Description/Disclaimer

  • To discuss

Datacolumns

  • afschotjaar/jaar
  • provincie
  • ID/id
  • wildsoort/naam_nl
  • gemeente_afschot_locatie/gemeente

Filters

  • Jaar
  • Bron (afschot/waarnemingen)
  • Waarnemingen drempel (verdwijnt als !"waarnemingen" %in% Bron)

Code example

Layout example

Totaal aantal gemeenten31
Dezelfde gemeentes29As
Beringen
...
Nieuwe gemeentes2Alken
Borgloon
Niet meer in deze gemeentes1Tongeren

*dummy data

Additional Options

  • Download data
  • ...

Some related questions:
@mvarewyck how much time would you need to add this table ?
@mvarewyck is it possible to add this this year or at the latest early next year ?
@mvarewyck what is your current day cost ? I need this info to because ANB indicated they are willing to pay for additional features.

@jimcasaer @RuttenAnneleen @LynnPallemaerts can you help me with good descriptions ?
Do you have any additional suggestions/remarks ?

Some related questions:
@mvarewyck how much time would you need to add this table ?

3 days

@mvarewyck is it possible to add this this year or at the latest early next year ?

Yes we can.

@mvarewyck what is your current day cost ? I need this info to because ANB indicated they are willing to pay for additional features.

Tobias will contact you about this (PM).

I'll for finances from ANB for extra table

In branch feature#438 the following features are implemented

  • Slider input for both data source "waarnemingen" and "afschot", data is filtered >= threshold
    • for "waarnemingen", slider range is fixed at 1 to 10
    • for "afschot", slide range is 1 to max(10, maximum of the afschot aantal). This is pure cosmetic, as in the current data, the "afschot aantal" is always 1.
Screenshot 2023-12-07 at 09 43 24
  • If a municipality in the table exclusively from data source "waarnemingen", it gets a green background (color picked from inbo theme)
Screenshot 2023-12-07 at 09 44 37
  • The downloaded data now contains also the count for "waarnemingen" and "afschot" if available
Screenshot 2023-12-07 at 10 35 57
  • In the report, the table is present the same way as in the application
  • add detailed explanation of the table in "uiText.csv" (row: plotFunction "F18_8", column: "dash") @SanderDevisscher
  • for "afschot", slide range is 1 to max(10, maximum of the afschot aantal). This is pure cosmetic, as in the current data, the "afschot aantal" is always 1.

The fact "afschot aantal" is 1 for every commune is weird! How is this calculated ?

Other changes look good

I don't have the data prior to process @mvarewyck can you double check this?

> unique(geoData[geoData$dataSource == "afschot", "aantal"])
1

One tiny remark, we should be consequent with gemeentes & gemeenten both are viable but it should be on or the other. I would opt for gemeentes, meaning "Totaal aantal gemeenten" should become "Totaal aantal gemeentes"

@jimcasaer @LynnPallemaerts @RuttenAnneleen what do you guys think about this text (and layout)?:

  • Totaal aantal gemeentes : Totaal aantal gemeentes binnen de gekozen regio boven de drempelwaarde voor afschot en/of waarnemingen.
  • Dezelfde gemeentes : Aantal gemeentes binnen de gekozen regio die 2 opeenvolgende jaren1 boven de drempelwaarde van afschot en/of waarnemingen uitkomen.
  • Nieuwe gemeentes : Aantal gemeentes binnen de gekozen regio die voor het gekozen jaar boven de drempelwaarde van afschot en/of waarnemingen uitkomen en het voorgaande jaar onder de drempelwaarde.
  • Niet meer in deze gemeentes : Aantal gemeentes binnen de gekozen regio die voor het gekozen jaar onder de drempelwaarde van afschot en/of waarnemingen uitkomen en het voorgaande jaar boven de drempelwaarde.

    1Het gekozen jaar ten opzichte van het voorgaande.

    Door op de rij van deze tabel te klikken krijgt u een lijst van de gemeentes die aan de voorwaarden van de rij voldoen.
    Gemeentes die in het groen worden geaccentueerd voldoen enkel aan de drempelwaarde voor waarnemingen.
    Gemeentes die in het wit worden geaccentueerd voldoen aan beide dermpelwaardes.

het onderste lijkt met niet logisch
je zou dan drie kleuren moeten hebben (en liefst geen groen)

  • enkel drempelwaarde waarnemingen
  • enkel drempelwaarde afschot
  • beide

I don't have the data prior to process @mvarewyck can you double check this?

> unique(geoData[geoData$dataSource == "afschot", "aantal"])
1

It is correct that for geoData the aantal is always 1, as each row represents a single record in the data (
in contrast to waarnemingen). So, for the kencijfers table, we should now first calculate the total per region level of interest (i.e. calculating the sum of 'aantal' for each province/municipality selected).

Note: Previously this was no problem, as there was no threshold, so the actual 'afschot aantal' did not matter.

I don't have the data prior to process @mvarewyck can you double check this?

> unique(geoData[geoData$dataSource == "afschot", "aantal"])
1

It is correct that for geoData the aantal is always 1, as each row represents a single record in the data ( in contrast to waarnemingen). So, for the kencijfers table, we should now first calculate the total per region level of interest (i.e. calculating the sum of 'aantal' for each province/municipality selected).

Note: Previously this was no problem, as there was no threshold, so the actual 'afschot aantal' did not matter.

I see, thanks for spotting, I'll adapt the code.

@jimcasaer @LynnPallemaerts @RuttenAnneleen what do you guys think about this text (and layout)?:

  • Totaal aantal gemeentes : Totaal aantal gemeentes binnen de gekozen regio boven de drempelwaarde voor afschot en/of waarnemingen.
  • Dezelfde gemeentes : Aantal gemeentes binnen de gekozen regio die 2 opeenvolgende jaren1 boven de drempelwaarde van afschot en/of waarnemingen uitkomen.
  • Nieuwe gemeentes : Aantal gemeentes binnen de gekozen regio die voor het gekozen jaar boven de drempelwaarde van afschot en/of waarnemingen uitkomen en het voorgaande jaar onder de drempelwaarde.
  • Niet meer in deze gemeentes : Aantal gemeentes binnen de gekozen regio die voor het gekozen jaar onder de drempelwaarde van afschot en/of waarnemingen uitkomen en het voorgaande jaar boven de drempelwaarde.

    1Het gekozen jaar ten opzichte van het voorgaande.

    Door op de rij van deze tabel te klikken krijgt u een lijst van de gemeentes die aan de voorwaarden van de rij voldoen.
    Gemeentes die in het oranje worden geaccentueerd voldoen enkel aan de drempelwaarde voor waarnemingen.
    Gemeentes die in het wit worden geaccentueerd voldoen aan beide dermpelwaardes.
    Gemeentes die in het blauw worden geaccentueerd voldoen enkel aan de drempelwaarde voor afschot.

    @jimcasaer better like this ?
    @Yingjie-ZhangOA only waarnemingen: oranje == #ef8a62, both: wit == white & only afschot: blauw == #67a9cf