Skip to content

Instantly share code, notes, and snippets.

Created February 10, 2019 14:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
def create_party_friends_count_bar_chart(self, df):
data = [
x=df.Party, # assign x as the dataframe column 'x'
py.plot(data, filename=self.__country_code+'-tw-party_politicans_count')
def create_party_politicans_count_pie_chart(self, df):
trace = go.Pie(labels=df.Party, values=df.PartyCount,
hoverinfo='label+percent', textinfo='value',
title="Twitter User per Party", titlefont=dict(
family='Courier New, monospace',
data = [trace]
py.plot(data, filename=self.__country_code+'-tw-party_friends_count')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment