Skip to content

Instantly share code, notes, and snippets.

@srang992
Created October 18, 2022 06:12
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/e4fba7d7f0bf80376cee0bb4ea2599fe to your computer and use it in GitHub Desktop.
Save srang992/e4fba7d7f0bf80376cee0bb4ea2599fe to your computer and use it in GitHub Desktop.
olive_data = chain_data[(chain_data['RestaurantName']=='Olive Garden') & (chain_data['State']=='Texas')]
taco_data = chain_data[(chain_data['RestaurantName']=='Taco Bell') & (chain_data['State']=='California')]
panda_data = chain_data[(chain_data['RestaurantName']=='Panda Express') & (chain_data['State']=='California')]
olive_states = count_df(olive_data, 'CNTY_NAME').head(5)
taco_states = count_df(taco_data, 'CNTY_NAME').head(5)
panda_states = count_df(panda_data, 'CNTY_NAME').head(5)
titles = ['Olive Garden in Counties of Texas', 'Taco Bell in Counties of California', "Panda Express in Counties of California"]
fig = multi_donut_charts([olive_states, taco_states, panda_states], 1, 3,
['CNTY_NAME', 'CNTY_NAME', 'CNTY_NAME'], colors, titles,)
plt.tight_layout()
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment