mattritchey commited on
Commit
b9965d6
·
verified ·
1 Parent(s): 935ded5

Update pages/Weather API.py

Browse files
Files changed (1) hide show
  1. pages/Weather API.py +2 -2
pages/Weather API.py CHANGED
@@ -64,7 +64,7 @@ def graph_within_date_range(d, number_days_range):
64
  return data.drop(columns=['date']), data_agg
65
 
66
 
67
- @st.cache_data
68
  def get_weather_data(lat, lon, start_date, end_date):
69
 
70
  url = f'https://archive-api.open-meteo.com/v1/archive?latitude={lat}&longitude={lon}&start_date={start_date}&end_date={end_date}&hourly=temperature_2m,precipitation,windspeed_10m,windgusts_10m&models=best_match&temperature_unit=fahrenheit&windspeed_unit=mph&precipitation_unit=inch'
@@ -84,7 +84,7 @@ def get_weather_data(lat, lon, start_date, end_date):
84
  return data.drop(columns=['date']), data_agg
85
 
86
 
87
- @st.cache_data
88
  def convert_df(df):
89
  return df.to_csv(index=0).encode('utf-8')
90
 
 
64
  return data.drop(columns=['date']), data_agg
65
 
66
 
67
+ @st.cache
68
  def get_weather_data(lat, lon, start_date, end_date):
69
 
70
  url = f'https://archive-api.open-meteo.com/v1/archive?latitude={lat}&longitude={lon}&start_date={start_date}&end_date={end_date}&hourly=temperature_2m,precipitation,windspeed_10m,windgusts_10m&models=best_match&temperature_unit=fahrenheit&windspeed_unit=mph&precipitation_unit=inch'
 
84
  return data.drop(columns=['date']), data_agg
85
 
86
 
87
+ @st.cache
88
  def convert_df(df):
89
  return df.to_csv(index=0).encode('utf-8')
90