Smart Citizen Data
=======
[](https://zenodo.org/badge/latestdoi/97752018)
[](https://mybinder.org/v2/gh/fablabbcn/smartcitizen-data-framework/master?filepath=%2Fexamples%2Fnotebooks)
[](https://badge.fury.io/py/scdata)
[](https://github.com/fablabbcn/smartcitizen-data/actions/workflows/python-multiple-versions.yml)
Welcome to **SmartCitizen Data**. This is a data analysis framework for working with sensor data in different ways:
- Interacting with several sensors APIs
- Clean data, export and calculate metrics
- Model sensor data and calibrate sensors
- Generate data visualisations - matplotlib, ~[plotly](https://plotly.com/)~ or [uplot](https://leeoniya.github.io/uPlot)
- Generate analysis reports in html or pdf and upload them to [Zenodo](http://zenodo.org)
## Installation
You can check it out in the [](https://mybinder.org/v2/gh/fablabbcn/smartcitizen-data-framework/master?filepath=%2Fexamples%2Fnotebooks) before installing if you want. Works with `Python 3.*` (tested between 3.9 and 3.11).
You can just run:
```
pip install scdata
```
### Work on the source code
Simply clone the repository with:
```
git clone https://github.com/fablabbcn/smartcitizen-data.git
cd smartcitizen-data
```
Install `scdata` package with requirements:
```
python setup.py install
```
Or if you want to edit:
```
cd scdata
pip install --editable .
```
### Tokens and config
If you want to upload data to [Zenodo](http://zenodo.org), you will need to fill set an environment variable called `ZENODO_TOKEN` in your environment. You can get more instructions [here](https://docs.smartcitizen.me/Guides/data/Upload%20data%20to%20zenodo/) and with [this example](https://github.com/fablabbcn/smartcitizen-data/blob/master/examples/notebooks/06_upload_to_zenodo.ipynb).
A configuration file is available at `~/.config/scdata/config.yaml`, which contains a set of configurable variables to allow or not the local storage of relevant data in the data folder, normally in `~/.cache/scdata`:
```
data:
cached_data_margin: 2
load_cached_api: true
reload_metadata: true
store_cached_api: true
paths:
config: /Users/username/.config/scdata
data: /Users/username/.cache/scdata
export: /Users/username/.cache/scdata/export
interim: /Users/username/.cache/scdata/interim
inventory: ''
models: /Users/username/.cache/scdata/models
processed: /Users/username/.cache/scdata/processed
raw: /Users/username/.cache/scdata/raw
reports: /Users/username/.cache/scdata/reports
uploads: /Users/username/.cache/scdata/uploads
zenodo_real_base_url: https://zenodo.org
zenodo_sandbox_base_url: http://sandbox.zenodo.org
```
Also, `.env` files will be picked from `~/.cache/scdata`.
### Using with jupyter lab (optional)
It can also be used with `jupyter lab` or `jupyter`. For this [install juypterlab](https://github.com/jupyterlab/jupyterlab).
## Contribute
Issues and PR more than welcome!
## Funding
This work has received funding from the European Union's Horizon 2020 research and innovation program under the grant agreement [No. 689954](https://cordis.europa.eu/project/rcn/202639_en.html)
Raw data
{
"_id": null,
"home_page": "https://github.com/fablabbcn/smartcitizen-data",
"name": "scdata",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "air, sensors, Smart Citizen",
"author": "oscgonfer",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/27/df/244fac6a7220d83987ab46ec9fac4ac62fb19294ffd65df07537d0d8f953/scdata-1.2.2.tar.gz",
"platform": null,
"description": "Smart Citizen Data\n=======\n\n[](https://zenodo.org/badge/latestdoi/97752018)\n[](https://mybinder.org/v2/gh/fablabbcn/smartcitizen-data-framework/master?filepath=%2Fexamples%2Fnotebooks)\n[](https://badge.fury.io/py/scdata)\n[](https://github.com/fablabbcn/smartcitizen-data/actions/workflows/python-multiple-versions.yml)\n\nWelcome to **SmartCitizen Data**. This is a data analysis framework for working with sensor data in different ways:\n\n- Interacting with several sensors APIs\n- Clean data, export and calculate metrics\n- Model sensor data and calibrate sensors\n- Generate data visualisations - matplotlib, ~[plotly](https://plotly.com/)~ or [uplot](https://leeoniya.github.io/uPlot)\n- Generate analysis reports in html or pdf and upload them to [Zenodo](http://zenodo.org)\n\n## Installation\n\nYou can check it out in the [](https://mybinder.org/v2/gh/fablabbcn/smartcitizen-data-framework/master?filepath=%2Fexamples%2Fnotebooks) before installing if you want. Works with `Python 3.*` (tested between 3.9 and 3.11).\n\nYou can just run:\n\n```\npip install scdata\n```\n\n### Work on the source code\n\nSimply clone the repository with:\n\n```\ngit clone https://github.com/fablabbcn/smartcitizen-data.git\ncd smartcitizen-data\n```\n\nInstall `scdata` package with requirements:\n\n```\npython setup.py install\n```\n\nOr if you want to edit:\n\n```\ncd scdata\npip install --editable .\n```\n\n### Tokens and config\n\nIf you want to upload data to [Zenodo](http://zenodo.org), you will need to fill set an environment variable called `ZENODO_TOKEN` in your environment. You can get more instructions [here](https://docs.smartcitizen.me/Guides/data/Upload%20data%20to%20zenodo/) and with [this example](https://github.com/fablabbcn/smartcitizen-data/blob/master/examples/notebooks/06_upload_to_zenodo.ipynb).\n\nA configuration file is available at `~/.config/scdata/config.yaml`, which contains a set of configurable variables to allow or not the local storage of relevant data in the data folder, normally in `~/.cache/scdata`:\n\n```\ndata:\n cached_data_margin: 2\n load_cached_api: true\n reload_metadata: true\n store_cached_api: true\npaths:\n config: /Users/username/.config/scdata\n data: /Users/username/.cache/scdata\n export: /Users/username/.cache/scdata/export\n interim: /Users/username/.cache/scdata/interim\n inventory: ''\n models: /Users/username/.cache/scdata/models\n processed: /Users/username/.cache/scdata/processed\n raw: /Users/username/.cache/scdata/raw\n reports: /Users/username/.cache/scdata/reports\n uploads: /Users/username/.cache/scdata/uploads\nzenodo_real_base_url: https://zenodo.org\nzenodo_sandbox_base_url: http://sandbox.zenodo.org\n```\n\nAlso, `.env` files will be picked from `~/.cache/scdata`.\n\n### Using with jupyter lab (optional)\n\nIt can also be used with `jupyter lab` or `jupyter`. For this [install juypterlab](https://github.com/jupyterlab/jupyterlab).\n\n## Contribute\n\nIssues and PR more than welcome!\n\n## Funding\n\nThis work has received funding from the European Union's Horizon 2020 research and innovation program under the grant agreement [No. 689954](https://cordis.europa.eu/project/rcn/202639_en.html)\n",
"bugtrack_url": null,
"license": "GNU-GPL3.0",
"summary": "Analysis of sensors and time series data",
"version": "1.2.2",
"project_urls": {
"Documentation": "https://docs.smartcitizen.me/",
"Homepage": "https://github.com/fablabbcn/smartcitizen-data",
"Source Code": "https://github.com/fablabbcn/smartcitizen-data"
},
"split_keywords": [
"air",
" sensors",
" smart citizen"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e9c3c1f01c13850f45d0ed54f4906d39fab4847d3866e22ac1be033fb9f1edd5",
"md5": "4c42361378506887a431e20c7221f5fc",
"sha256": "9248f7dd66bf2208111372bd70fbd790a7918672e6a472e1b1b44a6383e4c565"
},
"downloads": -1,
"filename": "scdata-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4c42361378506887a431e20c7221f5fc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 332841,
"upload_time": "2024-11-27T13:06:24",
"upload_time_iso_8601": "2024-11-27T13:06:24.122951Z",
"url": "https://files.pythonhosted.org/packages/e9/c3/c1f01c13850f45d0ed54f4906d39fab4847d3866e22ac1be033fb9f1edd5/scdata-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "27df244fac6a7220d83987ab46ec9fac4ac62fb19294ffd65df07537d0d8f953",
"md5": "f118a65de2f3d50116a74df0b3f8c149",
"sha256": "7adaeced6616dc27250118a78fb1e0a546e865ed952cbfe741cb6a67424fbec3"
},
"downloads": -1,
"filename": "scdata-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "f118a65de2f3d50116a74df0b3f8c149",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 308927,
"upload_time": "2024-11-27T13:06:26",
"upload_time_iso_8601": "2024-11-27T13:06:26.796085Z",
"url": "https://files.pythonhosted.org/packages/27/df/244fac6a7220d83987ab46ec9fac4ac62fb19294ffd65df07537d0d8f953/scdata-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-27 13:06:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fablabbcn",
"github_project": "smartcitizen-data",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "scdata"
}