pyValEIA.stats.tables ===================== .. py:module:: pyValEIA.stats.tables .. autoapi-nested-parse:: Functions to create tables of statistics. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: pyValEIA.stats.tables.decision_table_sat pyValEIA.stats.tables.style_df_table pyValEIA.stats.tables.lss_table_sat pyValEIA.stats.tables.style_lss_table Module Contents --------------- .. py:function:: decision_table_sat(states, sats=None, sat_key='Sat', eia_type='eia', model_name='Model', const_name='Swarm') Decision table summing hit/miss/corr-neg/false-pos states by satellite. :Parameters: **states** : pd.DataFrame DataFrame of model data including skill and local times built by multiday_states_report **sats** : list-like or NoneType List of satellites specified by `states[sat_key]` to include in table, if None all will be included (default=None) **sat_key** : str Key in `states` to access the satellite separator (default='Sat') **eia_type** : str EIA state, e.g. 'eia', 'peak', etc., that declairs what is considered a hit. **model_name** : str Model name for decision table label (default='Model') **const_name** : str Satellite constellation name (default='Swarm') :Returns: **table_frame** : pd.DataFrame DataFrame in table format separated by satellite and event state (state, non-state). Index using: table_frame.loc[( f'{const_name} {satellite}', eia_type), (model_name, eia_type)] .. !! processed by numpydoc !! .. py:function:: style_df_table(df_table, eia_type, sat_names=None) Style decision table. :Parameters: **df_table** : pd.DataFrame DataFrame created by decision_table_sat **eia_type** : str string designating which eia type is being reported **sat_names** : list-like or NoneType List of satellite names in `df_table` or None to use Swarm defaults. :Returns: **styled_frame** : pd.DataFrame Styled DataFrame :Raises: ValueError For unknown constellation name .. !! processed by numpydoc !! .. py:function:: lss_table_sat(model1, model2, model1_name='Model1', model2_name='Model2', sats=None, sat_key='Sat', const_name='Swarm') Create table including the Liemohn Skill Scores 1-4. :Parameters: **model1** : pd.DataFrame DataFrame of 1st model data including skill and local times built by multiday_states_report **model2** : pd.DataFrame DataFrame of 2nd model data including skill and local times built by multiday_states_report **model1_name** : str String of name of model1 (default='Model1') **model2_name** : str String of name for model2 (default='Model2') **sats** : list of strings kwarg swarm satellites 'A', 'B', and 'C' as default can specify just 1 or 2 **sats** : list-like or NoneType List of satellites specified by `states[sat_key]` to include in table, if None all will be included (default=None) **sat_key** : str Key in `model1` and `model2` used to access the satellite separator (default='Sat') **const_name** : str Satellite constellation name (default='Swarm') :Returns: **lss_df** : pd.DataFrame DataFrame in table format separated by satellite and Liemohn skill score .. seealso:: :obj:`io.load.multiday_states_report` .. .. !! processed by numpydoc !! .. py:function:: style_lss_table(lss_df, sat_names=None) Style the LSS decision table. :Parameters: **lss_df** : pd.DataFrame DataFrame created by lss_table_sat **sat_names** : list-like or NoneType List of satellite names in `lss_df` or None to use Swarm defaults. :Returns: **styled_table** : pd.DataFrame LSS table with dividers .. !! processed by numpydoc !!