vptstools
Python library to transfer and convert vertical profile time series data
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Keywords
Repository
Python library to transfer and convert vertical profile time series data
Basic Info
- Host: GitHub
- Owner: aloftdata
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://aloftdata.github.io/vptstools/
- Size: 5.88 MB
Statistics
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 15
- Releases: 6
Topics
Metadata Files
README.md
vptstools
vptstools is a Python library to transfer and convert VPTS data. VPTS (vertical profile time series) express the density, speed and direction of biological signals such as birds, bats and insects within a weather radar volume, grouped into altitude layers (height) and measured over time (datetime).
Installation
Python 3.9+ is required. It is advised to use a virtual environment to install a set of dependencies for a project.
First, create a virtual environment from the command prompt (terminal):
```
for windows
run python -m venv
for linux
python -m venv
Next, activate the created environment:
```
for windows
for linux
source
Once created and activated, install the package inside the virtual environment:
pip install vptstools
If you need the tools/services to transfer data (SFTP, S3) install these additional dependencies:
ini
pip install vptstools\[transfer\]
Usage
As a library user interested in working with ODIM HDF5 and VPTS files, the most important functions provided by the package are {py:func}vptstools.vpts.vp, {py:func}vptstools.vpts.vpts and {py:func}vptstools.vpts.vpts_to_csv, which can be used respectively to convert a single HDF5 file, a set of HDF5 files and save a VPTS DataFrame to a CSV file:
- Convert a single local ODIM HDF5 file to a VP DataFrame:
```python from vptstools.vpts import vp
Download https://aloftdata.s3-eu-west-1.amazonaws.com/baltrad/hdf5/nldbl/2013/11/23/nldblvp20131123T0000Z.h5
filepathh5 = "./nldblvp20131123T0000Z.h5" dfvp = vp(filepath_h5) ```
- Convert a set of locally stored ODIM HDF5 files to a VPTS DataFrame:
```python from pathlib import Path from vptstools.vpts import vpts
Download files to data directory from e.g. https://aloftdata.eu/browse/?prefix=baltrad/hdf5/nldbl/2013/11/23/
filepaths = sorted(Path("./data").rglob("*.h5")) # Get all HDF5 files within the data directory dfvpts = vpts(file_paths) ```
- Store a VP or VPTS DataFrame to a VPTS CSV file:
```python from vptstools.vpts import vptstocsv
vptstocsv(df_vpts, "vpts.csv") ```
{note}
Both {py:func}`vptstools.vpts.vp` and {py:func}`vptstools.vpts.vpts` have 2 other optional parameters related to the [VPTS CSV data exchange format](https://aloftdata.eu/vpts-csv/). The `vpts_csv_version` parameter defines the version of the VPTS CSV data exchange standard (default v1.0) whereas the `source_file` provides a way to define a custom [source_file](https://aloftdata.eu/vpts-csv/#source_file) field to reference the source from which the data were derived.
To validate a VPTS DataFrame against the frictionless data schema as defined by the VPTS CSV data exchange format and return a report, use the {py:func}vptstools.vpts.validate_vpts:
```python from vptstools.vpts import validate_vpts
report = validatevpts(dfvpts, schema_version="v1.0") report.stats["errors"] ```
Other modules in the package are:
- {py:mod}
vptstools.odimh5: This module extents the implementation of the original odimh5 package which is now deprecated. - {py:mod}
vptstools.vpts_csv: This module contains - for each version of the VPTS CSV exchange format - the corresponding implementation which can be used to generate a VP or VPTS DataFrame. For more information on how to support a new version of the VPTS CSV format, see contributing docs. - {py:mod}
vptstools.s3: This module contains the functions to manage the Aloft data repository S3 bucket.
CLI endpoints
In addition to using functions in Python scripts, two vptstools routines are available to be called from the command line after installing the package:
{eval-rst}
.. include:: click.rst
Development instructions
See contributing for a detailed overview and set of guidelines. If familiar with tox, the setup of a development environment boils down to:
shell
tox -e dev # Create development environment with venv and register an ipykernel.
source venv/bin/activate # Activate this environment to get started
Next, the following set of commands are available to support development:
```shell tox # Run the unit tests tox -e docs # Invoke sphinx-build to build the docs tox -e format # Run black code formatting
tox -e clean # Remove old distribution files and temporary build artifacts (./build and ./dist) tox -e build # Build the package wheels and tar
tox -e linkcheck # Check for broken links in the documentation
tox -e publish # Publish the package you have been developing to a package index server. By default, it uses testpypi. If you really want to publish your package to be publicly accessible in PyPI, use the -- --repository pypi option.
tox -av # List all available tasks
```
To create a pinned requirements.txt set of dependencies, pip-tools is used:
bash
pip-compile --extra transfer --resolver=backtracking`
Notes
- This project has been set up using PyScaffold 4.3.1. For details and usage information on PyScaffold see https://pyscaffold.org/.
- The
odimh5module was originally developed and released to pypi as a separateodimh5package by Nicolas Noé (@niconoe). Version 0.1.0 has been included into this vptstools package.
Owner
- Name: Aloft
- Login: aloftdata
- Kind: organization
- Website: https://aloftdata.eu
- Repositories: 15
- Profile: https://github.com/aloftdata
Citation (CITATION.cff)
cff-version: 1.2.0
type: software
license: MIT
title: 'vptstools: Transfer and convert vertical profile time series data'
version: 0.4.0
abstract: >-
vptstools is a Python library to transfer and convert VPTS data.
VPTS (vertical profile time series) express the density, speed and direction
of biological signals such as birds, bats and insects within a weather radar
volume, grouped into altitude layers (height) and measured over time
(datetime).
authors:
- given-names: Stijn
family-names: Van Hoey
orcid: https://orcid.org/0000-0001-6413-3185
- given-names: Nicolas
family-names: Noé
orcid: https://orcid.org/0000-0002-9503-4750
- given-names: Pieter
family-names: Huybrechts
affiliation: Research Institute for Nature and Forest (INBO)
orcid: https://orcid.org/0000-0002-6658-6062
- given-names: Peter
family-names: Desmet
email: peter.desmet@inbo.be
affiliation: Research Institute for Nature and Forest (INBO)
orcid: https://orcid.org/0000-0002-8442-8025
repository-code: https://github.com/aloftdata/vptstools
url: https://aloftdata.github.io/vptstools/
date-released: '2024-10-22'
keywords:
- data transformation
- aeroecology
- weather radar
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| stijnvanhoey | s****y@g****m | 49 |
| Peter Desmet | p****t@i****e | 27 |
| Nicolas Noé | n****e@i****e | 13 |
| Polspoel Jens | j****s@z****e | 3 |
| Pieter Huybrechts | 4****H | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 47
- Total pull requests: 21
- Average time to close issues: 4 months
- Average time to close pull requests: 7 days
- Total issue authors: 3
- Total pull request authors: 4
- Average comments per issue: 2.02
- Average comments per pull request: 1.43
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- peterdesmet (25)
- stijnvanhoey (19)
- niconoe (3)
Pull Request Authors
- stijnvanhoey (12)
- peterdesmet (6)
- PietrH (2)
- TheJenne18 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Click ==8.0.1
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- coverallsapp/github-action master composite
- actions/checkout v2 composite
- actions/setup-python v2 composite