diff --git a/packages/calitp-data-analysis/calitp_data_analysis/geography_utils.py b/packages/calitp-data-analysis/calitp_data_analysis/geography_utils.py index 5ed28cc61e..e551354457 100644 --- a/packages/calitp-data-analysis/calitp_data_analysis/geography_utils.py +++ b/packages/calitp-data-analysis/calitp_data_analysis/geography_utils.py @@ -2,7 +2,7 @@ Utility functions for geospatial data. Some functions for dealing with census tract or other geographic unit dfs. """ -from typing import Literal, Optional, Sequence, Union, cast +from typing import Literal, Sequence, Union, cast import dask.dataframe as dd import geopandas as gpd # type: ignore @@ -21,10 +21,10 @@ def aggregate_by_geography( df: Union[pd.DataFrame, gpd.GeoDataFrame], group_cols: list, - sum_cols: Sequence[str], - mean_cols: Sequence[str], - count_cols: Sequence[str], - nunique_cols: Sequence[str], + sum_cols: Sequence, + mean_cols: Sequence, + count_cols: Sequence, + nunique_cols: Sequence, rename_cols: bool = False, ) -> pd.DataFrame: """ @@ -55,7 +55,7 @@ def aggregate_and_merge( df: Union[pd.DataFrame, gpd.GeoDataFrame], final_df: pd.DataFrame, group_cols: list, - agg_cols: Optional[str], + agg_cols: Sequence, aggregate_function: str, ): agg_df = df.pivot_table(