The rose chart is very similar to the doughnut chart but instead of being the sectors degrees indicating the size of the value, it is the radius of the sector, this means that all sectors are equal in width but vary in height.

data = [
    {'value': 1048, 'name': 'Search Engine'},
    {'value': 735, 'name': 'Direct'},
    {'value': 580, 'name': 'Email'},
    {'value': 484, 'name': 'Union Ads'},
    {'value': 300, 'name': 'Video Ads'}
s.plt.rose(data=data, names='name', values='value', order=1)

# Same data as for the stacked barcharts
df = pd.read_csv('../data/test_stack_distribution.csv')

value_columns = [col for col in df.columns if col != "Segment"]
df = df[['Segment'] + value_columns]

doughnut_data = pd.DataFrame(columns=["name", "value"])
df_transposed = df.transpose().reset_index().drop(0)
value_columns = [col for col in df_transposed.columns if col != "index"]
doughnut_data["value"] = df_transposed[value_columns].apply(lambda row: sum(row), axis=1)
doughnut_data["name"] = df_transposed['index']

    data=doughnut_data, values='value', names='name',
    order=2, rows_size=3, cols_size=6

Last updated