Closed bbest closed 2 years ago
When running Shiny app from https://rstudio.marineenergy.app:
Warning: Error in : Mapped vectors must have consistent lengths:
* `.x` has length 3
* `.y` has length 2
119: map2_chr
118: .f [/share/github/apps_dev/scripts/shiny_report.R#375]
117: map
Ah whoops, I see now a problem with how we separately:
Drop non-applicable tag categories, ie dropping Consequence.Collision
tag from interactions querying Publications since this content type lacks the Consequence
category; and
Convert missing child tags to parents, ie converting Stressor.Noise.Underwater
to Stressor.Noise
with Publications since this content type only has the parent Noise tag.
We should be updating the interactions for every content type accordingly and spit out warnings for each. I think this will be best handled with something like a new get_content_tags()
function that handles each case and updates the tags queried accordingly.
get_pubs_tbl()
https://github.com/marineenergy/apps/blob/72e8aa8e91d97ffd18e9680f5d4ba6c4c90bba9e/scripts/shiny_report.R#L388-L425
get_updated_ixns()
https://github.com/marineenergy/apps/blob/72e8aa8e91d97ffd18e9680f5d4ba6c4c90bba9e/scripts/shiny_report.R#L365-L367update_tag()
https://github.com/marineenergy/apps/blob/72e8aa8e91d97ffd18e9680f5d4ba6c4c90bba9e/scripts/shiny_report.R#L357-L363get_pubs_tbl()
https://github.com/marineenergy/apps/blob/72e8aa8e91d97ffd18e9680f5d4ba6c4c90bba9e/scripts/shiny_report.R#L450-L471@bbest, It looks like the issue in displaying management/publications (as documented above) may be due to get_content_tag_categories("publications")
returning character(0)
:
From Grace: