Code Monkey home page Code Monkey logo

nrel_dev_api's Introduction

NREL Dev API

PyPI Status Python Version License

Read the documentation at https://nrel_dev_api.readthedocs.io/ Tests Codecov pre-commit Black

Access data and analysis services that NREL (National Renewable Energy Lab) provides using a python API.

Note

In order to use nrel_dev_api, you will need an API key from NREL. You can get one here.

Installation

You can install nrel_dev_api via pip from PyPI:

pip install -U nrel_dev_api

Usage

Set API Key

Globally set your NREL developer API key.

from nrel_dev_api import set_nrel_api_key

set_nrel_api_key(NREL_API_KEY)

Accesing Solar Data and Resources

PVWatts V6

Estimate the energy production of grid-connected photovoltaic (PV) energy systems using NREL's PVWatts V6 API based on a few simple location and system inputs.

from nrel_dev_api.solar import PVWattsV6

# create PVWattsV6 class and pass the necessary location and system inputs
pvwatts_v6 = PVWattsV6(system_capacity=4,
                     address="Seattle, WA",
                     azimuth=180,
                     tilt=40,
                     array_type=1,
                     module_type=1,
                     losses=10
                     )

# You can also view the details about the station.
pvwatts_v6.station_info

Query National Solar Radiation Database (NSRDB)

from nrel_dev_api.solar import NSRDB_DataQuery

nsrdb_data_query = NSRDB_DataQuery(api_key=NREL_API_KEY, wkt="POINT(91.287 23.832)")

# check the outputs
nsrdb_data_query.outputs

Data on Solar Resource

Get solar resource data for a specific location

from nrel_dev_api.solar import SolarResourceData

# get solar resource data for a specific latitude and longitude
solar_resource_data = SolarResourceData(api_key=NREL_API_KEY, lat=40, lon=-105)

# the output data is stored in the outputs attribute
solar_resource_data.outputs

Solar Datasets

Get information on the closest climate data for a location.

from nrel_dev_api.solar import SolarDatasetQuery

# create a dataset query class
solar_dataset_query = SolarDatasetQuery(api_key=NREL_API_KEY, address="San Francisco, CA")

# get the output
solar_dataset_query.outputs

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the Apache 2.0 license, nrel_dev_api is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.