File tree Expand file tree Collapse file tree
apps/dash-opioid-epidemic Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -291,11 +291,12 @@ def display_map(year, figure):
291291 )
292292
293293 # base_url = "https://raw.githubusercontent.com/jackparmer/mapbox-counties/master/"
294- base_url = APP_PATH
295294 for bin in BINS :
295+ link = os .path .join (APP_PATH , os .path .join ("data" , os .path .join (str (year ) + "/" + bin + ".geojson" )))
296+
296297 geo_layer = dict (
297298 sourcetype = "geojson" ,
298- source = os . path . join ( base_url , os . path . join ( "data" , os . path . join ( str ( year ) + "/" + bin + ".geojson" ))) ,
299+ source = link ,
299300 type = "fill" ,
300301 color = cm [bin ],
301302 # color="blue",
@@ -305,13 +306,6 @@ def display_map(year, figure):
305306 )
306307 layout ["mapbox" ]["layers" ].append (geo_layer )
307308
308- link = os .path .join (base_url , os .path .join ("data" , os .path .join (str (year ) + "/" + "10.1-12" + ".geojson" )))
309-
310- with open ("/home/kids_on_drugs/Documents/Plotly/dash-sample-apps/apps/dash-opioid-epidemic/data/1999/0-2.geojson" ) as f :
311- data = json .load (f )
312- print ("REACH" )
313- for feature in data ["features" ]:
314- print (feature )
315309
316310 fig = dict (data = data , layout = layout )
317311 return fig
You can’t perform that action at this time.
0 commit comments