Skip to content

Commit

Permalink
further testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Llippeatt-git committed Aug 7, 2024
1 parent d7696e6 commit fdb780a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
2 changes: 0 additions & 2 deletions press_dash_lib/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def count(
index=x_column,
values=count_column,
aggfunc='nunique',
fill_value=0
)
totals.fillna(value=0, inplace=True)
return totals
Expand All @@ -58,7 +57,6 @@ def count(
index=x_column,
columns=groupby_column,
values=count_column,
fill_value=0,
aggfunc='nunique',
)
counts.fillna(value=0, inplace=True)
Expand Down
3 changes: 0 additions & 3 deletions press_dash_lib/dash_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ def aggregate(
y_column: str,
groupby_column: str = None,
aggregation_method: str = 'count',
start_year: int = None,
years_display: list[int] = None,
) -> Union[pd.Series, pd.DataFrame]:
'''Aggregate stats.
Expand All @@ -191,7 +189,6 @@ def aggregate(
totals: The series containing the counts per year
'''


msg = 'Aggregating...'
print(msg)
with st.spinner(msg):
Expand Down
2 changes: 0 additions & 2 deletions press_dash_lib/data_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ def lineplot(
# Set defaults
xs = df.index



if categories is None:
categories = df.columns
if category_colors is None:
Expand Down
6 changes: 3 additions & 3 deletions press_dash_lib/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ def request_data_axes(
def request_data_settings(
self,
st_loc,
ask_for: list[str] = ['show_total', 'cumulative', 'recategorize', 'combine_single_categories'],
ask_for: list[str] = ['cumulative', 'recategorize', 'combine_single_categories'],
local_key: str = None,
display_defaults: dict = {},
selected_settings: dict = None,
tag: str = None,
):
) -> dict:
'''Request common data settings from the user.
Args:
Expand Down Expand Up @@ -217,7 +217,7 @@ def process_filter_settings(
self,
st_loc,
df: pd.DataFrame,
ask_for: list[str] = ['categorical', 'date'],
ask_for: list[str] = ['categorical'],
local_key: str = None,
display_defaults: dict = {},
value: str = None,
Expand Down
8 changes: 2 additions & 6 deletions press_dash_lib/pages/base_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,10 @@ def main(config_fp: str, user_utils: types.ModuleType = None):

# Global settings
#st.sidebar.markdown('# Data Settings')
setting_check, toggle = builder.interface.request_data_settings(
st.sidebar,
)
setting_check, toggle = builder.interface.request_data_settings(st.sidebar)

st.sidebar.markdown('# View Settings')
builder.interface.request_view_settings(
st.sidebar
)
builder.interface.request_view_settings(st.sidebar)

# Recategorize data
selected_settings = builder.settings.common['data']
Expand Down

0 comments on commit fdb780a

Please sign in to comment.