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

Adelle/forecasts on sensor page #3264

Merged
merged 17 commits into from
Dec 6, 2024
Merged

Conversation

Adelle-Pitsas
Copy link
Contributor

This PR incorporates Forecasts into the water sensor page and closes #3259

  • Takes the larger value to display as the future flooding indicator on the map
  • Updates useDatasets to get datasets by type instead of index so we don't mistakenly show a forecast as a prediction
  • Adds Forecasts to graph
  • Adds variable tabs on tides table
  • All functionality written with the potential for more than one forecast
    (sorry I had to add bootstrap as a dependency... tabs for literally everything else wasn't working with our page structure)

Screenshot 2024-12-04 at 2 31 13 PM

package.json Outdated
@@ -28,6 +28,7 @@
"query-string": "^9.1.1",
"react": "^18.3.1",
"react-app-polyfill": "^3.0.0",
"react-bootstrap": "^2.10.6",
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack for some reason, reactstrap was being really fussy. I'll try using it again...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I got it working with reactstrap--just had to create a new reusable component that doesn't change the url and only changes the tab panels below the tabs.

src/Features/ERDDAP/hooks/tabledap.ts Show resolved Hide resolved
@@ -4,6 +4,7 @@ export const colors = {
coastalMeadow: "#2ab78f",
buoyYellow: "#ffcd22",
whatOrange: "#ffae6d",
brighterOrange: "#fc8042",
Copy link
Member

Choose a reason for hiding this comment

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

Is this from the NERACOOS styles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No its not from NERACOOS styles, but to me, it seems like none of the current colors have enough of a contrast to be effective as a third color in the graph:
This is what it looks like with neracoos' whatOrange:
Screenshot 2024-12-05 at 12 59 24 PM
The best contrast for the colors we have is neracoosBlue but that just looks like a bolder version of the "Observed" timeseries.
Screenshot 2024-12-05 at 1 00 20 PM

The brighterOrange that I added looks like this:
Screenshot 2024-12-05 at 1 01 24 PM

Happy to change it to whatever you think is best! Just want it to be clear what timeseries is which (especially for folks who might be visually impaired)

Copy link
Member

Choose a reason for hiding this comment

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

Is it cycling through the colors or are you picking them?

What about using different dash styles for predicted vs forecast? That's what we are doing on the platform forecasts

image

https://mariners.neracoos.org/platform/E01/forecast/air_temperature Though now I'm thinking we should probably make the observed solid and the forecasts dashed there

Hohonu uses dashes for their forecasts and dots for their observations

image

CO-OPs is solid for both

image

We show prelim (but out of date because I gonna fix something with it...) data dashed on the Climate dashboard
image

Comment on lines +22 to +23
// import Tab from "react-bootstrap/Tab"
// import Tabs from "react-bootstrap/Tabs"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// import Tab from "react-bootstrap/Tab"
// import Tabs from "react-bootstrap/Tabs"

@@ -4,6 +4,7 @@ export const colors = {
coastalMeadow: "#2ab78f",
buoyYellow: "#ffcd22",
whatOrange: "#ffae6d",
brighterOrange: "#fc8042",
Copy link
Member

Choose a reason for hiding this comment

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

Is it cycling through the colors or are you picking them?

What about using different dash styles for predicted vs forecast? That's what we are doing on the platform forecasts

image

https://mariners.neracoos.org/platform/E01/forecast/air_temperature Though now I'm thinking we should probably make the observed solid and the forecasts dashed there

Hohonu uses dashes for their forecasts and dots for their observations

image

CO-OPs is solid for both

image

We show prelim (but out of date because I gonna fix something with it...) data dashed on the Climate dashboard
image

@Adelle-Pitsas Adelle-Pitsas merged commit 53cc9c5 into main Dec 6, 2024
7 checks passed
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.

Incorporate forecast data into sensor page
2 participants