forked from earthobservations/wetterdienst
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request earthobservations#167 from panodata/sphinx-ipython
Add tutorial stub based on iPython Sphinx extension
- Loading branch information
Showing
5 changed files
with
79 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
######## | ||
Tutorial | ||
######## | ||
|
||
|
||
============= | ||
Prerequisites | ||
============= | ||
Import modules necessary for general functioning. | ||
|
||
.. ipython:: | ||
|
||
In [1]: import warnings | ||
...: warnings.filterwarnings("ignore") | ||
...: import wetterdienst | ||
...: from wetterdienst import PeriodType, TimeResolution, Parameter | ||
...: import matplotlib as mpl | ||
...: import matplotlib.pyplot as plt | ||
...: from matplotlib import cm | ||
|
||
|
||
======== | ||
Metadata | ||
======== | ||
|
||
Which parameters are available? | ||
|
||
|
||
All available combinations | ||
========================== | ||
.. ipython:: | ||
|
||
In [2]: print(wetterdienst.discover_climate_observations()) | ||
|
||
|
||
Daily historical data | ||
===================== | ||
.. ipython:: | ||
|
||
In [3]: print("Selection of daily historical data") | ||
...: print( | ||
...: wetterdienst.discover_climate_observations( | ||
...: time_resolution=TimeResolution.DAILY, | ||
...: period_type=PeriodType.HISTORICAL | ||
...: ) | ||
...: ) | ||
|
||
|
||
================ | ||
Get station list | ||
================ | ||
|
||
.. ipython:: | ||
|
||
In [1]: metadata_hdp = wetterdienst.metadata_for_climate_observations( | ||
...: Parameter.PRECIPITATION_MORE, TimeResolution.DAILY, PeriodType.HISTORICAL) | ||
...: print("Number of stations with available data: ", metadata_hdp["HAS_FILE"].sum()) | ||
...: print("Some of the stations:") | ||
...: metadata_hdp.head() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters