Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -16,11 +16,15 @@ fs = project.get_feature_store()
|
|
16 |
|
17 |
|
18 |
def air_quality(city):
|
|
|
19 |
weather_df = pd.DataFrame()
|
20 |
for i in range(8):
|
21 |
weather_data = get_weather_df([get_weather_data((datetime.now() + timedelta(days=i)).strftime("%Y-%m-%d"))])
|
22 |
weather_df = weather_df.append(weather_data)
|
23 |
|
|
|
|
|
|
|
24 |
print(weather_df)
|
25 |
|
26 |
weather_df = weather_df.drop(columns=["feelslikemin", "feelslikemax","precipprob", "snow", "snowdepth", "uvindex", "date","city","conditions"]).fillna(0)
|
|
|
16 |
|
17 |
|
18 |
def air_quality(city):
|
19 |
+
air_quality_df = pd.DataFrame()
|
20 |
weather_df = pd.DataFrame()
|
21 |
for i in range(8):
|
22 |
weather_data = get_weather_df([get_weather_data((datetime.now() + timedelta(days=i)).strftime("%Y-%m-%d"))])
|
23 |
weather_df = weather_df.append(weather_data)
|
24 |
|
25 |
+
quality_data= get_air_quality_df([get_air_quality_data(city,(datetime.now() + timedelta(days=i)).strftime("%Y-%m-%d"))])
|
26 |
+
air_quality_df=air_quality_df.append(quality_data)
|
27 |
+
print(air_quality_df)
|
28 |
print(weather_df)
|
29 |
|
30 |
weather_df = weather_df.drop(columns=["feelslikemin", "feelslikemax","precipprob", "snow", "snowdepth", "uvindex", "date","city","conditions"]).fillna(0)
|