Skip to main content

AQStat

aqstat is a command line Python tool for visualizing air quality data collected under the luftdaten.info project.

Install

aqstat is written in Python, so installation and usage is platform-independent.

Requirements

  • Install git
  • Get Python 3.7 or later
  • If you need the latest development version or you wish to modify the code, install Poetry as well.

Install latest release from PyPI

The latest release is hosted at the Python Package Index (PyPI) . To install aqstat from there, simply run:

pip install aqstat

Install latest source from GitHub

The latest development code is available at GitHub. Installation should be as simple as running the following:

git clone https://github.com/vasarhelyi/aqstat.git
cd aqstat
poetry install

As aqstat uses Poetry, all Python package dependencies will be installed automatically in a local virtual environment under .venv in the project folder.

Usage

Basic usage

Run aqstat --help to get a quick overview on the usage of aqstat. There are three basic commands currently available:

  • download helps you retreive air quality sensor data from the net to your local computer for later analysis
  • plot lets you visualize air quality data of selected sensors
  • stat generates various statistical outputs for selected sensors

An additional test command is provided as a development section to test different work-in-progress stuff.

More detailed help on individual commands is also available. For example, run aqstat download --help to get help on data download options.

To get some examples on usage, check out the doc\examples\commands.md file.

Usage with Poetry

To execute aqstat using Poetry, type poetry run aqstat from the cloned project folder.

Sensor database

Local sensor data is stored in folders named after sensor IDs. There are two basic data sources supported currently, a bit of a problem is that they use different IDs for different sensors (madavi.de uses a single chip_id, sensor.community uses a sensor_id for all sensors in a given measurement unit. Furthermore, these two sources store slightly different information about the sensors.

To obtain a general easy-to-use reference for all sensor data, a local description of all sensors can be given optionally. A simple JSON format is used for that, please check out the doc\examples\metadata.json file as an example how to fill the JSON form for a single sensor, or use the scripts\convert_luftdaten_csv_to_metadata_json.py script to generate .json files from the sensor data directly.

The overall sensor database structure should look like something like this:

12345/
67890/
Budapest-12345.json
Verőce-67890.json

The name of the .json files is arbitrary, it is useful to include human readable information, such as the location of the sensor, as in the example above.

Later on, during the usage of the plot and stat commands, filters can be defined and several outputs can be generated based on various properties given in the .json files.

Contact and collaboration

aqstat is made public and open-source to help each other in fighting air pollution. Please contact if you have any questions on usage, something is not working properly, you have new ideas or feature requests or if you would like to help in development or collaboration or wish to support the project in any way.

Metadata

Release files for aqstat 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aqstat 1.0.1
File Size Uploaded Provenance Actions
aqstat-1.0.1.tar.gz 31.3 kB Without provenance Details for aqstat-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aqstat 1.0.1
File Interpreter ABI Platform Actions
aqstat-1.0.1-py3-none-any.whl Python 3 none any Details for aqstat-1.0.1-py3-none-any.whl

Total release size: 69.7 kB

Release files / aqstat-1.0.1.tar.gz

Download URL aqstat-1.0.1.tar.gz
Size 31.3 kB
Tags Source
SHA-256 checksum
How to use checksums
753366d6ac815fbd34d4da7295b510315000e080eb3c309d581ccf1489b1243a
BLAKE2b-256 checksum
How to use checksums
19acd5245cf6125f7ba21a876621869af8325d4149d971811f7cb93d4afb61cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.5 Windows/10

Release files / aqstat-1.0.1-py3-none-any.whl

Download URL aqstat-1.0.1-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fd3c89457378cbf8d0551ee01614e1991a857efb42238759d643056e503ca6b
BLAKE2b-256 checksum
How to use checksums
5c1d074b20b94e74336e41de6a3c608addcf8d41298ef4c11035f8f4083f8bf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.5 Windows/10

Security for aqstat 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page