Skip to content

Instantly share code, notes, and snippets.

@srang992
Created October 17, 2022 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srang992/62cf5997ed5f90fee55b326498fc4861 to your computer and use it in GitHub Desktop.
Save srang992/62cf5997ed5f90fee55b326498fc4861 to your computer and use it in GitHub Desktop.
subway_california_counties = subway_chains[subway_chains['State']=='California']
subway_urban_counties_of_los = subway_chains[subway_chains['CNTY_NAME']=='Los Angeles']
subway_urban = subway_chains[subway_chains['UA_NAME_MOD']=='Los Angeles--Long Beach--Anaheim']
titles = ['Subway in US States', 'Subway in Counties of California', 'Subway in Urbans of Los Angeles', 'Subway Cuisines in Urbans of Los Angeles']
df1 = count_df(subway_chains, 'State').head(5)
df2 = count_df(subway_california_counties, 'CNTY_NAME').head(5)
df3 = count_df(subway_urban_counties_of_los, 'UA_NAME_MOD').head(3)
df4 = count_df(subway_urban, 'Cuisine').head(5)
dfs = [df1, df2, df3, df4]
fig = multi_donut_charts(dfs, 2, 2, cols, colors, titles)
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment