ilnmtlbnm commited on
Commit
0153ff4
·
verified ·
1 Parent(s): cb18164

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +81 -0
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc0-1.0
3
+ tags:
4
+ - geospatial
5
+ - weather
6
+ - metar
7
+ - aviation
8
+ - tabular
9
+ pretty_name: METAR Stations (Active, 7-Day Window)
10
+ size_categories:
11
+ - 1K<n<10K
12
+ ---
13
+
14
+ # METAR Stations (Active, 7-Day Window)
15
+
16
+ A worldwide list of METAR/ASOS weather stations, sourced from the Iowa Environmental Mesonet (IEM) ASOS/AWOS networks. `stations.json` keeps only stations that actually reported at least once in the trailing 7-day window; `stations_all.json` keeps the full roster, including stations that were silent over that window (some other station lists still carry these as open), with a flag for whether each one reported.
17
+
18
+ ## Files and fields
19
+
20
+ `stations.json`, active stations only, compact rows for a browser client, one array per station:
21
+
22
+ | field | type | unit |
23
+ |---|---|---|
24
+ | icao | string | station id as IEM uses it: the 4-letter ICAO code, or a 3-character FAA id for 2,444 stations, mostly in the US |
25
+ | lat | float | degrees, 4 decimals |
26
+ | lon | float | degrees, 4 decimals |
27
+ | elev_m | float | meters |
28
+ | name | string | station name |
29
+ | country | string | ISO-2 country code |
30
+
31
+ `stations_all.json`, every roster station whether active or silent, same row shape as `stations.json` plus two trailing fields:
32
+
33
+ | field | type | unit |
34
+ |---|---|---|
35
+ | icao | string | station id, same convention as `stations.json` |
36
+ | lat | float | degrees, 4 decimals |
37
+ | lon | float | degrees, 4 decimals |
38
+ | elev_m | float | meters |
39
+ | name | string | station name |
40
+ | country | string | ISO-2 country code |
41
+ | reported | bool | true if the station had >=1 tmpf reading in the 7-day window |
42
+ | last_report_utc | string or null | last confirmed report in the pulled window, or null if `reported` is false |
43
+
44
+ `stations.parquet`, the same rows as `stations.json` plus two fields used to build the list, for the Hub's table viewer:
45
+
46
+ | field | type | unit |
47
+ |---|---|---|
48
+ | icao | string | station id as IEM uses it: the 4-letter ICAO code, or a 3-character FAA id for 2,444 stations, mostly in the US |
49
+ | lat | float | degrees, 4 decimals |
50
+ | lon | float | degrees, 4 decimals |
51
+ | elev_m | float | meters |
52
+ | name | string | station name |
53
+ | country | string | ISO-2 country code |
54
+ | last_report_utc | string | ISO 8601 timestamp, last confirmed report in the pulled window |
55
+ | source_network | string | IEM network id, e.g. FR__ASOS |
56
+
57
+ ## How it was built
58
+
59
+ `build_active_stations.py` walks every IEM network whose id ends in ASOS (one network per country or per US state/Canadian province), pulls each network's station roster from IEM's geojson endpoint, then pulls each network's temperature (tmpf) archive over a 7-day window from IEM's asos.py endpoint. A station goes into `stations.json` only if it has at least one non-empty tmpf reading anywhere in that window; a station's presence in IEM's roster feed (`online=true`) is not treated as evidence of activity, since some roster entries stay marked online for years after they stop reporting. `stations_all.json` is built from a second pass over the same per-network geojson roster endpoint (kept for every station this time, not just the active ones) with the `reported` flag and `last_report_utc` taken from the already-fetched activity data, so the archive endpoint is never queried twice for the same network.
60
+
61
+ IEM lists a depth or a wrong negative elevation for 17 coastal and offshore stations (oil platforms, islands, lighthouses); the script sets these to 0 m. Stations that really are below sea level, around the Caspian Sea and in the Imperial Valley, keep their elevation.
62
+
63
+ Elevations are IEM's; 17 wrong negative values on active coastal and offshore stations are set to 0 m by the build, while silent stations keep IEM's values, a few of them wrong (helidecks, ships), which does not matter for estimates since only reporting stations are used.
64
+
65
+ Roster seen: 7,534 stations across 266 networks. Kept in `stations.json` (reported at least once in the 7-day window): 5,614. Silent in that window but present in `stations_all.json`: 1,920. Build date: 2026-09-28, window 2026-09-21 to 2026-09-28.
66
+
67
+ ## Source and license
68
+
69
+ Data pulled from the Iowa Environmental Mesonet (IEM), Iowa State University: https://mesonet.agron.iastate.edu/. IEM's data is public domain; attribution is appreciated (see https://mesonet.agron.iastate.edu/disclaimer.php). This dataset is released under CC0-1.0. IEM's own terms place no restriction on redistribution beyond that appreciated attribution, so CC0-1.0 is used here rather than a more restrictive license.
70
+
71
+ ## How to regenerate
72
+
73
+ ```
74
+ venv/bin/python build_active_stations.py
75
+ ```
76
+
77
+ The window is computed from the current date each run, so re-running later produces a different 7-day window and station set. Progress checkpoints in `checkpoint_rows.jsonl`/`checkpoint_done_networks.txt` (activity) and `checkpoint_roster_all.jsonl`/`checkpoint_roster_done_networks.txt` (full roster), so an interrupted run resumes per-network instead of re-fetching from scratch.
78
+
79
+ ## Using your own station list
80
+
81
+ The weather-web library reads any list in the same row format; see its README (github.com/idle-intelligence/weather-web).