energia.utils.nsrdb

energia.utils.nsrdb#

Fetch data from NREL’s NSRDB database

Functions

array

array(object, dtype=None, *, copy=True, order='K', subok=False, ndmin=0,

average(a[, axis, weights, returned, keepdims])

Compute the weighted average along the specified axis.

fetch_nsrdb_data(attrs, year[, lat_lon, ...])

Fetches nsrdb data from nearest coordinates (latitude, longitude) or from county in a state matching a particular 'get' metric

to_datetime()

Convert argument to datetime.

Classes

DataFrame([data, index, columns, dtype, copy])

Two-dimensional, size-mutable, potentially heterogeneous tabular data.

cKDTree

cKDTree(data, leafsize=16, compact_nodes=True, copy_data=False,

fetch_nsrdb_data(attrs: list[str], year: int, lat_lon: tuple[float] | None = None, state: str = '', county: str = '', resolution: str = '', get: str = 'max-population', save: str | None = None) DataFrame | tuple[source]#

Fetches nsrdb data from nearest coordinates (latitude, longitude) or from county in a state matching a particular ‘get’ metric

Parameters:
  • attrs (list[str]) – attributes to fetch

  • year (int) – year of choice, e.g. 2019

  • lat_lon (tuple[float] | None) – (latitude, longitude) to fetch closest data point. Defaults to None.

  • state (str) – capitalized state name, e.g. ‘Texas’ . Defaults to ‘’.

  • county (str) – capitalized county name, e.g. ‘Brazos’ . Defaults to ‘’.

  • resolution (str) – choose from ‘halfhourly’, ‘hourly’, ‘daily’. Defaults to ‘’.

  • get (str) – Defaults to ‘max-population’. From within county choose the data point that matches one of the following. ‘max-population’, ‘max-elevation’, ‘max-landcover’ ‘min-population’, ‘min-elevation’, ‘min-landcover’

  • save (str | None) – path to save the data. Defaults to None.

Returns:

DataFrame with output data, (latitude, longitude)

Return type:

DataFrame | tuple