ritaycw commited on
Commit
17efd4c
·
verified ·
1 Parent(s): 314d76e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -1,19 +1,19 @@
1
  # start with the setup
2
 
3
  # supress warnings about future deprecations
4
- import warnings
5
- warnings.simplefilter(action='ignore', category=FutureWarning)
6
 
7
  import pandas as pd
8
  import altair as alt
9
- import numpy as np
10
- import pprint
11
  import datetime as dt
12
  from vega_datasets import data
13
- import matplotlib.pyplot as plt
14
 
15
  # Solve a javascript error by explicitly setting the renderer
16
- alt.renderers.enable('jupyterlab')
17
 
18
  #load data
19
  # df1=pd.read_csv("https://raw.githubusercontent.com/dallascard/SI649_public/main/altair_hw3/approval_polllist.csv")
@@ -34,6 +34,10 @@ import vega_datasets
34
  pn.extension(design='bootstrap')
35
  pn.extension('vega')
36
 
 
 
 
 
37
  # Define a function to create and return a plot
38
 
39
  def create_plot(subgroup, date_range, moving_av_window):
@@ -95,8 +99,5 @@ maincol.append(window_size_slider)
95
 
96
 
97
  # set the app to be servable
98
- template = pn.template.BootstrapTemplate(
99
- title='SI649 Altair Assignment 3',
100
- )
101
  template.main.append(maincol)
102
  template.servable(title="SI649 Altair Assignment 3")
 
1
  # start with the setup
2
 
3
  # supress warnings about future deprecations
4
+ # import warnings
5
+ # warnings.simplefilter(action='ignore', category=FutureWarning)
6
 
7
  import pandas as pd
8
  import altair as alt
9
+ # import numpy as np
10
+ # import pprint
11
  import datetime as dt
12
  from vega_datasets import data
13
+ # import matplotlib.pyplot as plt
14
 
15
  # Solve a javascript error by explicitly setting the renderer
16
+ # alt.renderers.enable('jupyterlab')
17
 
18
  #load data
19
  # df1=pd.read_csv("https://raw.githubusercontent.com/dallascard/SI649_public/main/altair_hw3/approval_polllist.csv")
 
34
  pn.extension(design='bootstrap')
35
  pn.extension('vega')
36
 
37
+ template = pn.template.BootstrapTemplate(
38
+ title='SI649 Altair Assignment 3',
39
+ )
40
+
41
  # Define a function to create and return a plot
42
 
43
  def create_plot(subgroup, date_range, moving_av_window):
 
99
 
100
 
101
  # set the app to be servable
 
 
 
102
  template.main.append(maincol)
103
  template.servable(title="SI649 Altair Assignment 3")