reVX.rpm.rpm_output.RepresentativeProfiles

class RepresentativeProfiles(clusters, cf_fpath, key=None, forecast_fpath=None)[source]

Bases: object

Methods to export representative generation profiles.

Parameters:
  • clusters (pd.DataFrame) – Single DataFrame with (gid, gen_gid, cluster_id, rank).

  • cf_fpath (str) – reV generation output file.

  • key (str | None) – Rank column to sort by to get the best ranked profile. None will use implicit logic to select the rank key.

  • forecast_fpath (str) – reV generation output file for forecast data. If this is input, profiles will be taken from forecast fpath instead of fpath gen based on a NN mapping.

Methods

export_profiles(n_profiles, clusters, ...[, ...])

Export representative profile files.

export_single_profile(clusters, cf_fpath[, ...])

Get a single representative profile timeseries dataframe.

process_forecast_clusters(clusters, ...)

Process the clusters dataframe with NN to forecast data.

classmethod process_forecast_clusters(clusters, cf_fpath, forecast_fpath)[source]

Process the clusters dataframe with NN to forecast data.

Parameters:
  • clusters (pd.DataFrame) – Single DataFrame with (gid, gen_gid, cluster_id, rank).

  • cf_fpath (str) – reV generation output file.

  • forecast_fpath (str) – reV generation output file for forecast data. If this is input, profiles will be taken from forecast fpath instead of fpath gen based on a NN mapping.

Returns:

clusters (pd.DataFrame) – Single DataFrame with additional forecast columns.

classmethod export_profiles(n_profiles, clusters, cf_fpath, fn_pro, out_dir, max_workers=1, key=None, forecast_fpath=None)[source]

Export representative profile files.

Parameters:
  • n_profiles (int) – Number of profiles to export.

  • clusters (pd.DataFrame) – RPM output clusters attribute.

  • cf_fpath (str) – Filepath to reV generation results to get profiles from.

  • fn_pro (str) – Filename for representative profile output.

  • out_dir (str) – Directory to dump output files.

  • key (str | None) – Column in clusters to sort ranks by. None will allow for default logic.

  • forecast_fpath (str) – reV generation output file for forecast data. If this is input, profiles will be taken from forecast fpath instead of fpath gen based on a NN mapping.

classmethod export_single_profile(clusters, cf_fpath, irp=0, fpath_out=None, key=None, forecast_fpath=None)[source]

Get a single representative profile timeseries dataframe.

Parameters:
  • clusters (pd.DataFrame) – Single DataFrame with (gid, gen_gid, cluster_id, rank).

  • cf_fpath (str) – reV generation output file.

  • irp (int) – Rank of profile to get. Zero is the most representative profile.

  • fpath_out (str) – Optional filepath to export files to.

  • key (str | None) – Rank column to sort by to get the best ranked profile. None will use implicit logic to select the rank key.

  • forecast_fpath (str) – reV generation output file for forecast data. If this is input, profiles will be taken from forecast fpath instead of fpath gen based on a NN mapping.