mattritchey commited on
Commit
a58f93a
·
1 Parent(s): e574b53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -27,7 +27,7 @@ import rioxarray
27
  import numpy as np
28
 
29
 
30
- @st.cache_resource
31
  def geocode(address, buffer_size):
32
  try:
33
  address2 = address.replace(' ', '+').replace(',', '%2C')
@@ -49,7 +49,7 @@ def geocode(address, buffer_size):
49
  return gdf
50
 
51
 
52
- @st.cache_resource
53
  def get_pngs(date):
54
  year, month, day = date[:4], date[4:6], date[6:]
55
  url = f'https://mrms.nssl.noaa.gov/qvs/product_viewer/local/render_multi_domain_product_layer.php?mode=run&cpp_exec_dir=/home/metop/web/specific/opv/&web_resources_dir=/var/www/html/qvs/product_viewer/resources/&prod_root={prod_root}&qperate_pal_option=0&qpe_pal_option=0&year={year}&month={month}&day={day}&hour={hour}&minute={minute}&clon={lon}&clat={lat}&zoom={zoom}&width=920&height=630'
@@ -62,7 +62,6 @@ def get_pngs(date):
62
  return data2_df2.reset_index()
63
 
64
 
65
- @st.cache_resource
66
  def get_pngs_parallel(dates):
67
  results1 = Parallel(n_jobs=32, prefer="threads")(
68
  delayed(get_pngs)(i) for i in dates)
@@ -77,7 +76,7 @@ def png_data(date):
77
  return data
78
 
79
 
80
- @st.cache_resource
81
  def map_folium(data, gdf):
82
  m = folium.Map(location=[lat, lon], zoom_start=zoom, height=300)
83
  folium.Marker(
 
27
  import numpy as np
28
 
29
 
30
+
31
  def geocode(address, buffer_size):
32
  try:
33
  address2 = address.replace(' ', '+').replace(',', '%2C')
 
49
  return gdf
50
 
51
 
52
+
53
  def get_pngs(date):
54
  year, month, day = date[:4], date[4:6], date[6:]
55
  url = f'https://mrms.nssl.noaa.gov/qvs/product_viewer/local/render_multi_domain_product_layer.php?mode=run&cpp_exec_dir=/home/metop/web/specific/opv/&web_resources_dir=/var/www/html/qvs/product_viewer/resources/&prod_root={prod_root}&qperate_pal_option=0&qpe_pal_option=0&year={year}&month={month}&day={day}&hour={hour}&minute={minute}&clon={lon}&clat={lat}&zoom={zoom}&width=920&height=630'
 
62
  return data2_df2.reset_index()
63
 
64
 
 
65
  def get_pngs_parallel(dates):
66
  results1 = Parallel(n_jobs=32, prefer="threads")(
67
  delayed(get_pngs)(i) for i in dates)
 
76
  return data
77
 
78
 
79
+
80
  def map_folium(data, gdf):
81
  m = folium.Map(location=[lat, lon], zoom_start=zoom, height=300)
82
  folium.Marker(