{"id":27299639,"url":"https://github.com/aloftdata/vptstools","last_synced_at":"2025-04-12T00:43:41.589Z","repository":{"id":52191568,"uuid":"375314693","full_name":"aloftdata/vptstools","owner":"aloftdata","description":"Python library to transfer and convert vertical profile time series data","archived":false,"fork":false,"pushed_at":"2024-12-04T09:05:00.000Z","size":6169,"stargazers_count":4,"open_issues_count":15,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T00:43:34.589Z","etag":null,"topics":["aeroecology","data-transformation","oscibio","python","weather-radar"],"latest_commit_sha":null,"homepage":"https://aloftdata.github.io/vptstools/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aloftdata.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-09T10:25:34.000Z","updated_at":"2024-12-04T09:04:10.000Z","dependencies_parsed_at":"2023-01-30T01:50:14.149Z","dependency_job_id":"29e533c0-f93c-4c7d-aa08-d46192f53c4e","html_url":"https://github.com/aloftdata/vptstools","commit_stats":{"total_commits":79,"total_committers":4,"mean_commits":19.75,"dds":0.4683544303797469,"last_synced_commit":"811e76f0549fb9a191186a53f77ee2af5109e2dc"},"previous_names":["aloftdata/vptstools","enram/vptstools"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloftdata%2Fvptstools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloftdata%2Fvptstools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloftdata%2Fvptstools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloftdata%2Fvptstools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aloftdata","download_url":"https://codeload.github.com/aloftdata/vptstools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501940,"owners_count":21114681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aeroecology","data-transformation","oscibio","python","weather-radar"],"created_at":"2025-04-12T00:43:41.063Z","updated_at":"2025-04-12T00:43:41.572Z","avatar_url":"https://github.com/aloftdata.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vptstools\n\n\u003c!-- badges: start --\u003e\n[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)\n[![PyPI-Server](https://img.shields.io/pypi/v/vptstools.svg)](https://pypi.org/project/vptstools/)\n[![.github/workflows/release.yml](https://github.com/aloftdata/vptstools/actions/workflows/release.yml/badge.svg)](https://github.com/aloftdata/vptstools/actions/workflows/release.yml)\n[![repo status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13959705.svg)](https://doi.org/10.5281/zenodo.13959705)\n\u003c!-- badges: end --\u003e\n\nvptstools 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).\n\n## Installation\n\nPython 3.9+ is required. It is advised to use a [virtual environment](https://docs.python.org/3/library/venv.html) to install a set of dependencies for a project.\n\nFirst, create a virtual environment from the command prompt (terminal):\n\n```\n# for windows\nrun python -m venv \u003cPATH-TO-VENV\u003e\n\n# for linux\npython -m venv \u003cPATH-TO-VENV\u003e\n```\n\nNext, activate the created environment:\n\n```\n# for windows\n\u003cPATH-TO-VENV\u003e\\Scripts\\activate\n\n# for linux\nsource \u003cPATH-TO-VENV\u003e/bin/activate\n```\n\n\nOnce created and activated, install the package inside the virtual environment:\n\n```\npip install vptstools\n```\n\nIf you need the tools/services to transfer data (SFTP, S3) install these additional dependencies:\n\n```ini\npip install vptstools\\[transfer\\]\n```\n\n## Usage\n\nAs 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:\n\n- Convert a single local ODIM HDF5 file to a VP DataFrame:\n\n```python\nfrom vptstools.vpts import vp\n\n# Download https://aloftdata.s3-eu-west-1.amazonaws.com/baltrad/hdf5/nldbl/2013/11/23/nldbl_vp_20131123T0000Z.h5\nfile_path_h5 = \"./nldbl_vp_20131123T0000Z.h5\"\ndf_vp = vp(file_path_h5)\n```\n\n- Convert a set of locally stored ODIM HDF5 files to a VPTS DataFrame:\n\n```python\nfrom pathlib import Path\nfrom vptstools.vpts import vpts\n\n# Download files to data directory from e.g. https://aloftdata.eu/browse/?prefix=baltrad/hdf5/nldbl/2013/11/23/\nfile_paths = sorted(Path(\"./data\").rglob(\"*.h5\")) # Get all HDF5 files within the data directory\ndf_vpts = vpts(file_paths)\n```\n\n- Store a VP or VPTS DataFrame to a [VPTS CSV](https://aloftdata.eu/vpts-csv/) file:\n\n```python\nfrom vptstools.vpts import vpts_to_csv\n\nvpts_to_csv(df_vpts, \"vpts.csv\")\n```\n\n```{note}\nBoth {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.\n```\n\nTo 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`:\n\n```python\nfrom vptstools.vpts import validate_vpts\n\nreport = validate_vpts(df_vpts, schema_version=\"v1.0\")\nreport.stats[\"errors\"]\n```\n\nOther modules in the package are:\n\n- {py:mod}`vptstools.odimh5`: This module extents the implementation of the original [odimh5 package](https://pypi.org/project/odimh5/) which is now deprecated.\n- {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](#new-vptscsv-version).\n- {py:mod}`vptstools.s3`: This module contains the functions to manage the [Aloft data repository](https://aloftdata.eu/browse/) S3 bucket.\n\n## CLI endpoints\n\nIn addition to using functions in Python scripts, two vptstools routines are available to be called from the command line after installing the package:\n\n```{eval-rst}\n.. include:: click.rst\n```\n\n## Development instructions\n\nSee [contributing](docs/contributing.md) for a detailed overview and set of guidelines. If familiar with `tox`, the setup of a development environment boils down to:\n\n```shell\ntox -e dev   # Create development environment with venv and register an ipykernel.\nsource venv/bin/activate  # Activate this environment to get started\n```\n\nNext, the following set of commands are available to support development:\n\n```shell\ntox              # Run the unit tests\ntox -e docs      # Invoke sphinx-build to build the docs\ntox -e format    # Run black code formatting\n\ntox -e clean     # Remove old distribution files and temporary build artifacts (./build and ./dist)\ntox -e build     # Build the package wheels and tar\n\ntox -e linkcheck # Check for broken links in the documentation\n\ntox -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.\ntox -av          # List all available tasks\n```\n\nTo create a pinned `requirements.txt` set of dependencies, [pip-tools](https://github.com/jazzband/pip-tools) is used:\n\n```bash\npip-compile --extra transfer --resolver=backtracking`\n```\n\n\u003c!-- pyscaffold-notes --\u003e\n\n## Notes\n\n- This project has been set up using PyScaffold 4.3.1. For details and usage information on PyScaffold see https://pyscaffold.org/.\n- The `odimh5` module was originally developed and released to pypi as a separate [`odimh5`](https://pypi.org/project/odimh5/) package by Nicolas Noé ([@niconoe](https://github.com/niconoe)). Version 0.1.0 has been included into this vptstools package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloftdata%2Fvptstools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faloftdata%2Fvptstools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloftdata%2Fvptstools/lists"}