Spaces:
Running
Running
added support for minneapolis
Browse files- app.py +1 -0
- src/tranformers/state_transforms.py +4 -0
- src/tranformers/transformers.py +2 -0
app.py
CHANGED
@@ -102,6 +102,7 @@ app_ui = ui.page_fluid(
|
|
102 |
"DEN": "Denver",
|
103 |
"DET": "Detroit",
|
104 |
"LA_C": "Los Angeles",
|
|
|
105 |
"NYC": "New York City",
|
106 |
"SLC": "Salt Lake City",
|
107 |
"SA": "San Antonio",
|
|
|
102 |
"DEN": "Denver",
|
103 |
"DET": "Detroit",
|
104 |
"LA_C": "Los Angeles",
|
105 |
+
"MNSTP": "Minneapolis",
|
106 |
"NYC": "New York City",
|
107 |
"SLC": "Salt Lake City",
|
108 |
"SA": "San Antonio",
|
src/tranformers/state_transforms.py
CHANGED
@@ -359,6 +359,10 @@ class MN(StateTransformer):
|
|
359 |
input_df = input_df.drop(columns=["full_name"])
|
360 |
return input_df
|
361 |
|
|
|
|
|
|
|
|
|
362 |
|
363 |
class MT(StateTransformer):
|
364 |
def format_data(self, input_df: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
|
359 |
input_df = input_df.drop(columns=["full_name"])
|
360 |
return input_df
|
361 |
|
362 |
+
class MNSTP(StateTransformer):
|
363 |
+
def format_data(self, input_df: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
364 |
+
input_df["zip"] = input_df["zip"].str.replace(r"\'", "", regex=True)
|
365 |
+
return input_df
|
366 |
|
367 |
class MT(StateTransformer):
|
368 |
def format_data(self, input_df: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
src/tranformers/transformers.py
CHANGED
@@ -31,6 +31,7 @@ from src.tranformers.state_transforms import (
|
|
31 |
ME,
|
32 |
MI,
|
33 |
MN,
|
|
|
34 |
MO,
|
35 |
MT,
|
36 |
NC,
|
@@ -142,3 +143,4 @@ selector.register_geo("WI", WI)
|
|
142 |
selector.register_geo("WV", WV)
|
143 |
selector.register_geo("WY", WY)
|
144 |
selector.register_geo("WAYNE_CO", WayneCo)
|
|
|
|
31 |
ME,
|
32 |
MI,
|
33 |
MN,
|
34 |
+
MNSTP,
|
35 |
MO,
|
36 |
MT,
|
37 |
NC,
|
|
|
143 |
selector.register_geo("WV", WV)
|
144 |
selector.register_geo("WY", WY)
|
145 |
selector.register_geo("WAYNE_CO", WayneCo)
|
146 |
+
selector.register_geo("MNSTP", MNSTP)
|