Name | rrrcn JSON |
Version |
0.2.0
JSON |
| download |
home_page | https://github.com/Doradx/rrrcn |
Summary | A Python package for getting rainfall data from China Meteorological Administration and local meteorological bureaus. |
upload_time | 2023-03-28 02:43:06 |
maintainer | |
docs_url | None |
author | Dorad |
requires_python | >=3.6 |
license | |
keywords |
rainfall
china
river
reservoir
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# RRRCN - Rainfall, River and Reservoir Collecter for China
![](https://img.shields.io/github/v/tag/Doradx/rrrcn) ![](https://img.shields.io/pypi/pyversions/rrrcn) [![](https://img.shields.io/pypi/wheel/rrrcn)](https://pypi.org/project/rrrcn/) ![](https://img.shields.io/github/license/Doradx/rrrcn)
[![](https://img.shields.io/github/stars/Doradx/rrrcn?logo=github)](https://github.com/Doradx/rrrcn/stargazers) [![](https://img.shields.io/github/forks/Doradx/rrrcn?logo=github)](https://github.com/Doradx/rrrcn/network) [![](https://img.shields.io/github/last-commit/Doradx/rrrcn?logo=github)](https://github.com/Doradx/rrrcn/commits) [![](https://img.shields.io/badge/blog-%40Dorad-blue)](http://blog.cuger.cn)
A python script for hydrological data collection, integrating some APIs from the Chinese Ministry of Water Resources and Hubei Hydrological Bureau.
# Usage
## Installation
```bash
pip install rrrcn
```
## Eaxamples
### Featch the latest river data from MWR
```python
from datetime import datetime
import rrrcn.Hubei as Hubei
import rrrcn.MWR as MWR
if __name__ == '__main__':
print("Test Hubei...")
for s in [
Hubei.PopularStationReport(),
Hubei.RiverStationReport(),
Hubei.ReservoirStationReport(),
Hubei.RainfallStation(),
Hubei.WeirGateStation(),
]:
today_data = s.query_latest_data()
print("Total %s data: %s" % (s.__class__.__name__, len(today_data)))
if isinstance(s, Hubei.RainfallStation) or isinstance(s, Hubei.WeirGateStation):
history_data = s.query_history_data(datetime(2021, 1, 1), datetime(2021, 1, 2))
print("Total %s history data: %s" % (s.__class__.__name__, len(history_data)))
print("Test MWR...")
for s in [
MWR.RainfallStation(),
MWR.RiverStation(),
MWR.ReservoirStation(),
]:
latest_data = s.query_latest_data()
print("Total %s latest data: %s" % (s.__class__.__name__, len(latest_data)))
```
## Function Lists
### [MWR](http://xxfb.mwr.cn/sq_djdh.html)
| Class | Funtion | Remark | URL |
| -------------------------- | ------------------- | ---------------------------------------------- | ---------------------------------------------------- |
| rrrcn.MWR.RainfallStation | query_latest_data() | query the latest daily rianfall data from MWR | [全国重点站实时雨情](http://xxfb.mwr.cn/sq_zdysq.html) |
| rrrcn.MWR.ReservoirStation | query_latest_data() | query the latest daily reservoir data from MWR | [全国大型水库实时水情](http://xxfb.mwr.cn/sq_dxsk.html) |
| rrrcn.MWR.RiverStation | query_latest_data() | query the latest daily river data from MWR | [全国大江大河实时水情](http://xxfb.mwr.cn/sq_djdh.html) |
### [Hubei](http://113.57.190.228:8001/)
| Class | Funtion | Remark | URL |
| ---------------------------------- | ----------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| rrrcn.Hubei.PopularStationReport | query_latest_data() | query the latest popular daily data | [湖北省常用水情报表](http://xxfb.mwr.cn/sq_djdh.html) |
| | query_data_at(datetime) | query the daily river data at datetime | |
| rrrcn.Hubei.ReservoirStationReport | query_latest_data() | query the latest popular daily data | [湖北省大型水库水情简报](http://113.57.190.228:8001/#!/web/Report/RiverReport) |
| | query_data_at(datetime) | query the daily reservoir data at datetime | |
| rrrcn.Hubei.RiverStationReport | query_latest_data() | query the latest daily river data | [全省各市(州、区)主要河道站实时水情](http://113.57.190.228:8001/#!/web/Report/RiverReport) |
| | query_data_at(datetime) | query the daily river data at datetime | |
| rrrcn.Hubei.RainfallStation | query_latest_data() | query the latest daily rainfall data | [湖北省主要雨量站雨情](http://113.57.190.228:8001/#!/web/Report/RiverReport) |
| | query_data_at(datetime) | query the daily rainfall data at datetime | |
| | query_history_data(start_at,end_at) | query the history rainfall data from start_at to end_at | |
| rrrcn.Hubei.WeirGateStation | query_latest_data() | query the latest daily weir gate data | [湖北省主要堰闸站水情](http://113.57.190.228:8001/#!/web/Report/RiverReport) |
| | query_data_at(datetime) | query the daily weir gate data at datetime | |
| | query_history_data(start_at,end_at) | query the history weir gate data from start_at to end_at | |
# Author
[Dorad](https://github.com/Doradx), xxdorad@gmail.com
# Data Source
- [全国水雨情信息 (mwr.cn)](http://xxfb.mwr.cn/sq_zdysq.html)
- [千里眼水雨情信息查询系统](http://113.57.190.228:8001/#!/web/Report/RiverReport)
Raw data
{
"_id": null,
"home_page": "https://github.com/Doradx/rrrcn",
"name": "rrrcn",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "rainfall,china,river,reservoir",
"author": "Dorad",
"author_email": "xxdorad@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/24/00/6a2a57763fdabaf0a7dedc35d5c35bd7a787a16208fe2ff2b8fe8dc2412c/rrrcn-0.2.0.tar.gz",
"platform": null,
"description": "# RRRCN - Rainfall, River and Reservoir Collecter for China\n\n![](https://img.shields.io/github/v/tag/Doradx/rrrcn) ![](https://img.shields.io/pypi/pyversions/rrrcn) [![](https://img.shields.io/pypi/wheel/rrrcn)](https://pypi.org/project/rrrcn/) ![](https://img.shields.io/github/license/Doradx/rrrcn)\n[![](https://img.shields.io/github/stars/Doradx/rrrcn?logo=github)](https://github.com/Doradx/rrrcn/stargazers) [![](https://img.shields.io/github/forks/Doradx/rrrcn?logo=github)](https://github.com/Doradx/rrrcn/network) [![](https://img.shields.io/github/last-commit/Doradx/rrrcn?logo=github)](https://github.com/Doradx/rrrcn/commits) [![](https://img.shields.io/badge/blog-%40Dorad-blue)](http://blog.cuger.cn)\n\nA python script for hydrological data collection, integrating some APIs from the Chinese Ministry of Water Resources and Hubei Hydrological Bureau.\n\n# Usage\n\n## Installation\n\n```bash\npip install rrrcn\n```\n\n## Eaxamples\n\n### Featch the latest river data from MWR\n\n```python\nfrom datetime import datetime\nimport rrrcn.Hubei as Hubei\nimport rrrcn.MWR as MWR\n\nif __name__ == '__main__':\n print(\"Test Hubei...\")\n for s in [\n Hubei.PopularStationReport(),\n Hubei.RiverStationReport(),\n Hubei.ReservoirStationReport(),\n Hubei.RainfallStation(),\n Hubei.WeirGateStation(),\n ]:\n today_data = s.query_latest_data()\n print(\"Total %s data: %s\" % (s.__class__.__name__, len(today_data)))\n if isinstance(s, Hubei.RainfallStation) or isinstance(s, Hubei.WeirGateStation):\n history_data = s.query_history_data(datetime(2021, 1, 1), datetime(2021, 1, 2))\n print(\"Total %s history data: %s\" % (s.__class__.__name__, len(history_data)))\n print(\"Test MWR...\")\n for s in [\n MWR.RainfallStation(),\n MWR.RiverStation(),\n MWR.ReservoirStation(),\n ]:\n latest_data = s.query_latest_data()\n print(\"Total %s latest data: %s\" % (s.__class__.__name__, len(latest_data)))\n\n```\n\n## Function Lists\n\n### [MWR](http://xxfb.mwr.cn/sq_djdh.html)\n\n| Class | Funtion | Remark | URL |\n| -------------------------- | ------------------- | ---------------------------------------------- | ---------------------------------------------------- |\n| rrrcn.MWR.RainfallStation | query_latest_data() | query the latest daily rianfall data from MWR | [\u5168\u56fd\u91cd\u70b9\u7ad9\u5b9e\u65f6\u96e8\u60c5](http://xxfb.mwr.cn/sq_zdysq.html) |\n| rrrcn.MWR.ReservoirStation | query_latest_data() | query the latest daily reservoir data from MWR | [\u5168\u56fd\u5927\u578b\u6c34\u5e93\u5b9e\u65f6\u6c34\u60c5](http://xxfb.mwr.cn/sq_dxsk.html) |\n| rrrcn.MWR.RiverStation | query_latest_data() | query the latest daily river data from MWR | [\u5168\u56fd\u5927\u6c5f\u5927\u6cb3\u5b9e\u65f6\u6c34\u60c5](http://xxfb.mwr.cn/sq_djdh.html) |\n\n### [Hubei](http://113.57.190.228:8001/)\n\n| Class | Funtion | Remark | URL |\n| ---------------------------------- | ----------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------- |\n| rrrcn.Hubei.PopularStationReport | query_latest_data() | query the latest popular daily data | [\u6e56\u5317\u7701\u5e38\u7528\u6c34\u60c5\u62a5\u8868](http://xxfb.mwr.cn/sq_djdh.html) |\n| | query_data_at(datetime) | query the daily river data at datetime | |\n| rrrcn.Hubei.ReservoirStationReport | query_latest_data() | query the latest popular daily data | [\u6e56\u5317\u7701\u5927\u578b\u6c34\u5e93\u6c34\u60c5\u7b80\u62a5](http://113.57.190.228:8001/#!/web/Report/RiverReport) |\n| | query_data_at(datetime) | query the daily reservoir data at datetime | |\n| rrrcn.Hubei.RiverStationReport | query_latest_data() | query the latest daily river data | [\u5168\u7701\u5404\u5e02\uff08\u5dde\u3001\u533a\uff09\u4e3b\u8981\u6cb3\u9053\u7ad9\u5b9e\u65f6\u6c34\u60c5](http://113.57.190.228:8001/#!/web/Report/RiverReport) |\n| | query_data_at(datetime) | query the daily river data at datetime | |\n| rrrcn.Hubei.RainfallStation | query_latest_data() | query the latest daily rainfall data | [\u6e56\u5317\u7701\u4e3b\u8981\u96e8\u91cf\u7ad9\u96e8\u60c5](http://113.57.190.228:8001/#!/web/Report/RiverReport) |\n| | query_data_at(datetime) | query the daily rainfall data at datetime | |\n| | query_history_data(start_at,end_at) | query the history rainfall data from start_at to end_at | |\n| rrrcn.Hubei.WeirGateStation | query_latest_data() | query the latest daily weir gate data | [\u6e56\u5317\u7701\u4e3b\u8981\u5830\u95f8\u7ad9\u6c34\u60c5](http://113.57.190.228:8001/#!/web/Report/RiverReport) |\n| | query_data_at(datetime) | query the daily weir gate data at datetime | |\n| | query_history_data(start_at,end_at) | query the history weir gate data from start_at to end_at | |\n\n# Author\n\n[Dorad](https://github.com/Doradx), xxdorad@gmail.com\n\n# Data Source\n\n- [\u5168\u56fd\u6c34\u96e8\u60c5\u4fe1\u606f (mwr.cn)](http://xxfb.mwr.cn/sq_zdysq.html)\n- [\u5343\u91cc\u773c\u6c34\u96e8\u60c5\u4fe1\u606f\u67e5\u8be2\u7cfb\u7edf](http://113.57.190.228:8001/#!/web/Report/RiverReport)\n",
"bugtrack_url": null,
"license": "",
"summary": "A Python package for getting rainfall data from China Meteorological Administration and local meteorological bureaus.",
"version": "0.2.0",
"split_keywords": [
"rainfall",
"china",
"river",
"reservoir"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dc9b02c81d6404f4e8389d7b72de364ca8ffe5c53c28b94d1e95400adb7d0455",
"md5": "85d193a3d21388a80b1ed2b86e916d7b",
"sha256": "c2bdd925e43eaa41d7109010b261763fab9d21315ced7e2c084502883a429713"
},
"downloads": -1,
"filename": "rrrcn-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "85d193a3d21388a80b1ed2b86e916d7b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 21087,
"upload_time": "2023-03-28T02:43:04",
"upload_time_iso_8601": "2023-03-28T02:43:04.609809Z",
"url": "https://files.pythonhosted.org/packages/dc/9b/02c81d6404f4e8389d7b72de364ca8ffe5c53c28b94d1e95400adb7d0455/rrrcn-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "24006a2a57763fdabaf0a7dedc35d5c35bd7a787a16208fe2ff2b8fe8dc2412c",
"md5": "669e704495ceb9438dad2332376e84ea",
"sha256": "25b376e099ffb551eb29f47f882b86028304bedd993f1bc295f9aa354854da5c"
},
"downloads": -1,
"filename": "rrrcn-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "669e704495ceb9438dad2332376e84ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 21396,
"upload_time": "2023-03-28T02:43:06",
"upload_time_iso_8601": "2023-03-28T02:43:06.244763Z",
"url": "https://files.pythonhosted.org/packages/24/00/6a2a57763fdabaf0a7dedc35d5c35bd7a787a16208fe2ff2b8fe8dc2412c/rrrcn-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-28 02:43:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Doradx",
"github_project": "rrrcn",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rrrcn"
}