guidocioni / point_wx

4 stars 0 forks source link

Give possibility to choose different variables for daily climate #172

Closed guidocioni closed 1 month ago

guidocioni commented 1 month ago

Put two select in the options selector: one for the accumulated variable (default to precipitation) and the other for the daily variable (defaults to mean temperature). This should be collapsible.

Give the possibility then to choose what variable to plot For accumulated

For daily

guidocioni commented 1 month ago

Done in 63e377d5ea44e67e2e3dee2ba2d92709c217a6bf. As we're only using daily variable there's not so much choice if we use the daily aggregates already computed, so for now I decided to include

acc_vars_options = [
    {"label": "Precipitation [mm]", "value": "precipitation_sum"},
    {"label": "Rain [mm]", "value": "rain_sum"},
    {"label": "Snow [cm]", "value": "snowfall_sum"},
    {"label": "Precipitation hours", "value": "precipitation_hours"},
    {"label": "Sunshine hours", "value": "sunshine_duration"},
    {"label": "Shortwave radiation [MJ/m²]", "value": "shortwave_radiation_sum"},
    {"label": "Wind speed maximum [km/h]", "value": "wind_speed_10m_max"},
]
daily_vars_options = [
    {"label": "Mean temperature [°C]", "value": "temperature_2m_mean"},
    {"label": "Maximum temperature [°C]", "value": "temperature_2m_max"},
    {"label": "Minimum temperature [°C]", "value": "temperature_2m_min"},
]

In the future we can expand this list by computing the daily aggregates ourselves maybe?