pyspc.metadata.shyreg.streamflow.Streamflow

class pyspc.metadata.shyreg.streamflow.Streamflow(filename=None)[source]

Bases : object

Structure liée aux fiches SHYREG - Débit.

__init__(filename=None)[source]

Initialisation de l’instance de la classe Streamflow.

Paramètres:

filename (str) – Fichier local du pdf SHYREG Débit

Methods

__init__([filename])

Initialisation de l'instance de la classe Streamflow.

read()

Lire le rapport 'shyreg'.

to_csv()

Exporter au format csv.

read()[source]

Lire le rapport “shyreg”.

Renvoie:

stats – Tableau des valeurs statistiques

Type renvoyé:

pnd.DataFrame

Exemples

>>> from pyspc.metadata.shyreg.streamflow import Streamflow
>>> f = 'data/webservice/report/BNBV_LO2228.pdf'
>>> shyreg = Streamflow(filename=f)
>>> df, dfi, pct = shyreg.read()

Valeurs statistiques

>>> df
VAR   Pointe   Jour     1h  ...    72h
Tr                          ...
2       49.2   42.4   47.9  ...   31.0
5       66.8   55.6   64.6  ...   40.3
10      82.1   66.1   78.8  ...   47.4
20      99.8   77.5   95.2  ...   54.5
50     129.0   94.5  122.0  ...   64.0
100    158.0  110.0  147.0  ...   71.4
500    254.0  158.0  230.0  ...   92.2
1000   313.0  185.0  277.0  ...  104.0

Intervalles de confiance

>>> dfi
VAR        Pointe         Jour  ...          72h
Tr                              ...
2         38/62  35.8/49.7  ...  30.5/30.8
5     51.6/83.7  46.8/64.9  ...  39.5/40.1
10     63.3/102  55.2/77.2  ...  45.7/48.1
20     77.8/123  64.8/90.6  ...  51.9/56.3
50      103/159   79.6/111  ...    59.8/68
100     128/194   93.4/130  ...  65.8/78.2
500     210/310    135/188  ...   83.8/104
1000    262/376    158/222  ...   92.1/124

Pourcentage de couverture des intervalles

>>> pct
80
to_csv()[source]

Exporter au format csv.

Renvoie:

filenames – Fichiers csv créés : statistiques et intervalles de confiance

Type renvoyé:

list