uscrn
Easily load U.S. Climate Reference Network (USCRN) data.
With uscrn, fetching and loading years of data for all USCRN sites1 takes just one line of code2.
Example:
import uscrn
df = uscrn.get_data(2019, "hourly", n_jobs=6) # pandas.DataFrame
ds = uscrn.to_xarray(df) # xarray.Dataset, with soil depth dimension if applicable (hourly, daily)
Both df (pandas) and ds (xarray) include dataset and variable metadata.
For df, these are in df.attrs and can be preserved by
writing to Parquet with the PyArrow engine3 with
pandas v2.1+.
df.to_parquet("uscrn_2019_hourly.parquet", engine="pyarrow")
Conda install example4:
conda create -n crn -c conda-forge python=3.11 joblib numpy pandas pyyaml requests xarray pyarrow netcdf4
conda activate crn
pip install --no-deps uscrn
-
Use
uscrn.load_meta()to load the site metadata table. ↩ -
Not counting the
importstatement... ↩ -
Or the fastparquet engine with fastparquet v2024.2.0+. ↩
-
uscrnis not yet on conda-forge. ↩
Metadata
Release files for uscrn 0.2.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 |
|---|---|---|---|---|
| uscrn-0.2.0.tar.gz | 21.2 kB | Without provenance | Details for uscrn-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uscrn-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for uscrn-0.2.0-py3-none-any.whl |
Total release size: 42.3 kB
Release files / uscrn-0.2.0.tar.gz
| Download URL | uscrn-0.2.0.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8cd00d8d079cdb3e78e0df37a1a040bf2ff79e613bf74b5fc8a237ede6ecfaf
|
|
BLAKE2b-256 checksum How to use checksums |
2cd1fd185f3256acfe1255b2bf34c121e42281b0be4fd5b62f4e3b63995c5dc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Release files / uscrn-0.2.0-py3-none-any.whl
| Download URL | uscrn-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bef12dd3a6ce19e2beca99a0cf94332cdd6a8a39897a4e0b549d3ee9483f7fce
|
|
BLAKE2b-256 checksum How to use checksums |
8f81e41366e41b9acc79dde8c29e2519a11dbea4b2b812cb68244debf182224c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Security for uscrn 0.2.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.