Skip to content

Commit

Permalink
docs: added python example usage in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPic committed Apr 26, 2024
1 parent db937a5 commit 15e13b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down
8 changes: 8 additions & 0 deletions examples/reverse_engineering.py
Original file line number Diff line number Diff line change
@@ -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)


0 comments on commit 15e13b4

Please sign in to comment.