prereise.cli.data_sources package

Subpackages

Submodules

prereise.cli.data_sources.data_source module

class prereise.cli.data_sources.data_source.DataSource[source]

Bases: object

Abstract class that defines a strict interface that future data sources need to follow in order to seamlessly integrate with the parser.

Parameters:

metaclass (abc.ABCMeta) – defaults to ABCMeta

abstract property command_help

String with a help description for the command. See add_parser function at this link for more details

abstract property command_name

String command name for argparse. See add_parser function at this link.

abstract extract()[source]

Function that takes in the arguments defined in the above property extract_arguments and downloads the appropriate data and saves it somewhere.

abstract property extract_arguments

List of dictionaries defining the various flags and parameters the user needs to pass into this command, which are subsequently passed to the below extract function. See add_argument to understand what is acceptable/unacceptable in these dictionaries.

class prereise.cli.data_sources.data_source.NotSupportedDataSource[source]

Bases: DataSource

property command_help

See prereise.cli.data_sources.data_source.DataSource.command_help()

Returns:

(str) – help messsage

extract(**kwargs)[source]

See prereise.cli.data_sources.data_source.DataSource.extract()

property extract_arguments

See prereise.cli.data_sources.data_source.DataSource.extract_arguments()

Returns:

(list) – list of arguments to pass into argparse

prereise.cli.data_sources.demand_data module

class prereise.cli.data_sources.demand_data.DemandData[source]

Bases: NotSupportedDataSource

property command_name

See prereise.cli.data_sources.data_source.DataSource.command_name()

Returns:

(str) – command name

prereise.cli.data_sources.exceptions module

exception prereise.cli.data_sources.exceptions.CommandNotSupportedError[source]

Bases: Exception

prereise.cli.data_sources.hydro_data module

class prereise.cli.data_sources.hydro_data.HydroData[source]

Bases: NotSupportedDataSource

property command_name

See prereise.cli.data_sources.data_source.DataSource.command_name()

Returns:

(str) – command name

prereise.cli.data_sources.solar_data module

class prereise.cli.data_sources.solar_data.SolarDataGriddedAtmospheric[source]

Bases: DataSource

property command_help

See prereise.cli.data_sources.data_source.DataSource.command_help()

Returns:

(str)

property command_name

See prereise.cli.data_sources.data_source.DataSource.command_name()

Returns:

(str)

extract(region, start_date, end_date, file_path, key, grid_model, **kwargs)[source]

See prereise.cli.data_sources.data_source.DataSource.extract()

Parameters:
  • region (list) – list of regions to download data for

  • start_date (str) – date designating when to start the data download

  • end_date (str) – date designating when to end the data download

  • file_path (str) – file location on local filesystem on where to store the data

  • key (str) – API key that can be requested at https://developer.nrel.gov/signup/

  • grid_model (str) – .mat file path for a grid model or a string supported by powersimdata.input.grid.Grid.SUPPORTED_MODELS

property extract_arguments

See prereise.cli.data_sources.data_source.DataSource.extract_arguments()

Returns:

(str)

class prereise.cli.data_sources.solar_data.SolarDataNationalSolarRadiationDatabase[source]

Bases: DataSource

property command_help

See prereise.cli.data_sources.data_source.DataSource.command_help()

Returns:

(str)

property command_name

See prereise.cli.data_sources.data_source.DataSource.command_name()

Returns:

(str)

extract(region, method, year, file_path, email, key, grid_model, **kwargs)[source]

See prereise.cli.data_sources.data_source.DataSource.extract()

Parameters:
  • region (list) – list of regions to download data for

  • method (str) – string indicating the modeling for power output

  • year (str) – string in the format YYYY denoting year to download from

  • file_path (str) – file location on local filesystem on where to store the data

  • email (str) – email used to sign up at https://developer.nrel.gov/signup/

  • key (str) – API key that can be requested at https://developer.nrel.gov/signup/

  • grid_model (str) – .mat file path for a grid model or a string supported by powersimdata.input.grid.Grid.SUPPORTED_MODELS

property extract_arguments

See prereise.cli.data_sources.data_source.DataSource.extract_arguments()

Returns:

(str)

prereise.cli.data_sources.wind_data module

class prereise.cli.data_sources.wind_data.WindDataRapidRefresh[source]

Bases: DataSource

property command_help

See prereise.cli.data_sources.data_source.DataSource.command_help()

Returns:

(str)

property command_name

See prereise.cli.data_sources.data_source.DataSource.command_name()

Returns:

(str)

extract(region, start_date, end_date, file_path, grid_model, no_impute, **kwargs)[source]

See prereise.cli.data_sources.data_source.DataSource.extract()

Parameters:
  • region (list) – list of regions to download wind farm data for

  • start_date (str) – date designating when to start the data download

  • end_date (str) – date designating when to end the data download

  • file_path (str) – file location on local filesystem on where to store the data

  • grid_model (str) – .mat file path for a grid model or a string supported by powersimdata.input.grid.Grid.SUPPORTED_MODELS

  • no_impute (bool) – flag used to avoid naive gaussian imputing of missing data

property extract_arguments

See prereise.cli.data_sources.data_source.DataSource.extract_arguments()

Returns:

(str)

Module contents

prereise.cli.data_sources.get_data_sources_list()[source]

Provides list of all data sources

Returns:

(list)