From 9e32938cc73e55678925fa9adbff5ee323656fc8 Mon Sep 17 00:00:00 2001 From: Jose Windows Date: Sun, 29 Apr 2018 12:25:42 -0700 Subject: [PATCH] updated heatmaps and updated stock project id issue --- 1-09-Heatmaps/heat1.py | 2 +- 1-09-Heatmaps/heat2.py | 2 +- 1-09-Heatmaps/heat3.py | 2 +- 1-09-Heatmaps/heat4.py | 6 +++--- 2-17-CodeAlongMilestoneProject/StockTicker1.py | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/1-09-Heatmaps/heat1.py b/1-09-Heatmaps/heat1.py index dc31e6a1b..77589b631 100644 --- a/1-09-Heatmaps/heat1.py +++ b/1-09-Heatmaps/heat1.py @@ -10,7 +10,7 @@ data = [go.Heatmap( x=df['DAY'], y=df['LST_TIME'], - z=df['T_HR_AVG'].values.tolist(), + z=df['T_HR_AVG'], colorscale='Jet' )] diff --git a/1-09-Heatmaps/heat2.py b/1-09-Heatmaps/heat2.py index efe5f98f6..fc03f17e4 100644 --- a/1-09-Heatmaps/heat2.py +++ b/1-09-Heatmaps/heat2.py @@ -10,7 +10,7 @@ data = [go.Heatmap( x=df['DAY'], y=df['LST_TIME'], - z=df['T_HR_AVG'].values.tolist(), + z=df['T_HR_AVG'], colorscale='Jet' )] diff --git a/1-09-Heatmaps/heat3.py b/1-09-Heatmaps/heat3.py index 1c536a598..e2ab432e8 100644 --- a/1-09-Heatmaps/heat3.py +++ b/1-09-Heatmaps/heat3.py @@ -10,7 +10,7 @@ data = [go.Heatmap( x=df['DAY'], y=df['LST_TIME'], - z=df['T_HR_AVG'].values.tolist(), + z=df['T_HR_AVG'], colorscale='Jet' )] diff --git a/1-09-Heatmaps/heat4.py b/1-09-Heatmaps/heat4.py index 01a6b074e..88c55b145 100644 --- a/1-09-Heatmaps/heat4.py +++ b/1-09-Heatmaps/heat4.py @@ -15,21 +15,21 @@ trace1 = go.Heatmap( x=df1['DAY'], y=df1['LST_TIME'], - z=df1['T_HR_AVG'].values.tolist(), + z=df1['T_HR_AVG'], colorscale='Jet', zmin = 5, zmax = 40 # add max/min color values to make each plot consistent ) trace2 = go.Heatmap( x=df2['DAY'], y=df2['LST_TIME'], - z=df2['T_HR_AVG'].values.tolist(), + z=df2['T_HR_AVG'], colorscale='Jet', zmin = 5, zmax = 40 ) trace3 = go.Heatmap( x=df3['DAY'], y=df3['LST_TIME'], - z=df3['T_HR_AVG'].values.tolist(), + z=df3['T_HR_AVG'], colorscale='Jet', zmin = 5, zmax = 40 ) diff --git a/2-17-CodeAlongMilestoneProject/StockTicker1.py b/2-17-CodeAlongMilestoneProject/StockTicker1.py index 83d2850b7..075cb352b 100644 --- a/2-17-CodeAlongMilestoneProject/StockTicker1.py +++ b/2-17-CodeAlongMilestoneProject/StockTicker1.py @@ -17,9 +17,11 @@ html.H1('Stock Ticker Dashboard'), html.H3('Enter a stock symbol:'), dcc.Input( + id='my_stock_ticker' value='TSLA' # sets a default value ), dcc.Graph( + id='my_graph' figure={ 'data': [ {'x': [1,2], 'y': [3,1]}