Created
December 22, 2019 04:52
-
-
Save Perishleaf/853147a60d1eb786a0249a6308ca1be2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create bar plot for trace2 | |
trace2 = [] | |
for q in Types: | |
trace2.append(go.Bar( | |
x=median_price_new.sort_values([q], ascending=False).head(10)[q], | |
y=median_price_new.sort_values([q], ascending=False).head(10)['Suburb_name_geojson'].str.title().tolist(), | |
xaxis='x2', | |
yaxis='y2', | |
marker=dict( | |
color='rgba(91, 207, 135, 0.3)', | |
line=dict( | |
color='rgba(91, 207, 135, 2.0)', | |
width=0.5), | |
), | |
visible=False, | |
name='Top 10 suburbs with the highest {} median price'.format(q), | |
orientation='h', | |
)) | |
trace2[0]['visible'] = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment