marineenergy / apps

shiny apps for MHK-env
https://marineenergy.github.io/apps/
MIT License
3 stars 1 forks source link

tag issues: missing Tidal #111

Closed bbest closed 2 years ago

bbest commented 2 years ago

From Grace...

When I navigate to the Reporting App through marineenergy.app, the issue with nested parents does not appear to be resolved.

For example, when I enter Tidal, Fish, Collision as my tags, zero Tethys Publications appear and this doesn’t seem right. If I change it to Current, Fish, Collision, I get 39 results. If I enter just Tidal, no Tethys publications appear. Do they not use Tidal as a technology tag? This seems super weird and we need to implement something to make up for this oddity (like automatically search for Current?).

When I enter Wave, Noise/Underwater, Marine Mammals/Cetaceans, I also get zero Tethys Publications results; however a warning appears on the top that says, The following tag has been modified to the available parent tag: Noise/Underwater -> Noise. If I select Wave, Noise/Underwater, Marine Mammals, I get the same warning but 4 publications show up. So it seems to want to work but for only one of the nested tags. If more than two nested tags are entered, it has the same problem of not finding any results.

On top of this, what you had fixed with the Projects page seems to be broken again. Previously, you had a warning message pop up if a technology was selected that wasn’t available. Now, there is no warning and only a blank page appears. See below. I had entered Offshore Wind.

bbest commented 2 years ago

I was surprised to see no entry for Tidal in the tag_lookup sheet of data | marineenergy.app - Google Sheets so I added one:

image

And then reimported Tethys publications with update_tethys_pubs() (also added check for doc_tags_missing):

https://github.com/marineenergy/apps/blob/be3bc665e2f92fe78383bc6d74f18e7d3c6e2bbf/scripts/update.R#L403-L548

Then checked for number of rows with tag of Current (n=969) and Tidal (n=0) still!?

nrow(filter(doc_tags, tag == "Tidal"))   # 0    WHOAH!?
nrow(filter(doc_tags, tag == "Current")) # 969
bbest commented 2 years ago

Also noticing some mismatched numbers between number of Publications from Tethys that what we:

Overall Number of Records

Querying Specific Tags

Inspecting Specific Records

bbest commented 2 years ago

Hi Grace,

Great sleuthing! It looks like the Tethys Publications that we're reading from https://tethys.pnnl.gov/api/primre_export is problematic since it:

I detailed this and more in issues #111: tag issues: missing Tidal. I guess we should next reach out to Jonathan Whiting (Jonathan.Whiting@pnnl.gov) about getting the latest, or fall back on an old web scraper to get the latest content showing up on the Tethys website.

bbest commented 2 years ago

All content types report missing tags now:

bbest commented 2 years ago

The Interaction [Wave, Noise/Underwater, Marine Mammals/Cetaceans] is yielding 0 Publications since there is actually one Tethys Publication tagged with Marine Mammals/Cetaceans (and not the other tags), so Marine Mammals/Cetaceans is not replaced by the parent tag Marine Mammals.

bbest commented 2 years ago

Tethys updated so now seems to work