Ingenjorsarbete-For-Klimatet / ifk-smhi

SMHI climate data client.
https://ingenjorsarbeteforklimatet.se/ifk-smhi/
MIT License
8 stars 1 forks source link

Mesan parameter listing #82

Closed docNord closed 2 months ago

docNord commented 1 year ago

Currently, the output from calling Mesan parameters is appalingly difficult to read (a json dictionary style list which does not read well). There should be a function which writes the names of the parameters similar to the Metobs parameters function.

from smhi.mesan import Mesan
client =Mesan()
client.parameters

#Reads better, example:
import pandas as pd
df = pd.DataFrame(client.parameters)
df["name"]
docNord commented 3 months ago

Changing the output format to a dataframe, I take the addition to milestones as an approval for introducing this change?

mgcth commented 3 months ago

I'm not sure a data frame is the correct format here. How about a dataclass, in that way we can keep the schema fixed?