A Python API wrapper for the Wisconsin environmental mesonet API: Wisconet
Project description
Wiscopy
Python wrapper for Wisconet. Currently supporting API v1.
Main Features
- Easy to use interface: simply specify the stations, datetime range, and fields you want
- Data automatically formatted into a pandas DataFrame
- Fetch large amounts of data with transparent concurrency
Install
From PyPI
base install
To install wiscopy from PyPI run
python -m pip install wiscopy
install with plotting library dependencies
python -m pip install 'wiscopy[plot]'
From conda-forge
To install and add wiscopy to a project from conda-forge with Pixi, from the project directory run
pixi add wiscopy
and to install into a particular conda environment with conda, in the activated environment run
conda install --channel conda-forge wiscopy
Usage
Fetch data from multiple stations, create a Dataframe, and plot.
import nest_asyncio # needed to run wiscopy in a notebook
import hvplot.pandas # needed for df.hvplot()
import holoviews as hv
from datetime import datetime
from wiscopy.interface import Wisconet
hv.extension('bokeh')
hv.plotting.bokeh.element.ElementPlot.active_tools = ["box_zoom"]
nest_asyncio.apply() # needed to run in notebook
w = Wisconet()
df = w.get_data(
station_ids=["maple", "arlington"],
start_time="2025-01-01",
end_time="2025-02-01",
fields=["60min_air_temp_f_avg"]
)
df.hvplot(
y="value",
by="station_id",
title="60min_air_temp_f_avg",
ylabel=df.final_units.iloc[0],
grid=True,
rot=90,
)
More examples
see more examples in notebooks/examples.ipynb, or run
pixi run start
Wisconet
Current stations
Wisconet's list of current stations shows all active station names. You can get also that list of strings in wiscopy with:
from wiscopy.interface import Wisconet
w = Wisconet()
station_names = w.all_station_names()
Wisconet also provides a map of those stations with a dropdown menu including some of the currently available fields/variables. You can determine the fields available per station in wiscopy with:
from wiscopy.interface import Wisconet
w = Wisconet()
station_names = w.all_station_names()
this_station = w.get_station(station_names[0])
fields = this_station.get_field_names()
dev install (contribute!)
1. install pixi
See pixi install guide.
2. check out from repo
git clone git@github.com:UW-Madison-DSI/wiscopy.git
3. install local editable version
cd wiscopy
pixi install
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wiscopy-0.1.5.tar.gz.
File metadata
- Download URL: wiscopy-0.1.5.tar.gz
- Upload date:
- Size: 69.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
314a16ca218f960c08f394e70d38bc9c83f91697cfff8d630b4d5d071f71159f
|
|
| MD5 |
82ad322f982d616c87d003baf92a9008
|
|
| BLAKE2b-256 |
5b007a0e018ae79189eb46d4da62a76f33912383009251611d7dea88f4040127
|
Provenance
The following attestation bundles were made for wiscopy-0.1.5.tar.gz:
Publisher:
release.yml on UW-Madison-DSI/wiscopy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wiscopy-0.1.5.tar.gz -
Subject digest:
314a16ca218f960c08f394e70d38bc9c83f91697cfff8d630b4d5d071f71159f - Sigstore transparency entry: 193868205
- Sigstore integration time:
-
Permalink:
UW-Madison-DSI/wiscopy@bd2b09b004210fc203ff2010e82d922bfef95c1c -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/UW-Madison-DSI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bd2b09b004210fc203ff2010e82d922bfef95c1c -
Trigger Event:
push
-
Statement type:
File details
Details for the file wiscopy-0.1.5-py3-none-any.whl.
File metadata
- Download URL: wiscopy-0.1.5-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93a4ec8a05e8fb1ace9821fb9d0584ae127f71c4c297d6fdb8319d203e9d2df2
|
|
| MD5 |
96096c36b77c469ee19c74f9fe4e2bff
|
|
| BLAKE2b-256 |
832798627851f5b7d982d405680dc7aa3c01f66b6a51427f533dce525906fef0
|
Provenance
The following attestation bundles were made for wiscopy-0.1.5-py3-none-any.whl:
Publisher:
release.yml on UW-Madison-DSI/wiscopy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wiscopy-0.1.5-py3-none-any.whl -
Subject digest:
93a4ec8a05e8fb1ace9821fb9d0584ae127f71c4c297d6fdb8319d203e9d2df2 - Sigstore transparency entry: 193868210
- Sigstore integration time:
-
Permalink:
UW-Madison-DSI/wiscopy@bd2b09b004210fc203ff2010e82d922bfef95c1c -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/UW-Madison-DSI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bd2b09b004210fc203ff2010e82d922bfef95c1c -
Trigger Event:
push
-
Statement type: