From the course: Data Visualizations with Plotly

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating a sunburst graph

Creating a sunburst graph - Plotly Tutorial

From the course: Data Visualizations with Plotly

Start my 1-month free trial

Creating a sunburst graph

- [Instructor] I'm excited to share this next visualization type with you as it's one of the most eye-popping and exciting that Plotly has to offer. It's known as the sunburst chart and is useful to represent proportions within hierarchical data. Let's import Plotly Express to get started. To populate our sunburst chart, we'll create a pandas data frame. The traditional way to construct a sunburst chart in Plotly requires a unique format for our data. You see our data frame has labels, parents, and values. The labels will represent segments along the sunburst chart, and the parent you define will determine where on the hierarchy that segment lives. The values will size the slices of our sunburst. Note, if your data has duplicate labels, the figure won't render and won't return an error either. This data represents the area of the earth, the share that is land versus water, and another level of detail about whether that…

Contents