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

Updates v0.3.5 #484

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Updates v0.3.5 #484

wants to merge 18 commits into from

Conversation

mvarewyck
Copy link
Collaborator

Include latest changes before re-designing the app.

@mvarewyck mvarewyck self-assigned this Aug 23, 2024
@mvarewyck mvarewyck linked an issue Aug 23, 2024 that may be closed by this pull request
@mvarewyck mvarewyck marked this pull request as draft August 23, 2024 10:08
@mvarewyck
Copy link
Collaborator Author

R CMD check fails with error below. It indicates there are some regions for which there are observations in the data, but no shape data are available for plotting them in maps.

 ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('testWildschade.R:67:9'): Number of cases per region level ───────────
  Error in `mapFlanders(allSpatialData = spatialData, regionLevel = regionLevel, 
      colorScheme = c("white", suppressWarnings(RColorBrewer::brewer.pal(n = nlevels(spaceData$data$group) - 
          1, name = "YlOrBr"))), summaryData = spaceData$data, 
      legend = "topright", species = iSpecies)`: De geo-data kan niet gematcht worden aan de shape data.
  Backtrace:
      ▆
   1. └─reportingGrofwild::mapFlanders(...) at testWildschade.R:67:9
> summaryData$locatie[!summaryData$locatie %in% spatialData$NAAM]
[1] "1_Mol"      "9_Overijse" "9_Wellen"  

@SanderDevisscher
Copy link
Collaborator

I'm checking the pre upload files if they are ok I'll upload them again and check the upload flow in the process.

@SanderDevisscher
Copy link
Collaborator

@mvarewyck am I correct this issue occurs with schade data ?
The combo's "1_Mol", "9_Overijse" & "9_Wellen" are not correct.
1_Mol
image
9_Overijse
image
9_Wellen
image

@SanderDevisscher
Copy link
Collaborator

The issue does occur in the pre upload data. This is a data issue and should be fixed by the next update (see https://github.com/inbo/backoffice-wild-analyse/issues/1157)

@mvarewyck
Copy link
Collaborator Author

@mvarewyck am I correct this issue occurs with schade data ?

Yes it is.

@mvarewyck mvarewyck marked this pull request as ready for review August 29, 2024 11:43
@SanderDevisscher
Copy link
Collaborator

I'm having some issues testing the PR in docker 😢 The docker builds succesfull but its seems to be unable to plot the first map, no error nor warning are logged by docker. I'm looking into fixing the issue.
This PR however does run without a hitch in R. In R there seems to be a issue with FIGUUR: Leeggewicht per leeftijdscategorie en geslacht (INBO of Meldingsformulier), see below:
newplot
The error does occur with wild boar & roedeer.

@SanderDevisscher
Copy link
Collaborator

R prints the following warning:
Warning: 'layout' objects don't have these attributes: 'boxmode'

Valid attributes include:
'_deprecated', 'activeshape', 'annotations', 'autosize', 'autotypenumbers', 'calendar', 'clickmode', 'coloraxis', 'colorscale', 'colorway', 'computed', 'datarevision', 'dragmode', 'editrevision', 'editType', 'font', 'geo', 'grid', 'height', 'hidesources', 'hoverdistance', 'hoverlabel', 'hovermode', 'images', 'legend', 'mapbox', 'margin', 'meta', 'metasrc', 'modebar', 'newshape', 'paper_bgcolor', 'plot_bgcolor', 'polar', 'scene', 'selectdirection', 'selectionrevision', 'separators', 'shapes', 'showlegend', 'sliders', 'smith', 'spikedistance', 'template', 'ternary', 'title', 'transition', 'uirevision', 'uniformtext', 'updatemenus', 'width', 'xaxis', 'yaxis', 'barmode', 'bargap', 'mapType'

@SanderDevisscher
Copy link
Collaborator

The issue seems to affect all boxplot plots like FIGUUR: Gewicht per jaar en FIGUUR: Onderkaaklengte per jaar (INBO of Meldingsformulier)

@SanderDevisscher
Copy link
Collaborator

I'm having some issues testing the PR in docker 😢 The docker builds succesfull but its seems to be unable to plot the first map, no error nor warning are logged by docker. I'm looking into fixing the issue.

Its seems the RAM usage of my docker explodes to > 11Gb of the 12Gb available.

@SanderDevisscher
Copy link
Collaborator

SanderDevisscher commented Aug 29, 2024

I was able to reduce the inflation of my docker RAM by switching from wsl2 to hyper-V however the issue with loading the Landkaart remains. when looking at the chrome devtools I see the following error:

VM163:162 Uncaught ReferenceError: Plotly is not defined
    at Object.renderValue (<anonymous>:162:18)
    at shinyBinding.renderValue (<anonymous>:541:20)
    at Object.onValueChange (output_binding.js:16:10)
    at delegator.<computed> [as onValueChange] (<anonymous>:112:23)
    at OutputBindingAdapter.onValueChange (output_binding_adapter.js:21:18)
    at ShinyApp.bindOutput (shinyapp.js:346:15)
    at init_shiny.js:44:18
    at r (init_shiny.js:236:5)
    at Object.bindAll (init_shiny.js:246:29)
    at Object.renderContent (output_binding_html.js:51:13)

PS run command:

"docker run --name wildapp_public -p 3600:3838 inbo/grofwild R -e \"Sys.setenv('AWS_DEFAULT_REGION'='eu-west-1', 'AWS_ACCESS_KEY_ID'='', 'AWS_SECRET_ACCESS_KEY'='');reportingGrofwild::runWildApp(public=TRUE)"

@SanderDevisscher
Copy link
Collaborator

Ok important to know "Gerapporteerd aantal schadegevallen" of the same docker build does load. As does the wbe map however it only loads after switching the wbe displayed. Does this indicates the app needs user input to start loading?

Copy link
Collaborator

@SanderDevisscher SanderDevisscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvarewyck the app apperently needs user input before loading some graphs/maps while other like the main landkaart doesn't seem te load at all, see #484 (comment) & #484 (comment)

@mvarewyck
Copy link
Collaborator Author

mvarewyck commented Sep 5, 2024

@mvarewyck the app apperently needs user input before loading some graphs/maps while other like the main landkaart doesn't seem te load at all, see #484 (comment) & #484 (comment)

It's all due to this commit 262589e, including lightweight plotly . I'm looking into it (reverting or fixing). Known issue: plotly/plotly.R#2119

@mvarewyck
Copy link
Collaborator Author

@SanderDevisscher Docker image works fine for me now. I reverted the commit, given there is no easy solution and the planned re-design of the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Jachtterreinen outside wbe
2 participants