A project aiming at delevering tools for visualisation and analysis of Barcelona rainfall data. Data is retrieved from there: https://opendata-ajuntament.barcelona.cat/data/en/dataset/precipitacio-hist-bcn.
SPIs for short accumulation periods (e.g., SPI-1 to SPI-3) are indicators for immediate impacts
such as reduced soil moisture, snowpack, and flow in smaller creeks;
SPIs for medium accumulation periods (e.g., SPI-3 to SPI-12) are indicators for reduced stream
flow and reservoir storage; and
SPIs for long accumulation periods (SPI-12 to SPI-48) are indicators for reduced reservoir and
groundwater recharge, for example
Find an already existing (variance) or build a function to retrieve the "dispersion" of rainfall data for the whole dataframe or within an optional specific timeframe.
As per usual, the function would most likely be a class function of YearlyRainfall.
It could be useful for monthly or seasonal data, to find which are the most unpredictable and which are the stablest ones.
We could do that by storing data as csv and loading it.
We could also do that by avoiding loading elements many times for nothing (loading once the dataset is enough)
Title says it all...
Not a user-friendly feature, but could be nice for retrieving some data fastly.
For instance: python cli.py rainfall:average 1970 1999
Flasgger, unfortunately, does not seem to be compatible with most recent versions of Python.
We could simply use FastAPI to set up our API, and keep Flask later as a back supporting our front version.
Optional parameters allow flexibility but overusing them might complexify futur usages of the core classes & the API that is being built. It also makes the behaviour less predictable sometime.
Code a generic plot function that would take a label for the X values and an array of labels for all the Y values to plot.
Optional parameters to decide the kind of plot (curve, scatter, histo, etc.) , colors and more are to be added as well.