Spaces:
Runtime error
Runtime error
Tomatolinn
commited on
Commit
•
40e3143
1
Parent(s):
d486829
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,9 @@ import vega_datasets
|
|
14 |
|
15 |
#load data
|
16 |
df2=pd.read_csv("https://raw.githubusercontent.com/dallascard/SI649_public/main/altair_hw3/approval_topline.csv")
|
|
|
|
|
|
|
17 |
# Import panel and vega datasets
|
18 |
|
19 |
import panel as pn
|
|
|
14 |
|
15 |
#load data
|
16 |
df2=pd.read_csv("https://raw.githubusercontent.com/dallascard/SI649_public/main/altair_hw3/approval_topline.csv")
|
17 |
+
df2['timestamp']=pd.to_datetime(df2['timestamp'])
|
18 |
+
df2=pd.melt(df2, id_vars=['president', 'subgroup', 'timestamp'], value_vars=['approve','disapprove']).rename(columns={'variable':'choice', 'value':'rate'})
|
19 |
+
|
20 |
# Import panel and vega datasets
|
21 |
|
22 |
import panel as pn
|