Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
# 19feb2023
|
| 2 |
#https://huggingface.co/spaces/keras-io/timeseries_forecasting_for_weather/
|
| 3 |
|
|
@@ -15,7 +16,7 @@ amonthday = int(today.strftime("%d"))
|
|
| 15 |
|
| 16 |
st.write(type(ayear))
|
| 17 |
st.write(("{}-{}-{}").format(ayear,amonth,amonthday))
|
| 18 |
-
adf = pd.DataFrame(columns=[
|
| 19 |
|
| 20 |
for i in range(ayear-backlogmax,ayear,1):
|
| 21 |
alink = ("https://data.weather.gov.hk/weatherAPI/opendata/opendata.php?dataType=CLMTEMP&year={}&rformat=csv&station=HKO").format(str(i))
|
|
@@ -29,8 +30,7 @@ for i in range(ayear-backlogmax,ayear,1):
|
|
| 29 |
|
| 30 |
st.write(row[0],row[1],row[2],row[3],row[4],amonth,amonthday)
|
| 31 |
adate = ("{}.{}.{} 00:00:00").format(row[2], row[1], row[0])
|
| 32 |
-
|
| 33 |
-
adf = pd.concat([adf, pd.DataFrame(aarray)], axis=0)
|
| 34 |
break
|
| 35 |
|
| 36 |
st.dataframe(adf)
|
|
|
|
| 1 |
+
|
| 2 |
# 19feb2023
|
| 3 |
#https://huggingface.co/spaces/keras-io/timeseries_forecasting_for_weather/
|
| 4 |
|
|
|
|
| 16 |
|
| 17 |
st.write(type(ayear))
|
| 18 |
st.write(("{}-{}-{}").format(ayear,amonth,amonthday))
|
| 19 |
+
adf = pd.DataFrame(columns=["Date Time","p (mbar)","T (degC)","Tpot (K)","Tdew (degC)","rh (%)","VPmax (mbar)","VPact (mbar)","VPdef (mbar)","sh (g/kg)","H2OC (mmol/mol)","rho (g/m**3)","wv (m/s)","max. wv (m/s)","wd (deg)"])
|
| 20 |
|
| 21 |
for i in range(ayear-backlogmax,ayear,1):
|
| 22 |
alink = ("https://data.weather.gov.hk/weatherAPI/opendata/opendata.php?dataType=CLMTEMP&year={}&rformat=csv&station=HKO").format(str(i))
|
|
|
|
| 30 |
|
| 31 |
st.write(row[0],row[1],row[2],row[3],row[4],amonth,amonthday)
|
| 32 |
adate = ("{}.{}.{} 00:00:00").format(row[2], row[1], row[0])
|
| 33 |
+
adf.append({"Date Time":adate,"T (degC)":row[4],})
|
|
|
|
| 34 |
break
|
| 35 |
|
| 36 |
st.dataframe(adf)
|