Skip to content

Commit 5bbaa03

Browse files
committed
docs: updated README and documentation
1 parent 7f9aa5e commit 5bbaa03

6 files changed

+3734
-38
lines changed

README.md

+35-36
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
# Meteora
1111

12-
Pythonic interface to access data from meteorological stations. Key features:
12+
Pythonic interface to access observations from meteorological stations. Key features:
1313

14-
- easily stream data [from multiple providers (e.g., Automated Surface/Weather Observing Systems (ASOS/AWOS), MetOffice...)](https://meteora.readthedocs.io/en/latest/supported-providers.html) into pandas data frames.
14+
- easily stream meteorological observations [from multiple providers, from global (e.g., Global Historical Climatology Network hourly (GHCNh)) and regional (e.g., MetOffice) networks to citizen weather stations (e.g., Netatmo)](https://meteora.readthedocs.io/en/latest/supported-providers.html) into pandas data frames.
1515
- user-friendly arguments to filter data by region, variables or date ranges.
1616
- request caching with [requests-cache](https://github.com/requests-cache/requests-cache) to avoid re-downloading data and help bypassing API limits.
1717

@@ -20,74 +20,71 @@ Pythonic interface to access data from meteorological stations. Key features:
2020
Meteora provides a set of provider-specific clients to get observations from meteorological stations. For instance, it can be used to stream [the one-minute ASOS data](https://madis.ncep.noaa.gov/madis_OMO.shtml) from the [Iowa Environmental Mesonet](https://mesonet.agron.iastate.edu/request/asos/1min.phtml) into a pandas data frame:
2121

2222
```python
23-
from meteora.clients import ASOSOneMinIEMClient
23+
from meteora.clients import GHCNHourlyClient
2424

25-
region = "Oregon"
26-
variables = ["temperature", "pressure", "precipitation", "surface_wind_speed"]
27-
start = "2021-08-13"
28-
end = "2021-08-16"
25+
region = "Davos, Switzerland"
26+
variables = ["temperature", "precipitation", "surface_wind_speed"]
27+
start = "12-11-2021"
28+
end = "12-12-2021"
2929

30-
client = ASOSOneMinIEMClient(region=region)
31-
ts_df = client.get_ts_df(variables, start=start, end=end)
30+
client = GHCNHourlyClient(region)
31+
ts_df = client.get_ts_df(variables, start, end)
3232
ts_df.head()
3333
```
3434

35+
```
36+
[########################################] | 100% Completed | 16.94 s
37+
```
38+
3539
<div>
3640
<table border="1" class="dataframe">
3741
<thead>
3842
<tr style="text-align: right;">
3943
<th></th>
4044
<th></th>
4145
<th>temperature</th>
42-
<th>pressure</th>
4346
<th>precipitation</th>
4447
<th>surface_wind_speed</th>
4548
</tr>
4649
<tr>
47-
<th>station</th>
48-
<th>valid(UTC)</th>
49-
<th></th>
50+
<th>Station_ID</th>
51+
<th>time</th>
5052
<th></th>
5153
<th></th>
5254
<th></th>
5355
</tr>
5456
</thead>
5557
<tbody>
5658
<tr>
57-
<th rowspan="5" valign="top">AST</th>
58-
<th>2021-08-13 00:00:00</th>
59-
<td>68.0</td>
60-
<td>29.942</td>
59+
<th rowspan="5" valign="top">SZM00006784</th>
60+
<th>2021-12-11 00:00:00</th>
61+
<td>-4.7</td>
6162
<td>0.0</td>
62-
<td>10.0</td>
63+
<td>5.1</td>
6364
</tr>
6465
<tr>
65-
<th>2021-08-13 00:01:00</th>
66-
<td>67.0</td>
67-
<td>29.942</td>
66+
<th>2021-12-11 01:00:00</th>
67+
<td>-4.8</td>
6868
<td>0.0</td>
69-
<td>10.0</td>
69+
<td>5.1</td>
7070
</tr>
7171
<tr>
72-
<th>2021-08-13 00:02:00</th>
73-
<td>67.0</td>
74-
<td>29.942</td>
72+
<th>2021-12-11 02:00:00</th>
73+
<td>-4.8</td>
7574
<td>0.0</td>
76-
<td>10.0</td>
75+
<td>3.6</td>
7776
</tr>
7877
<tr>
79-
<th>2021-08-13 00:03:00</th>
80-
<td>67.0</td>
81-
<td>29.942</td>
78+
<th>2021-12-11 03:00:00</th>
79+
<td>-4.8</td>
8280
<td>0.0</td>
83-
<td>9.0</td>
81+
<td>3.6</td>
8482
</tr>
8583
<tr>
86-
<th>2021-08-13 00:04:00</th>
87-
<td>68.0</td>
88-
<td>29.942</td>
84+
<th>2021-12-11 04:00:00</th>
85+
<td>-4.7</td>
8986
<td>0.0</td>
90-
<td>8.0</td>
87+
<td>3.1</td>
9188
</tr>
9289
</tbody>
9390
</table>
@@ -99,10 +96,12 @@ We can also get the station locations using the `stations_gdf` property:
9996
import contextily as cx
10097

10198
ax = client.stations_gdf.plot()
102-
cx.add_basemap(ax, crs=client.stations_gdf.crs)
99+
cx.add_basemap(ax, crs=client.stations_gdf.crs, attribution=False)
103100
```
104101

105-
![oregon-stations](https://github.com/martibosch/meteora/raw/main/docs/figures/oregon-stations.png)
102+
![davos-stations](https://github.com/martibosch/meteora/raw/main/docs/figures/davos-stations.png)
103+
104+
*(C) OpenStreetMap contributors, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France*
106105

107106
See [the user guide](https://meteora.readthedocs.io/en/latest/user-guide.html) for more details about the features of Meteora as well as the [list of supported providers](https://meteora.readthedocs.io/en/latest/supported-providers.html).
108107

docs/figures/davos-stations.png

147 KB
Loading

docs/figures/oregon-stations.png

-217 KB
Binary file not shown.

docs/supported-providers.rst

+11
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@ following table.
2020
| ASOS/METAR | |:earth_africa:| | |:white_check_mark:| | |:white_check_mark:| |
2121
| (IEM) | Global | Yes | None |
2222
+------------+-------------------+----------------------+----------------------+
23+
| GHCNh | |:earth_africa:| | |:white_check_mark:| | |:white_check_mark: |
24+
| (NOAA) | Global | Yes | None |
25+
+------------+-------------------+----------------------+----------------------+
2326
| Meteocat | Catalonia | |:white_check_mark:| | |:key:| API key |
2427
| | | Yes | (free) |
2528
+------------+-------------------+----------------------+----------------------+
2629
| MetOffice | |:great_britain:| | |:clock1:| Latest | |:key:| API key |
2730
| | United Kingdom | 24h only | (free) |
2831
+------------+-------------------+----------------------+----------------------+
32+
| Netatmo | |:earth_africa:| | |:white_check_mark:| | |:key:| API key |
33+
| | Global | Yes | (free) |
34+
+------------+-------------------+----------------------+----------------------+
2935

3036
See more details about how to use each provider in the respective
3137
sections below as well as in the `API
@@ -48,6 +54,11 @@ Agrometeo
4854
service that provides weather data for agriculture, which can be
4955
accessed for free and without authentication.
5056

57+
Global Historical Climatology Network hourly (GHCNh)
58+
----------------------------------------------------
59+
60+
The `Global Historical Climatology Network hourly (GHCNh) <https://www.ncei.noaa.gov/products/global-historical-climatology-network-hourly>`__ is a dataset of hourly surface weather observations from fixed, land-based stations from numerous sources around the world. The GHCNh is managed by the National Oceanic and Atmospheric Administration (NOAA) and can be accessed for free and without authentication. Note that the same dataset is also provided at the daily and monthly resolutions, however Meteora currently only supports the hourly dataset (since daily and monthly aggregations can be easily computed from the hourly records).
61+
5162
Iowa Environmental Mesonet (IEM)
5263
--------------------------------
5364

docs/user-guide.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ hidden:
1010
maxdepth: 1
1111
---
1212
13-
user-guide/asos-example
13+
user-guide/overview
14+
user-guide/data-structures
1415
```
1516

16-
- [ASOS example](https://meteora.readthedocs.io/en/latest/user-guide/asos-example.html)
17+
- [Overview of key features](https://meteora.readthedocs.io/en/latest/user-guide/overview.html)
18+
- [Data structures](https://meteora.readthedocs.io/en/latest/user-guide/data-structures.html)
1719

1820
## Selecting a region
1921

0 commit comments

Comments
 (0)