Name | pastastore JSON |
Version |
1.7.2
JSON |
| download |
home_page | None |
Summary | Tools for managing Pastas time series models. |
upload_time | 2024-10-15 13:03:04 |
maintainer | None |
docs_url | None |
author | D.A. Brakenhoff |
requires_python | >=3.7 |
license | The MIT License (MIT) Copyright (c) 2020 D.A. Brakenhoff Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
hydrology
groundwater
time series
analysis
database
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![pastastore](https://github.com/pastas/pastastore/workflows/pastastore/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/pastastore/badge/?version=latest)](https://pastastore.readthedocs.io/en/latest/?badge=latest)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/81b1e0294f5247cfa4eca657a8eebc61)](https://www.codacy.com/gh/pastas/pastastore?utm_source=github.com&utm_medium=referral&utm_content=pastas/pastastore&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/81b1e0294f5247cfa4eca657a8eebc61)](https://www.codacy.com/gh/pastas/pastastore/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pastas/pastastore&utm_campaign=Badge_Coverage)
![PyPI](https://img.shields.io/pypi/v/pastastore)
# pastastore
This module stores
[Pastas](https://pastas.readthedocs.io/en/latest/) time series and models in a
database.
Storing time series and models in a database allows the user to manage time
series and Pastas models on disk, which allows the user to pick up where they
left off without having to reload everything.
## Installation
Install the module with `pip install pastastore`.
For installing in development mode, clone the repository and install by typing
`pip install -e .` from the module root directory.
For plotting background maps, the `contextily` and `pyproj` packages are
required. For a full install, including optional dependencies for plotting and
labeling data on maps, use: `pip install pastastore[optional]` Windows users
are asked to install `rasterio` themselves since it often cannot be installed
using `pip`. `rasterio` is a dependency of `contextily`.
## Usage
The following snippets show typical usage. The first step is to define a
so-called `Connector` object. This object contains methods to store time series
or models to the database, or read objects from the database.
The following code creates a PasConnector, which uses Pastas JSON-styled
"`.pas`-files" to save models in a folder on your computer (in this case a
folder called `pastas_db` in the current directory).
```python
import pastastore as pst
# create connector instance
conn = pst.PasConnector(name="pastas_db", path=".")
```
The next step is to pass that connector to the `PastaStore` object. This object
contains all kinds of useful methods to analyze and visualize time series, and
build and analyze models.
```python
# create PastaStore instance
pstore = pst.PastaStore(conn)
```
Now the user can add time series, models or analyze or visualize existing
objects in the database. Some examples showing the functionality of the
PastaStore object are shown below:
```python
import pandas as pd
import pastas as ps
# load oseries from CSV and add to database
oseries = pd.read_csv("oseries.csv")
pstore.add_oseries(oseries, "my_oseries", metadata={"x": 100_000, "y": 400_000})
# read oseries from database
oseries = pstore.get_oseries("my_oseries")
# view oseries metadata DataFrame
pstore.oseries
# plot oseries location on map
ax = pstore.maps.oseries()
pstore.maps.add_background_map(ax) # add a background map
# plot my_oseries time series
ax2 = pstore.plot.oseries(names=["my_oseries"])
# create a model with pastas
ml = ps.Model(oseries, name="my_model")
# add model to database
pstore.add_model(ml)
# load model from database
ml2 = pstore.get_models("my_model")
# export whole database to a zip file
pstore.to_zip("my_backup.zip")
```
For more elaborate examples, refer to the
[Notebooks](https://pastastore.readthedocs.io/en/latest/examples.html#example-notebooks).
Raw data
{
"_id": null,
"home_page": null,
"name": "pastastore",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "\"D.A. Brakenhoff\" <d.brakenhoff@artesia-water.nl>, \"R. Calje\" <r.calje@artesia-water.nl>, \"M.A. Vonk\" <m.vonk@artesia-water.nl>",
"keywords": "hydrology, groundwater, time series, analysis, database",
"author": "D.A. Brakenhoff",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/d5/3c/89e0fc5016fae76a89566721c2db67ddacfe1cd367e0b556ca7c4c5557d9/pastastore-1.7.2.tar.gz",
"platform": null,
"description": "![pastastore](https://github.com/pastas/pastastore/workflows/pastastore/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/pastastore/badge/?version=latest)](https://pastastore.readthedocs.io/en/latest/?badge=latest)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/81b1e0294f5247cfa4eca657a8eebc61)](https://www.codacy.com/gh/pastas/pastastore?utm_source=github.com&utm_medium=referral&utm_content=pastas/pastastore&utm_campaign=Badge_Grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/81b1e0294f5247cfa4eca657a8eebc61)](https://www.codacy.com/gh/pastas/pastastore/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pastas/pastastore&utm_campaign=Badge_Coverage)\n![PyPI](https://img.shields.io/pypi/v/pastastore)\n\n# pastastore\n\nThis module stores \n[Pastas](https://pastas.readthedocs.io/en/latest/) time series and models in a\ndatabase.\n\nStoring time series and models in a database allows the user to manage time\nseries and Pastas models on disk, which allows the user to pick up where they\nleft off without having to reload everything.\n\n## Installation\n\nInstall the module with `pip install pastastore`.\n\nFor installing in development mode, clone the repository and install by typing\n`pip install -e .` from the module root directory.\n\nFor plotting background maps, the `contextily` and `pyproj` packages are\nrequired. For a full install, including optional dependencies for plotting and\nlabeling data on maps, use: `pip install pastastore[optional]` Windows users\nare asked to install `rasterio` themselves since it often cannot be installed\nusing `pip`. `rasterio` is a dependency of `contextily`.\n\n## Usage\n\nThe following snippets show typical usage. The first step is to define a\nso-called `Connector` object. This object contains methods to store time series\nor models to the database, or read objects from the database.\n\nThe following code creates a PasConnector, which uses Pastas JSON-styled\n\"`.pas`-files\" to save models in a folder on your computer (in this case a\nfolder called `pastas_db` in the current directory).\n\n```python\nimport pastastore as pst\n\n# create connector instance\nconn = pst.PasConnector(name=\"pastas_db\", path=\".\")\n```\n\nThe next step is to pass that connector to the `PastaStore` object. This object\ncontains all kinds of useful methods to analyze and visualize time series, and\nbuild and analyze models.\n\n```python\n# create PastaStore instance\npstore = pst.PastaStore(conn)\n```\n\nNow the user can add time series, models or analyze or visualize existing\nobjects in the database. Some examples showing the functionality of the\nPastaStore object are shown below:\n\n```python\nimport pandas as pd\nimport pastas as ps\n\n# load oseries from CSV and add to database\noseries = pd.read_csv(\"oseries.csv\")\npstore.add_oseries(oseries, \"my_oseries\", metadata={\"x\": 100_000, \"y\": 400_000})\n\n# read oseries from database\noseries = pstore.get_oseries(\"my_oseries\")\n\n# view oseries metadata DataFrame\npstore.oseries\n\n# plot oseries location on map\nax = pstore.maps.oseries()\npstore.maps.add_background_map(ax) # add a background map\n\n# plot my_oseries time series\nax2 = pstore.plot.oseries(names=[\"my_oseries\"])\n\n# create a model with pastas\nml = ps.Model(oseries, name=\"my_model\")\n\n# add model to database\npstore.add_model(ml)\n\n# load model from database\nml2 = pstore.get_models(\"my_model\")\n\n# export whole database to a zip file\npstore.to_zip(\"my_backup.zip\")\n```\n\nFor more elaborate examples, refer to the\n[Notebooks](https://pastastore.readthedocs.io/en/latest/examples.html#example-notebooks).\n",
"bugtrack_url": null,
"license": "The MIT License (MIT) Copyright (c) 2020 D.A. Brakenhoff Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Tools for managing Pastas time series models.",
"version": "1.7.2",
"project_urls": {
"documentation": "https://pastastore.readthedocs.io/en/latest/",
"homepage": "https://github.com/pastas/pastastore",
"repository": "https://github.com/pastas/pastastore"
},
"split_keywords": [
"hydrology",
" groundwater",
" time series",
" analysis",
" database"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fdfab4d1f2d5741f88537daea48a84f120e0f3bb12137664fc7190db8d81c4c8",
"md5": "b21a1229e1130825112d01b4ea372c50",
"sha256": "f11fb4b65c262f48b2861f36f7182d6bf6ab623bd7f6671c809c91e1dc4bd513"
},
"downloads": -1,
"filename": "pastastore-1.7.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b21a1229e1130825112d01b4ea372c50",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 78107,
"upload_time": "2024-10-15T13:03:02",
"upload_time_iso_8601": "2024-10-15T13:03:02.913702Z",
"url": "https://files.pythonhosted.org/packages/fd/fa/b4d1f2d5741f88537daea48a84f120e0f3bb12137664fc7190db8d81c4c8/pastastore-1.7.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d53c89e0fc5016fae76a89566721c2db67ddacfe1cd367e0b556ca7c4c5557d9",
"md5": "549752e79628bc0be54941cb59694ad4",
"sha256": "316a45e5981f889d18580183747f08a9b06712af37b3214dc2d8858cc7470fb0"
},
"downloads": -1,
"filename": "pastastore-1.7.2.tar.gz",
"has_sig": false,
"md5_digest": "549752e79628bc0be54941cb59694ad4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 72683,
"upload_time": "2024-10-15T13:03:04",
"upload_time_iso_8601": "2024-10-15T13:03:04.542703Z",
"url": "https://files.pythonhosted.org/packages/d5/3c/89e0fc5016fae76a89566721c2db67ddacfe1cd367e0b556ca7c4c5557d9/pastastore-1.7.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-15 13:03:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pastas",
"github_project": "pastastore",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pastastore"
}