Skip to content

Commit

Permalink
Added encoded favicon in the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
fccoelho committed Dec 11, 2020
1 parent 58576fe commit f54fb90
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
19 changes: 13 additions & 6 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Epigrass/epipanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
import panel.widgets as pnw
import hvplot.pandas
import param
import base64
from sqlalchemy import create_engine
import glob
# import gpdvega
from functools import lru_cache

material = pn.template.MaterialTemplate(title='Epigrass Dashboard', favicon='../egicon.png', logo='../egicon.png')
enc_icon = b'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAA3ElEQVRYhe2WWQ7DIAxEH1XvVR+dmzkfVSJngWIW0VYZKV8EZgzDmABARFkhBDxomQs8z+tFvfoxBUG8nHkBgnircAlOwlt5LzxmkN4CbgFfJeB950vSrDHxUihOwtbEKxaQScKxQTUrCU87YJE5jnEeOJJfkdkxNUcTaDCnrbb0OCJRFbavmtySer3QVcAMI/5GEmaN1utNqAIhpjwghm8/Lsg2twbTd8CsU2/AlrnTTbhDbSX/swPgr2ZIeHl6QStX8tqsi79MBqxXMNcpu+LY7Ub0i48VdOv3CSxJ9X3LgJP02QAAAABJRU5ErkJggg=='
with open('egicon.png', 'wb') as f:
f.write(base64.b64decode(enc_icon))
material = pn.template.MaterialTemplate(title='Epigrass Dashboard', favicon='egicon.png', logo='egicon.png')

pn.config.sizing_mode = 'stretch_width'
alt.renderers.set_embed_options(actions=True)
Expand Down Expand Up @@ -89,7 +93,7 @@ def read_map(fname):

# pipeline = pn.pipeline.Pipeline()
class SeriesViewer(param.Parameterized):
model_path = param.String()#default='../demos/outdata-rio')
model_path = param.String() # default='../demos/outdata-rio')
map_selector = param.ObjectSelector()
simulation_run = param.ObjectSelector()
localities = param.ObjectSelector(default='Pick a Locality', objects=[])
Expand Down Expand Up @@ -260,7 +264,7 @@ def altair_series(self):
row = alt.hconcat()
row |= base.encode(x='time', y=y_enc)
if i < len(variables):
row |= base.encode(x='time', y=variables[i+1])
row |= base.encode(x='time', y=variables[i + 1])

chart &= row
return chart
Expand Down

0 comments on commit f54fb90

Please sign in to comment.