Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,24 +37,8 @@ def gen_load() -> pd.DataFrame:
|
|
37 |
|
38 |
#AI Emotional State Score: Anxiety, Confusion, Trepidation, Fear, Guilt
|
39 |
|
40 |
-
@st.cache(allow_output_mutation=True)
|
41 |
-
def gen_load_old() -> pd.DataFrame:
|
42 |
-
# file = pd.read_csv('us-zip-code-latitude-and-longitude.txt',names = ['Zip','City','State','lat','lon','Timezone',"Daylight Savings", "Geo point"], skiprows=1, delimiter=";")
|
43 |
-
filename = "US.txt"
|
44 |
-
file = pd.read_csv(filename,names = ['Country','Zip','City','State','Abb','Name1','Code1','Name2','Code2','lat','lon','Accuracy'], delimiter="\t",usecols=["Zip","City","State","Abb","lat","lon"])
|
45 |
-
file['Zip'] = file['Zip'].astype(str).str.zfill(5)
|
46 |
-
w = lambda x: (x[-5:])
|
47 |
-
filename = "NPIProviders.xlsx"
|
48 |
-
df = pd.read_csv('Locations.csv',header = None,names = ['Zip','TIN','Name', 'Services','Age','Gender','StartDate','Questions','Entity'], skiprows=1,converters={'Zip':w },usecols="A,B,C,D,E,F,G,H,I")
|
49 |
-
'Zip','TIN','Name', 'Services','Age','Gender','StartDate','Questions','Entity'
|
50 |
-
|
51 |
-
df = df.merge(file, left_on = 'Zip', right_on = 'Zip', how='inner')
|
52 |
-
df = df.fillna(" ")
|
53 |
-
return df
|
54 |
|
55 |
#queried_ctss = st.multiselect("Ctss",options=gen_load()["Ctss"].value_counts().reset_index())
|
56 |
-
|
57 |
-
@st.cache(allow_output_mutation=True)
|
58 |
def load_data(state = None,zip_code = None,city = None,age = None,male = None,female = None,selected_cohorts = None) -> pd.DataFrame:
|
59 |
df = gen_load()
|
60 |
try:
|
|
|
37 |
|
38 |
#AI Emotional State Score: Anxiety, Confusion, Trepidation, Fear, Guilt
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
#queried_ctss = st.multiselect("Ctss",options=gen_load()["Ctss"].value_counts().reset_index())
|
|
|
|
|
42 |
def load_data(state = None,zip_code = None,city = None,age = None,male = None,female = None,selected_cohorts = None) -> pd.DataFrame:
|
43 |
df = gen_load()
|
44 |
try:
|