I'm new to Plotly, and I've stuck with below issue for days...
I want to create a sunburst chart in Plotly with data similar like below:
| continent | country | pct_under_20 | population |
|---|---|---|---|
| Asia | Japan | 16.10% | 123M |
| Asia | Laos | 15.20% | 7M |
| Europe | Germany | 18.50% | 83M |
| Europe | Italy | 17.30% | 58M |
I'd like to create a colour scheme based on the categorical columns 'continent' and 'country', assigning similar color segments to countries within the same continent to visually group them together.
Additionally I'd like to create another colour scheme based on the intensity of the 'pct_under_20' column, assigning more intense colours to represent higher values of 'pct_under_20,' providing a comparison between for 'pct_under_20' across all countries.
The size of the sunburst segment is 'population'.
I've been searching online and couldn't find what I'm looking for. It seems that I can either apply colour based on intensity or category, but not both. I'm wondering if I can create a customised colour map to specify the colour for each segment...
I'd be really appreciated if anyone can share some lights on this.
searched online and plotly documentation. Can't find the solution to my problem.