Time weighted average for water
It is a tool to calculate time weighted average for gauged water level, flow, or something similar.
Table of contents
Installation, update and uninstallation
To install
Quick installation with pip:
pip install time-weighted-average-for-water
Or from github:
pip install git+https://github.com/longavailable/time-weighted-average-for-water
Also, you can just copy related functions from twaw/twaw.py to your work.
To update
pip install --upgrade time-weighted-average-for-water
To uninstall
pip uninstall time-weighted-average-for-water
Usage
See tests/001-daily-average.py.
import pandas as pd
from twaw import dailyAverage
# load data
url_demodata = 'https://raw.githubusercontent.com/longavailable/datarepo02/main/data/twaw/test-data-for-twaw.csv'
data = pd.read_csv(url_demodata)
data['time'] = pd.to_datetime(data['time'])
# usages
items = ['Z', 'Q']
results1 = dailyAverage(data, itemHeader=items, timeHeader='time')
results2 = dailyAverage(data, itemHeader=['Z'], timeHeader='time')
results3 = dailyAverage(data, itemHeader='Q', timeHeader='time')
# export
newdata = pd.DataFrame(data=results1)
newdata2 = newdata.dropna(subset=items, how='all').sort_values(by=['year', 'month', 'day'])
if len(newdata2) > 0:
filename = 'test-o.csv'
newdata2.to_csv(filename, index=False)
else:
print('No data to export!')
How to cite
If this tool is useful to your research, star and cite it as below:
Xiaolong Liu. (2023, March 02). longavailable/time-weighted-average-for-water. Zenodo.
https://doi.org/10.5281/zenodo.7691849
Easily, you can import it to Mendeley.
Changelog
v0.1.0
- First release.
Todo
- Add a method description.
Metadata
Release files for time-weighted-average-for-water 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| time-weighted-average-for-water-0.1.0.tar.gz | 4.8 kB | Without provenance | Details for time-weighted-average-for-water-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| time_weighted_average_for_water-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for time_weighted_average_for_water-0.1.0-py3-none-any.whl |
Total release size: 10.3 kB
Release files / time-weighted-average-for-water-0.1.0.tar.gz
| Download URL | time-weighted-average-for-water-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db641464a08c8d86ee5f6e78574cd32f90dd71306f64817f989a3a44a699a93d
|
|
BLAKE2b-256 checksum How to use checksums |
6ab54bbd5366a9a57ac16a78bea45886d552aab40621e0010d9e5a5f9807cf8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / time_weighted_average_for_water-0.1.0-py3-none-any.whl
| Download URL | time_weighted_average_for_water-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5277ac2f8d128cb44970970f71cd1269d8defba5973ce7a9bf63d81a9e0c6321
|
|
BLAKE2b-256 checksum How to use checksums |
5d55f0b790a93b17b3cf8c21155cc18ecc7ab97dbc8d23381cb62bf70f0b5394
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for time-weighted-average-for-water 0.1.0
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.