eeweather

Fetch NCDC ISD, TMY3, or CZ2010 weather data that corresponds to ZIP Code Tabulation Areas or Latitude/Longitude.
https://github.com/opendsm/eeweather

Keywords

weather weather-data weather-station

Keywords from Contributors

building-energy efficiency energy-data energy-efficiency

Last synced: 25 minutes ago
JSON representation

Acceptance Criteria

Repository metadata

Fetch NCDC ISD, TMY3, or CZ2010 weather data that corresponds to ZIP Code Tabulation Areas or Latitude/Longitude.

README.md

EEweather: Weather station wrangling for EEmeter

License
PyPI Version


EEweather — tools for matching to and fetching data from NCEI GHCNh, TMY3, or CZ2010 weather stations.

EEweather comes with a database of weather station metadata, ZCTA metadata, and GIS data that makes it easier to find the right weather station to use for a particular ZIP code or lat/long coordinate.

Documentation lives at opendsm.energy.

Usage

import datetime
import eeweather

station = eeweather.WeatherStation("722880")
df, warnings = station.load_data(
    datetime.datetime(2024, 1, 1, tzinfo=datetime.timezone.utc),
    datetime.datetime(2024, 12, 31, tzinfo=datetime.timezone.utc),
    frequency="hourly",
    variables=("temperature",),
)

Installation

EEweather is a python package and can be installed with pip.

$ pip install eeweather

Supported Sources of Weather Data

  • NOAA Global Historical Climatology Network hourly (GHCNh)
  • NREL Typical Meteorological Year 3 (TMY3)
  • California Energy Commission 1998-2009 Weather Normals (CZ2010)

Features

  • Match by ZIP code (ZCTA) or by lat/long coordinates
  • Use user-supplied weather station mappings
  • Match within climate zones
    • IECC Climate Zones
    • IECC Moisture Regimes
    • Building America Climate Zones
    • California Building Climate Zone Areas
  • User-friendly SQLite database of metadata compiled from primary sources
    • US Census Bureau (ZCTAs, county shapefiles)
    • Building America climate zone county lists
    • NOAA NCEI Integrated Surface Database Station History
    • NOAA GHCNh station list
    • NREL TMY3 site
  • Plot maps of outputs

Contributing

Dev installation:

$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -e .[dev]

Run tests:

$ pytest

Run tests on multiple python versions:

$ tox

Use with Docker

To use with docker-compose, use the following:

Run a tutorial notebook (copy link w/ token, open tutorial.ipynb):

$ docker-compose up jupyter

Open a shell:

$ docker-compose run --rm shell

Run tests:

$ docker-compose run --rm test

Run the CLI:

$ docker-compose run --rm eeweather --help

Notice Regarding CZ2010 Data

There may be conditions placed on their international commercial use.
They can be used within the U.S. or for non-commercial international activities without restriction.
The non-U.S. data cannot be redistributed for commercial purposes.
Re-distribution of these data by others must provide this same notification.

See further explanation here.

Metadata Yearly Updates

Every year, the metadata database needs to be updated. This can be done by running:

docker-compose run --rm eeweather rebuild-db

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 4 days ago

Total Commits: 263
Total Committers: 14
Avg Commits per committer: 18.786
Development Distribution Score (DDS): 0.551

Commits in past year: 2
Committers in past year: 1
Avg Commits per committer in past year: 2.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Phil Ngo n****l@g****m 118
Stephen Suffian s****e@o****o 57
Stephen Suffian s****n@g****m 47
Jason Chulock j****n@r****m 12
calebcanchola c****b@r****m 10
Craig Maloney c****g@d****t 6
Steve s****e@r****m 3
Arpan Kotecha a****n@o****o 3
Travis Sikes 1****e 2
hshaban h****n@g****m 1
Phil Ngo p****l@r****m 1
Peter Karman p****n@g****m 1
Cody Smith c****y@c****y 1
Vikhyati Singh v****i@o****o 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 18
Total pull requests: 81
Average time to close issues: 6 months
Average time to close pull requests: 3 months
Total issue authors: 16
Total pull request authors: 16
Average comments per issue: 4.22
Average comments per pull request: 1.04
Merged pull request: 67
Bot issues: 0
Bot pull requests: 6

Past year issues: 2
Past year pull requests: 4
Past year average time to close issues: 5 months
Past year average time to close pull requests: 7 days
Past year issue authors: 2
Past year pull request authors: 1
Past year average comments per issue: 11.0
Past year average comments per pull request: 0.75
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/opendsm/eeweather

Top Issue Authors

  • craigmaloney (2)
  • jakesherman (2)
  • TechMaz (1)
  • travis-recurve (1)
  • samuelduchesne (1)
  • amrutatkulkarni (1)
  • michaelsuhl11 (1)
  • enovity (1)
  • knithin3 (1)
  • aiasmartakis (1)
  • OneGeek (1)
  • EthanGoldman (1)
  • chrisnmills (1)
  • zf1990 (1)
  • DLDonaldson (1)

Top Pull Request Authors

  • ssuffian (31)
  • philngo (22)
  • dependabot[bot] (6)
  • travis-recurve (4)
  • jason-recurve (4)
  • canchola-recurve (3)
  • craigmaloney (2)
  • arpankotecha (1)
  • hshaban (1)
  • EnergySRE (1)
  • toshi09 (1)
  • jfenna (1)
  • Philippe06011957 (1)
  • pkarman (1)
  • caleb-canchola-recurve (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (6)

Dependencies

Pipfile pypi
  • Sphinx * develop
  • black ==18.6b4 develop
  • coverage * develop
  • pytest * develop
  • pytest-cov * develop
  • pytest-xdist * develop
  • snapshottest git://github.com/syrusakbary/snapshottest.git#54117098bd756c0fa6936f3bafab4bf85c58e943 develop
  • sphinx-autobuild * develop
  • sphinxcontrib-spelling * develop
  • tox * develop
  • twine * develop
  • typing * develop
  • Cython *
  • Pillow *
  • SQLAlchemy *
  • Shapely *
  • beautifulsoup4 *
  • matplotlib <3.0.0
  • pandas *
  • pyproj *
  • requests *
  • scipy *
  • simplejson *
docs/rtd-requirements.txt pypi
  • sphinxcontrib-spelling ==4.0.1
Dockerfile docker
  • python 3.6.6-stretch build
docker-compose.yml docker
  • eeweather_shell latest
Pipfile.lock pypi
  • 189 dependencies
setup.py pypi

Score: 6.682108597449808