Skip to main content

nrelpy: A tool for accessing NREL's rich library of data.

Project description

Build Status

nrelpy

Simple API to interact with the National Renewable Energy Laboratory's Annual Technology Baseline

Features and Datasets

nrelpy currently enables access to the following datasets:

  • Annual Technology Baseline
    • Transportation (2020)
    • Electricity (2019 - 2022)
  • GIS Renewable Energy Potential (state-level resolution)

Installing

This package may be installed from PyPI with

pip install nrelpy

Using

The motivation for this API is to relieve researchers of the need to carry datasets in their repositories. Therefore, the most basic function of nrelpy returns a dataset as a pandas dataframe. This basic usage is shown below.

ATB

import nrelpy.atb as ATB

year = 2022
database = 'electricity'

df = ATB.as_dataframe(year=year, database=database)

Renewable Potential

import nrelpy.re_potential as REP

df = REP.as_dataframe()

Testing

From the top-level nrelpy directory, run pytest.

You can also check the testing coverage with

pytest --cov-config=.coveragerc --cov=nrelpy
coverage html

coverage html creates a nicely formatted html page with the entire coverage report. Simply open the htmlcov/index.html file in your browser.

Contributing

Contributors should clone the repository and install an editable installation.

git clone https://github.com/samgdotson/nrelpy.git

cd nrelpy

pip install -e .

All pull requests must include appropriate, passing, tests.

Issues and feature requests are welcome.

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

nrelpy-0.2.1.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

nrelpy-0.2.1-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

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