jmansfield89 commited on
Commit
89dbd56
1 Parent(s): 9071da1

Update app.py

Browse files

Center chart title

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,12 +26,12 @@ fig = px.choropleth(df, # Input Pandas DataFrame
26
  locationmode = 'USA-states') # Set to plot as US States
27
  fig.update_layout(
28
  title_text = '2019 Energy Consumption in kWh', # Create a Title
29
- geo_scope='usa' # Plot only the USA instead of globe
30
- )
31
 
32
  # Create header to display information about the data
33
  st.title("2019 US Energy Consumption By State")
34
- st.subheader("The table displays some data pulled from the EIA.gov website for 2019 US energy consumption by state in BTU, which was then converted to kWh. The heatmap is interactive and you can hover over each state to view it's 2019 energy consumption in kWh.")
35
 
36
  # Display the dataframe, and the heatmap visualization of the dataframe data
37
  df
 
26
  locationmode = 'USA-states') # Set to plot as US States
27
  fig.update_layout(
28
  title_text = '2019 Energy Consumption in kWh', # Create a Title
29
+ geo_scope='usa', # Plot only the USA instead of globe
30
+ title_x=0.5)
31
 
32
  # Create header to display information about the data
33
  st.title("2019 US Energy Consumption By State")
34
+ st.subheader("The table displays data scraped from the EIA.gov website for 2019 US energy consumption by state in BTU, which was then converted to kWh. The heatmap is interactive and you can hover over each state to view it's 2019 energy consumption in kWh.")
35
 
36
  # Display the dataframe, and the heatmap visualization of the dataframe data
37
  df