saih-hidrosur


Namesaih-hidrosur JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://www.github.com/Frankkkkk/python-saih-hidrosur
SummaryLibrary around SAIH Hidrosur data
upload_time2023-03-23 21:31:43
maintainer
docs_urlNone
authorFrank Villaro-Dixon
requires_python
licenseMIT License
keywords hydrology saih hidrosur
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            python-saih-hidrosur
==========================


## What is this lib ?
Python library around [S.A.I.H Hidrosur](http://www.redhidrosurmedioambiente.es/saih/) data

## How to install the lib ?
You can get it from [pypi](https://pypi.org/project/saih-hidrosur/) like so:
```
pip3 install saih-hidrosur
```

## How to use the lib
```python3
>>> import datetime
>>> from pprint import pprint as pprint
>>> from saihhidrosur import get_stations, Station

>>> pprint(get_stations())
{1: 'SIERRA MIJAS  (MA)',
 2: 'SIERRA DE LUNA (CA)',
 3: 'EMBALSE DE CHARCO REDONDO (CA)',
 4: 'DEPÓSITO REGULADOR CHARCO RDO (CA)',
 5: 'TORRE TOMA DE CHARCO REDONDO (CA)',
 6: 'LOS REALES (MA)',
 7: 'DEPÓSITO DI-1 (CA)',
 8: 'EMBALSE DE GUADARRANQUE (CA)',
 ...}


>>> murtas = Station(59)
>>> murtas
<MURTAS (GR) with sensors ['TEMPERATURA EXTERIOR', 'NIVOMETRO', 'PLUVIOMETRO']>

>>> murtas.sensors
{'NIVOMETRO': '059N02',
 'PLUVIOMETRO': '059P01',
 'TEMPERATURA EXTERIOR': '059M02'}

>>> date_from = datetime.datetime(2022, 1, 1)
>>> date_to = datetime.datetime(2022, 1, 2)
>>> murtas.sensor_values('TEMPERATURA EXTERIOR', date_from, date_to)
{datetime.datetime(2022, 10, 1, 0, 0): 15.2,
 datetime.datetime(2022, 10, 1, 1, 0): 14.7,
 …
 datetime.datetime(2022, 10, 1, 23, 0): 17.0,
 datetime.datetime(2022, 10, 2, 0, 0): 16.6}


```

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.github.com/Frankkkkk/python-saih-hidrosur",
    "name": "saih-hidrosur",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "hydrology saih hidrosur",
    "author": "Frank Villaro-Dixon",
    "author_email": "frank@villaro-dixon.eu",
    "download_url": "https://files.pythonhosted.org/packages/cd/3f/315ab7d06c075ae7eea19bd9e61b98df8095f8b30f1dd6f37323ad06a08f/saih-hidrosur-0.2.1.tar.gz",
    "platform": null,
    "description": "python-saih-hidrosur\n==========================\n\n\n## What is this lib ?\nPython library around [S.A.I.H Hidrosur](http://www.redhidrosurmedioambiente.es/saih/) data\n\n## How to install the lib ?\nYou can get it from [pypi](https://pypi.org/project/saih-hidrosur/) like so:\n```\npip3 install saih-hidrosur\n```\n\n## How to use the lib\n```python3\n>>> import datetime\n>>> from pprint import pprint as pprint\n>>> from saihhidrosur import get_stations, Station\n\n>>> pprint(get_stations())\n{1: 'SIERRA MIJAS  (MA)',\n 2: 'SIERRA DE LUNA (CA)',\n 3: 'EMBALSE DE CHARCO REDONDO (CA)',\n 4: 'DEP\u00d3SITO REGULADOR CHARCO RDO (CA)',\n 5: 'TORRE TOMA DE CHARCO REDONDO (CA)',\n 6: 'LOS REALES (MA)',\n 7: 'DEP\u00d3SITO DI-1 (CA)',\n 8: 'EMBALSE DE GUADARRANQUE (CA)',\n ...}\n\n\n>>> murtas = Station(59)\n>>> murtas\n<MURTAS (GR) with sensors ['TEMPERATURA EXTERIOR', 'NIVOMETRO', 'PLUVIOMETRO']>\n\n>>> murtas.sensors\n{'NIVOMETRO': '059N02',\n 'PLUVIOMETRO': '059P01',\n 'TEMPERATURA EXTERIOR': '059M02'}\n\n>>> date_from = datetime.datetime(2022, 1, 1)\n>>> date_to = datetime.datetime(2022, 1, 2)\n>>> murtas.sensor_values('TEMPERATURA EXTERIOR', date_from, date_to)\n{datetime.datetime(2022, 10, 1, 0, 0): 15.2,\n datetime.datetime(2022, 10, 1, 1, 0): 14.7,\n \u2026\n datetime.datetime(2022, 10, 1, 23, 0): 17.0,\n datetime.datetime(2022, 10, 2, 0, 0): 16.6}\n\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Library around SAIH Hidrosur data",
    "version": "0.2.1",
    "split_keywords": [
        "hydrology",
        "saih",
        "hidrosur"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a98700ee36b8b74ba37b0dfa879354a84f293fe95e0a1c32bdb825303da792b",
                "md5": "fc3cfac2fbd1c61adca1fdfd2b421ef6",
                "sha256": "1dc00a11a02269ab8df207f6ce527863d8faab7963dc5af164e1f14a0e5c8ca0"
            },
            "downloads": -1,
            "filename": "saih_hidrosur-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fc3cfac2fbd1c61adca1fdfd2b421ef6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4701,
            "upload_time": "2023-03-23T21:31:41",
            "upload_time_iso_8601": "2023-03-23T21:31:41.991692Z",
            "url": "https://files.pythonhosted.org/packages/0a/98/700ee36b8b74ba37b0dfa879354a84f293fe95e0a1c32bdb825303da792b/saih_hidrosur-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd3f315ab7d06c075ae7eea19bd9e61b98df8095f8b30f1dd6f37323ad06a08f",
                "md5": "f834e9fc38496f1917386c9568864bbe",
                "sha256": "128a02d77c01f63842f54de3c9ef722502b78ce036109146c2ba89a063d419c4"
            },
            "downloads": -1,
            "filename": "saih-hidrosur-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f834e9fc38496f1917386c9568864bbe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4072,
            "upload_time": "2023-03-23T21:31:43",
            "upload_time_iso_8601": "2023-03-23T21:31:43.065399Z",
            "url": "https://files.pythonhosted.org/packages/cd/3f/315ab7d06c075ae7eea19bd9e61b98df8095f8b30f1dd6f37323ad06a08f/saih-hidrosur-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-23 21:31:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Frankkkkk",
    "github_project": "python-saih-hidrosur",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "saih-hidrosur"
}
        
Elapsed time: 0.13772s