# ausweather
Download Australian weather data from the [Bureau of
Meteorology](http://www.bom.gov.au/climate/data/) via
[SILO](https://www.longpaddock.qld.gov.au/silo/) using Python
## Installation
Install from the command line:
```python
python -m pip install -U ausweather
```
## Example of how to use
In a Python interpreter session:
```python
>>> import ausweather
```
To use this package to download annual rainfall data for Kent Town, first you
need to find the station number using the BoM [Weather Station
Directory](http://www.bom.gov.au/climate/data/stations/). Then you can use the
``fetch_bom_station_from_silo(station_number, email_address)`` function to
return a dictionary:
```python
>>> data = ausweather.fetch_bom_station_from_silo(23090, 'kinverarity@hotmail.com')
station #: 23090 name: ADELAIDE (KENT TOWN) title: 23090 ADELAIDE (KENT TOWN) (fetched from SILO on 2020-03-04 16:23:26.395696)
>>> data.keys()
dict_keys(['silo_returned', 'station_no', 'station_name', 'title', 'df', 'annual', 'srn'])
```
The data is stored in this dictionary under the key "df":
```python
>>> data['df'].info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 25677 entries, 1 to 25677
Data columns (total 28 columns):
Date 25677 non-null datetime64[ns]
Day 25677 non-null int32
Date2 25677 non-null object
T.Max 25677 non-null float64
Smx 25677 non-null int32
T.Min 25677 non-null float64
Smn 25677 non-null int32
Rain 25677 non-null float64
Srn 25677 non-null int32
Evap 25677 non-null float64
Sev 25677 non-null object
Radn 25677 non-null float64
Ssl 25677 non-null int32
VP 25677 non-null float64
Svp 25677 non-null int32
RHmaxT 25677 non-null float64
RHminT 25677 non-null float64
FAO56 25677 non-null float64
Mlake 25677 non-null float64
Mpot 25677 non-null float64
Mact 25677 non-null float64
Mwet 25677 non-null float64
Span 25677 non-null float64
Ssp 25677 non-null int32
EvSp 25677 non-null float64
Ses 25677 non-null int32
MSLPres 25677 non-null float64
Sp 25677 non-null int32
dtypes: datetime64[ns](1), float64(16), int32(9), object(2)
memory usage: 4.6+ MB
```
To see annual rainfall, you can group-by the ``dt.year`` accessor of the "Date"
column:
```python
>>> df = data["df"]
>>> df.groupby(df.Date.dt.year).Rain.sum()
Date
1950 426.9
1951 677.9
1952 584.9
1953 601.0
1954 439.6
...
2016 820.8
2017 536.2
2018 429.8
2019 376.3
2020 101.6
Name: Rain, Length: 71, dtype: float64
```
## License
Released under the [MIT License](LICENSE.md).
## Version history
### Version 0.2.1 (3 Mar 2020)
- Fix bug for whitespace in BoM station name
### Version 0.2.0 (3 Mar 2020)
- Update, many changes.
### Version 0.1.0 (11 Feb 2020)
- Initial release
Raw data
{
"_id": null,
"home_page": "https://github.com/kinverarity1/ausweather",
"name": "ausweather",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "rainfall australia bom silo python data-access",
"author": "Kent Inverarity",
"author_email": "kinverarity@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/f5/ef/22ac9271f47473ee8767863515cfb509139eb59021e1a3d7b3973ef330c1/ausweather-0.9.tar.gz",
"platform": null,
"description": "# ausweather\n\nDownload Australian weather data from the [Bureau of\nMeteorology](http://www.bom.gov.au/climate/data/) via\n[SILO](https://www.longpaddock.qld.gov.au/silo/) using Python\n\n## Installation\n\nInstall from the command line:\n\n```python\npython -m pip install -U ausweather\n```\n\n## Example of how to use\n\nIn a Python interpreter session:\n\n```python\n>>> import ausweather\n```\n\nTo use this package to download annual rainfall data for Kent Town, first you\nneed to find the station number using the BoM [Weather Station\nDirectory](http://www.bom.gov.au/climate/data/stations/). Then you can use the\n``fetch_bom_station_from_silo(station_number, email_address)`` function to\nreturn a dictionary:\n\n```python\n>>> data = ausweather.fetch_bom_station_from_silo(23090, 'kinverarity@hotmail.com')\nstation #: 23090 name: ADELAIDE (KENT TOWN) title: 23090 ADELAIDE (KENT TOWN) (fetched from SILO on 2020-03-04 16:23:26.395696)\n>>> data.keys()\ndict_keys(['silo_returned', 'station_no', 'station_name', 'title', 'df', 'annual', 'srn'])\n```\n\nThe data is stored in this dictionary under the key \"df\":\n\n```python\n>>> data['df'].info()\n<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 25677 entries, 1 to 25677\nData columns (total 28 columns):\nDate 25677 non-null datetime64[ns]\nDay 25677 non-null int32\nDate2 25677 non-null object\nT.Max 25677 non-null float64\nSmx 25677 non-null int32\nT.Min 25677 non-null float64\nSmn 25677 non-null int32\nRain 25677 non-null float64\nSrn 25677 non-null int32\nEvap 25677 non-null float64\nSev 25677 non-null object\nRadn 25677 non-null float64\nSsl 25677 non-null int32\nVP 25677 non-null float64\nSvp 25677 non-null int32\nRHmaxT 25677 non-null float64\nRHminT 25677 non-null float64\nFAO56 25677 non-null float64\nMlake 25677 non-null float64\nMpot 25677 non-null float64\nMact 25677 non-null float64\nMwet 25677 non-null float64\nSpan 25677 non-null float64\nSsp 25677 non-null int32\nEvSp 25677 non-null float64\nSes 25677 non-null int32\nMSLPres 25677 non-null float64\nSp 25677 non-null int32\ndtypes: datetime64[ns](1), float64(16), int32(9), object(2)\nmemory usage: 4.6+ MB\n```\n\nTo see annual rainfall, you can group-by the ``dt.year`` accessor of the \"Date\"\ncolumn:\n\n```python\n>>> df = data[\"df\"]\n>>> df.groupby(df.Date.dt.year).Rain.sum()\nDate\n1950 426.9\n1951 677.9\n1952 584.9\n1953 601.0\n1954 439.6\n ... \n2016 820.8\n2017 536.2\n2018 429.8\n2019 376.3\n2020 101.6\nName: Rain, Length: 71, dtype: float64\n```\n\n## License\n\nReleased under the [MIT License](LICENSE.md).\n\n## Version history\n\n### Version 0.2.1 (3 Mar 2020)\n- Fix bug for whitespace in BoM station name\n\n### Version 0.2.0 (3 Mar 2020)\n- Update, many changes.\n\n### Version 0.1.0 (11 Feb 2020)\n- Initial release\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python package to download Australian rainfall data from the Bureau of Meteorology via the Queensland Government's SILO Patched Point Data service",
"version": "0.9",
"project_urls": {
"Homepage": "https://github.com/kinverarity1/ausweather"
},
"split_keywords": [
"rainfall",
"australia",
"bom",
"silo",
"python",
"data-access"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "97808b3e43aabba70f37b41f1eb5323280076c6e47fe8b83dd998fbb66a11695",
"md5": "395ab4a98b753171747a59ea449f850a",
"sha256": "e16b1c22eca0870bc8a4ef3dd1b552c840cb891fb61636d9487c4373d810e25e"
},
"downloads": -1,
"filename": "ausweather-0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "395ab4a98b753171747a59ea449f850a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 269066,
"upload_time": "2025-08-08T00:09:30",
"upload_time_iso_8601": "2025-08-08T00:09:30.793121Z",
"url": "https://files.pythonhosted.org/packages/97/80/8b3e43aabba70f37b41f1eb5323280076c6e47fe8b83dd998fbb66a11695/ausweather-0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f5ef22ac9271f47473ee8767863515cfb509139eb59021e1a3d7b3973ef330c1",
"md5": "be0a9ee0783f764f956d51c5b5c0235c",
"sha256": "eadb0cfb62dcd39aa9709ce4a263e2eeea11b6eb5bbd00fdd54fe23632207ed5"
},
"downloads": -1,
"filename": "ausweather-0.9.tar.gz",
"has_sig": false,
"md5_digest": "be0a9ee0783f764f956d51c5b5c0235c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1840120,
"upload_time": "2025-08-08T00:09:32",
"upload_time_iso_8601": "2025-08-08T00:09:32.462034Z",
"url": "https://files.pythonhosted.org/packages/f5/ef/22ac9271f47473ee8767863515cfb509139eb59021e1a3d7b3973ef330c1/ausweather-0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-08 00:09:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kinverarity1",
"github_project": "ausweather",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ausweather"
}