Utility for retrieving and plotting ThreadEx data
Project description
pythreadex
Pythreadex is a simple Python utility to fetch long-term station data for the United States from ThreadEx, courtesy of ACIS (https://www.rcc-acis.org/). This utility includes a few plotting and climatology functions, as well as converting data to CSV format.
Installation
Pip
Installation is available via pip:
pip install pythreadex
From source
pythreadex can also be installed from source by cloning the GitHub repository:
git clone https://github.com/tomerburg/pythreadex
cd pythreadex
python setup.py install
Dependencies
- matplotlib >= 2.2.2
- numpy >= 1.14.3
- scipy >= 1.1.0
- pandas >= 1.3.0
Sample Usage
For full documentation and examples, please refer to Tropycal Documentation.
As of v0.3, the documentation is up-to-date following a bug that started with v0.2.5 where the documentation was not updated with each release.
Sample Usage
This sample code shows how to search through a dataset, retrieve station data, make a plot and convert the data to CSV format:
from pyhreadex import Dataset
import matplotlib.pyplot as plt
# Create an instance of Dataset
dataset = Dataset()
# Retrieve all stations in New Jersey
print(stations.search_by_state('NJ'))
# Search for Newark, NJ's station ID
station_id = dataset.search_by_name('Newark, NJ')
# Create an instance of a Station object with this station ID
station = dataset.get_station(station_id)
# Make a plot of 2023 maximum temperatures, from January to May
station.plot_temp_time_series('max', year=2023, date_range=('1/1','5/31'))
# Convert data to a CSV file
station.to_csv('newark.csv')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pythreadex-0.1.tar.gz.
File metadata
- Download URL: pythreadex-0.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ef243cb0d160aeed9b7a7106fb5f0caf740df30c9700738498f4ac56592dabb
|
|
| MD5 |
4fa7dceeb2ec7ec5c0646c1640e73177
|
|
| BLAKE2b-256 |
cbf6bfd0a00e2b3a5f09b0c496cf1521fa7df59a6f5f836592eb4800324206db
|