openclimatefix / quartz-frontend

Front End repo for the Nowcasting project.
https://openclimatefix.org/projects/nowcasting/
MIT License
101 stars 16 forks source link

update GSP chart to query one and not all GSPs before loading #392

Closed rachel-labri-tipton closed 1 year ago

rachel-labri-tipton commented 1 year ago

Detailed Description

Update the API calls for the GSP chart to call one and not all GSPs.

Context

In light of data loading slowly or not at all on the FE, we've identified a few quick fixes on the FE and BE. This issue is part of that speed up effort. When the FE queries GSP chart information, the FE currently queries the database for all GSPs. It might make more sense to only get forecast data for the GSP a user has selected to look at.

Possible Implementation

Update the use-get-gsp-data.tsx hook to query only one GSP at a time and then update the index.tsx and forecast-gsp-header.tsx files accordingly and see if the chart populates faster.