ISD data with location, distance and time
[6]:
from obswx import *
# Get the metadata for the ISD dataset
met = obswx(source='ISD')
met.get_meta(load=True).head()
[6]:
USAF | WBAN | STATION NAME | CTRY | STATE | ICAO | LAT | LON | ELEV(M) | BEGIN | END | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 007018 | 99999 | WXPOD 7018 | NaN | NaN | NaN | 0.00 | 0.000 | 7018.0 | 20110309 | 20130730 |
1 | 007026 | 99999 | WXPOD 7026 | AF | NaN | NaN | 0.00 | 0.000 | 7026.0 | 20120713 | 20170822 |
2 | 007070 | 99999 | WXPOD 7070 | AF | NaN | NaN | 0.00 | 0.000 | 7070.0 | 20140923 | 20150926 |
3 | 008260 | 99999 | WXPOD8270 | NaN | NaN | NaN | 0.00 | 0.000 | 0.0 | 20050101 | 20120731 |
4 | 008268 | 99999 | WXPOD8278 | AF | NaN | NaN | 32.95 | 65.567 | 1156.7 | 20100519 | 20120323 |
lat
: Latitude of the interested points. type: int, float; or list, tuple for selecting a region.lon
: Longitude of the interested point. type: int, float; or list, tuple for selecting a region.radius
(optional): Radius of the circle in km around the interested point.year
(optional): Year of the interested data (default is None, all the available years; if a specific year is selected, return the data for that year)year can be int or list and tuple of 2 int (begin and end year)
[7]:
res = met.get_location(lat=51.5, lon=-0.1, radius=100, year=2011)
res
Found 26 stations at point (51.5, -0.1) within 100 km
[7]:
USAF | WBAN | STATION NAME | CTRY | STATE | ICAO | LAT | LON | ELEV(M) | BEGIN | END | distance | station_id | year_begain | year_end | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1565 | 035573 | 99999 | CRANFIELD | UK | NaN | EGTC | 52.072 | -0.617 | 109.1 | 19900208 | 20240413 | 72.959310 | 03557399999 | 1990 | 2024 |
1568 | 035600 | 99999 | BEDFORD | UK | NaN | NaN | 52.217 | -0.483 | 84.0 | 19870409 | 20240413 | 84.026935 | 03560099999 | 1987 | 2024 |
1574 | 035660 | 99999 | WYTON | UK | NaN | EGUY | 52.357 | -0.108 | 41.1 | 19501003 | 20151004 | 95.356541 | 03566099999 | 1950 | 2015 |
1578 | 035715 | 99999 | CAMBRIDGE | UK | NaN | EGSC | 52.205 | 0.175 | 14.3 | 19770201 | 20240412 | 80.697503 | 03571599999 | 1977 | 2024 |
1636 | 036580 | 99999 | BENSON | UK | NaN | EGUB | 51.616 | -1.096 | 68.9 | 19730101 | 20240413 | 70.269685 | 03658099999 | 1973 | 2024 |
1638 | 036600 | 99999 | HIGH WYCOMBE HQAIR | UK | NaN | NaN | 51.683 | -0.800 | 205.0 | 19971201 | 20230222 | 52.610209 | 03660099999 | 1997 | 2023 |
1640 | 036720 | 99999 | NORTHOLT | UK | NaN | EGWU | 51.553 | -0.418 | 37.8 | 19730101 | 20240413 | 22.843444 | 03672099999 | 1973 | 2024 |
1642 | 036733 | 99999 | LUTON | UK | NaN | EGGW | 51.875 | -0.368 | 160.3 | 19880105 | 20240413 | 45.654109 | 03673399999 | 1988 | 2024 |
1645 | 036830 | 99999 | STANSTED | UK | NaN | EGSS | 51.885 | 0.235 | 106.1 | 19730101 | 20240413 | 48.697782 | 03683099999 | 1973 | 2024 |
1646 | 036840 | 99999 | ANDREWSFIELD | UK | NaN | NaN | 51.883 | 0.450 | 87.0 | 19980301 | 20240413 | 57.116337 | 03684099999 | 1998 | 2024 |
1651 | 036913 | 99999 | SOUTHEND | UK | NaN | EGMC | 51.571 | 0.696 | 14.9 | 19880105 | 20240413 | 55.793439 | 03691399999 | 1988 | 2024 |
1652 | 036930 | 99999 | SHOEBURYNESS LANDWICK | UK | NaN | NaN | 51.550 | 0.833 | 3.0 | 19291001 | 20240413 | 64.990617 | 03693099999 | 1929 | 2024 |
1689 | 037610 | 99999 | ODIHAM | UK | NaN | EGVO | 51.234 | -0.943 | 123.4 | 19730101 | 20240413 | 65.745142 | 03761099999 | 1973 | 2024 |
1690 | 037630 | 99999 | BRACKNELL/BEAUFORT | UK | NaN | EGRR | 51.383 | -0.783 | 74.0 | 19730101 | 20230524 | 49.240090 | 03763099999 | 1973 | 2023 |
1694 | 037663 | 99999 | BIGGIN HILL | UK | NaN | EGKB | 51.331 | 0.033 | 182.3 | 19880105 | 20240413 | 20.955616 | 03766399999 | 1988 | 2024 |
1696 | 037680 | 99999 | FARNBOROUGH | UK | NaN | EGLF | 51.276 | -0.776 | 72.5 | 19880501 | 20240413 | 53.248254 | 03768099999 | 1988 | 2024 |
1697 | 037683 | 99999 | CITY | UK | NaN | EGLC | 51.505 | 0.055 | 5.8 | 19880129 | 20240413 | 10.777056 | 03768399999 | 1988 | 2024 |
1698 | 037690 | 99999 | CHARLWOOD | UK | NaN | NaN | 51.144 | -0.229 | 68.0 | 19920301 | 20240413 | 40.614626 | 03769099999 | 1992 | 2024 |
1699 | 037700 | 99999 | ST JAMES PARK | UK | NaN | NaN | 51.500 | -0.117 | 5.0 | 20091218 | 20240413 | 1.180489 | 03770099999 | 2009 | 2024 |
1700 | 037720 | 99999 | HEATHROW | UK | NaN | EGLL | 51.478 | -0.461 | 25.3 | 19481201 | 20240413 | 25.193219 | 03772099999 | 1948 | 2024 |
1703 | 037760 | 99999 | GATWICK | UK | NaN | EGKK | 51.148 | -0.190 | 61.6 | 19730101 | 20240413 | 39.660905 | 03776099999 | 1973 | 2024 |
1708 | 037810 | 99999 | KENLEY AIRFIELD | UK | NaN | NaN | 51.300 | -0.083 | 170.0 | 19880201 | 20240413 | 22.282614 | 03781099999 | 1988 | 2024 |
1779 | 038720 | 99999 | THORNEY ISLAND | UK | NaN | NaN | 50.817 | -0.917 | 3.0 | 19840703 | 20240413 | 95.080014 | 03872099999 | 1984 | 2024 |
1783 | 038760 | 99999 | SHOREHAM | UK | NaN | EGKA | 50.836 | -0.297 | 2.1 | 19861201 | 20240413 | 75.144994 | 03876099999 | 1986 | 2024 |
1789 | 038820 | 99999 | HERSTMONCEUX WEST END | UK | NaN | NaN | 50.900 | 0.317 | 52.0 | 19921201 | 20240413 | 72.836788 | 03882099999 | 1992 | 2024 |
1795 | 038873 | 99999 | LYDD | UK | NaN | EGMD | 50.956 | 0.939 | 4.0 | 19880105 | 20240413 | 94.498698 | 03887399999 | 1988 | 2024 |
[8]:
res = met.get_location(lat=51.5, lon=-0.1, year=2011)
res
Closest station found at point (51.5, -0.1) is 03770099999, distance: 1.180488780223389 km
[8]:
USAF | WBAN | STATION NAME | CTRY | STATE | ICAO | LAT | LON | ELEV(M) | BEGIN | END | distance | station_id | year_begain | year_end | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1699 | 037700 | 99999 | ST JAMES PARK | UK | NaN | NaN | 51.5 | -0.117 | 5.0 | 20091218 | 20240413 | 1.180489 | 03770099999 | 2009 | 2024 |
[9]:
result = pd.DataFrame()
for id in res['station_id'].values:
print(id)
df_ = met.get_data(year=2011, station= id, isd_source="AWS")
result = pd.concat([result, df_], axis=0)
result
03770099999
Getting data from NOAA ISD
Goto here to help select station: https://junjieyu-uom.github.io/obswx/isd_map
[9]:
STATION | DATE | SOURCE | LATITUDE | LONGITUDE | ELEVATION | NAME | REPORT_TYPE | CALL_SIGN | QUALITY_CONTROL | ... | VIS | TMP | DEW | SLP | AA1 | AA2 | IA2 | KA1 | REM | EQD | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 3770099999 | 2011-01-01T00:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0068,1 | +0027,1 | 99999,9 | 06,0000,9,1 | NaN | NaN | NaN | SYN054AAXX 01004 03770 16/// ///// 10068 2002... | Q01 00002PRCP06 |
1 | 3770099999 | 2011-01-01T01:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0067,1 | +0028,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 01014 03770 46/// ///// 10067 2002... | NaN |
2 | 3770099999 | 2011-01-01T02:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0064,1 | +0028,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 01024 03770 46/// ///// 10064 2002... | NaN |
3 | 3770099999 | 2011-01-01T03:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0064,1 | +0028,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 01034 03770 46/// ///// 10064 2002... | NaN |
4 | 3770099999 | 2011-01-01T04:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0059,1 | +0027,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 01044 03770 46/// ///// 10059 2002... | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
8706 | 3770099999 | 2011-12-30T10:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0066,1 | +0030,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 30104 03770 46/// ///// 10066 2003... | NaN |
8707 | 3770099999 | 2011-12-30T11:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0070,1 | +0030,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 30114 03770 46/// ///// 10070 2003... | NaN |
8708 | 3770099999 | 2011-12-31T21:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0127,1 | +0106,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 31214 03770 46/// ///// 10127 2010... | NaN |
8709 | 3770099999 | 2011-12-31T22:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0122,1 | +0107,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 31224 03770 46/// ///// 10122 2010... | NaN |
8710 | 3770099999 | 2011-12-31T23:00:00 | 4 | 51.5 | -0.116667 | 5.0 | ST JAMES PARK, UK | FM-12 | 99999 | V020 | ... | 999999,9,N,1 | +0120,1 | +0110,1 | 99999,9 | NaN | NaN | NaN | NaN | SYN048AAXX 31234 03770 46/// ///// 10120 2011... | NaN |
8711 rows × 22 columns