# get_station_metadata()


Get metadata for all weather stations.


Usage

``` python
get_station_metadata(
    *,
    include_timezone=True,
    force_refresh=False,
)
```


Downloads and parses the ISD history file containing information about all weather stations in the database.


## Parameters


`include_timezone: bool = ``True`  
Whether to look up timezone names based on station coordinates. This adds a `tz_name` column. Default is `True`.

`force_refresh: bool = ``False`  
Force re-download of station data even if cached. Default is `False`.


## Returns


`pl.DataFrame`  
A DataFrame with station metadata.


## Columns

The returned DataFrame contains the following columns:

- `id`: Station ID (USAF-WBAN format)
- `usaf`: USAF station identifier
- `wban`: WBAN station identifier
- `name`: Station name
- `country_code`: ISO 3166-1 alpha-2 country code
- [country](country.md#weathervault.country): Country name
- [state](state.md#weathervault.state): US state code (if applicable)
- `icao`: ICAO identifier
- `lat`: Latitude in degrees
- `lon`: Longitude in degrees
- `elev`: Elevation in meters
- `begin_date`: Date of first available data
- `end_date`: Date of last available data
- `tz_name`: Timezone name (only included if `include_timezone=True`)


## Examples

Get metadata for all weather stations:


``` python
import weathervault as wv
stations = wv.get_station_metadata()
stations.head()
```


shape: (5, 14)

| id | usaf | wban | name | country_code | country | state | icao | lat | lon | elev | begin_date | end_date | tz_name |
|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
| str | str | str | str | str | str | str | str | f64 | f64 | f64 | date | date | str |
| "007018-99999" | "007018" | "99999" | "WXPOD 7018" | null | null | "" | "" | 0.0 | 0.0 | 7018.0 | 2011-03-09 | 2013-07-30 | "Etc/GMT" |
| "007026-99999" | "007026" | "99999" | "WXPOD 7026" | "AF" | "Afghanistan" | "" | "" | 0.0 | 0.0 | 7026.0 | 2012-07-13 | 2017-08-22 | "Etc/GMT" |
| "007070-99999" | "007070" | "99999" | "WXPOD 7070" | "AF" | "Afghanistan" | "" | "" | 0.0 | 0.0 | 7070.0 | 2014-09-23 | 2015-09-26 | "Etc/GMT" |
| "008260-99999" | "008260" | "99999" | "WXPOD8270" | null | null | "" | "" | 0.0 | 0.0 | 0.0 | 2005-01-01 | 2012-07-31 | "Etc/GMT" |
| "008268-99999" | "008268" | "99999" | "WXPOD8278" | "AF" | "Afghanistan" | "" | "" | 32.95 | 65.567 | 1156.7 | 2010-05-19 | 2012-03-23 | "Asia/Kabul" |
