From 15e13b4174387b54bb0d21a6759d78b257de988e Mon Sep 17 00:00:00 2001 From: Markus Pichler Date: Fri, 26 Apr 2024 07:00:06 +0200 Subject: [PATCH] docs: added python example usage in readme --- README.md | 5 ++++- examples/reverse_engineering.py | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 examples/reverse_engineering.py diff --git a/README.md b/README.md index 47788ca..f0b2e84 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,10 @@ If you only want to analyse an already existing IDF-table import pandas as pd from idf_analysis import IntensityDurationFrequencyAnalyse -idf_table = pd.DataFrame(...) # index='Duration Steps', columns='Return Periods' +idf_table = pd.DataFrame(...) +# index: Duration Steps in minutes as int or float +# columns: Return Periods in years as int or float +# values: rainfall height in mm idf = IntensityDurationFrequencyAnalyse.from_idf_table(idf_table) ``` diff --git a/examples/reverse_engineering.py b/examples/reverse_engineering.py new file mode 100644 index 0000000..14f7518 --- /dev/null +++ b/examples/reverse_engineering.py @@ -0,0 +1,8 @@ +from idf_analysis.idf_class import IntensityDurationFrequencyAnalyse +import pandas as pd + +# Load the IDF table +idf_table_path = "ehyd_112086_idf_data/idf_table_UNIX.csv" +idf_table = pd.read_csv(idf_table_path, header=0, index_col=0) + +