Skip to main content

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

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythreadex-0.1.tar.gz (13.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page