# get_inventory()


Get the data inventory for all stations and years.


Usage

``` python
get_inventory(
    *,
    force_refresh=False,
)
```


Downloads and parses the ISD inventory file containing record counts for each station by year and month.


## Parameters


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


## Returns


`pl.DataFrame`  
A DataFrame with inventory information.


## Columns

The returned DataFrame contains the following columns:

- `id`: Station ID (USAF-WBAN format)
- `usaf`: USAF station identifier
- `wban`: WBAN station identifier
- `year`: Year of data
- `jan` through `dec`: Record counts for each month
- `total`: Total records for the year


## Examples

Get data inventory for all stations:


``` python
import weathervault as wv
import polars as pl

inventory = wv.get_inventory()
inventory.filter(pl.col("id") == "725030-14732")
```


shape: (53, 17)

| id | usaf | wban | year | jan | feb | mar | apr | may | jun | jul | aug | sep | oct | nov | dec | total |
|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
| str | str | str | i64 | i64 | i64 | i64 | i64 | i64 | i64 | i64 | i64 | i64 | i64 | i64 | i64 | i64 |
| "725030-14732" | "725030" | "14732" | 1973 | 766 | 680 | 848 | 748 | 788 | 779 | 773 | 747 | 715 | 752 | 725 | 798 | 9119 |
| "725030-14732" | "725030" | "14732" | 1974 | 793 | 719 | 798 | 732 | 792 | 749 | 756 | 789 | 750 | 760 | 765 | 757 | 9160 |
| "725030-14732" | "725030" | "14732" | 1975 | 812 | 736 | 786 | 725 | 762 | 783 | 784 | 758 | 752 | 788 | 758 | 811 | 9255 |
| "725030-14732" | "725030" | "14732" | 1976 | 816 | 724 | 800 | 747 | 796 | 778 | 823 | 813 | 768 | 809 | 747 | 786 | 9407 |
| "725030-14732" | "725030" | "14732" | 1977 | 794 | 743 | 822 | 784 | 777 | 780 | 780 | 805 | 808 | 804 | 850 | 807 | 9554 |
| … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … |
| "725030-14732" | "725030" | "14732" | 2021 | 1123 | 1083 | 1149 | 1086 | 1126 | 1083 | 1239 | 1170 | 1114 | 1179 | 1031 | 1182 | 13565 |
| "725030-14732" | "725030" | "14732" | 2022 | 1179 | 1099 | 1195 | 1092 | 1269 | 1122 | 1090 | 1090 | 1079 | 1163 | 1103 | 1172 | 13653 |
| "725030-14732" | "725030" | "14732" | 2023 | 1207 | 1049 | 1180 | 1144 | 1071 | 1117 | 1148 | 1194 | 1161 | 1135 | 1027 | 1214 | 13647 |
| "725030-14732" | "725030" | "14732" | 2024 | 1236 | 1053 | 1145 | 1145 | 1186 | 1063 | 1125 | 1160 | 1088 | 1057 | 1013 | 1143 | 13414 |
| "725030-14732" | "725030" | "14732" | 2025 | 1092 | 1050 | 1157 | 1099 | 1262 | 1128 | 1124 | 901 | 0 | 0 | 0 | 0 | 8813 |
