@classmethod
def run(cls, cf_profiles, rev_table, gid_col='gen_gids', profiles_dset=
    'cf_profile', rep_method='meanoid', err_method='rmse', weight=
    'gid_counts', n_profiles=1, resource_classes=None, region_map=
    'reeds_region', cap_bins=5, sort_bins_by='trans_cap_cost', pre_filter=
    None, trg_by_region=False, reg_cols=('region', 'class'), fout=None,
    hourly=True, hour_ending=True, max_workers=None):
    """Run representative profiles.

        Parameters
        ----------
        cf_profiles : str
            Filepath to reV gen output file to extract "cf_profile" from.
        rev_table : str | pd.DataFrame
            Aggregated supply curve summary table or file containing table
        gid_col : str
            Column label in rev_summary that contains the generation gids
            (data index in gen_fpath).
        profiles_dset : str
            Dataset name to pull generation profiles from.
        rep_method : str
            Method identifier for calculation of the representative profile.
        err_method : str
            Method identifier for calculation of error from the representative
            profile.
        weight : str | None
            Column in rev_summary used to apply weighted mean to profiles.
            The supply curve table data in the weight column should have
            weight values corresponding to the gid_col in the same row.
        n_profiles : int
            Number of representative profiles to save to fout.
        resource_classes : str | pandas.DataFrame | pandas.Series | dict
            Resource classes, either provided in a .csv, .json
            as a DataFrame or Series, or in a dictionary.
            If None, assumes rev_table has come from ReedsClassifier
        region_map : str | pandas.DataFrame
            Mapping of supply curve points to region to create classes for
         cap_bins : int
            Number of equal capacity bins to create for each
            region-class
        sort_bins_by : str | list, optional
            Column(s) to sort by before capacity binning,
            by default 'trans_cap_cost'
        pre_filter : dict | NoneType
            Column value pair(s) to filter on. If None don't filter
        trg_by_region : bool
            Groupby on region when computing TRGs
        reg_cols : tuple
            Label(s) for a categorical region column(s) to extract profiles
            for.
        fout : str, optional
            filepath to output h5 file, by default None
        hourly : bool, optional
            Flag to get hourly data (top of hour) instead of native resolution,
            by default True
        hour_ending : bool, optional
            Flag to shift instantaneous profiles and time index to hour ending,
            by default True
        max_workers : int, optional
            Number of parallel workers. 1 will run serial, None will use all
            available., by default None

        Returns
        -------
        profiles : dict
            dict of n_profile-keyed arrays with shape (time, n) for the
            representative profiles for each region.
        meta : pd.DataFrame
            Meta dataframes recording the regions and the selected rep profile
            gid.
        time_index : pd.DatatimeIndex
            Datetime Index for represntative profiles
        """
    rp = cls(cf_profiles, rev_table, gid_col=gid_col, profiles_dset=
        profiles_dset, rep_method=rep_method, err_method=err_method, weight
        =weight, n_profiles=n_profiles, resource_classes=resource_classes,
        region_map=region_map, cap_bins=cap_bins, sort_bins_by=sort_bins_by,
        pre_filter=pre_filter, trg_by_region=trg_by_region, reg_cols=reg_cols)
    rp._run(fout=fout, hourly=hourly, hour_ending=hour_ending, max_workers=
        max_workers)
    return rp.profiles, rp.meta, rp.time_index
