From the course: Interactive Dashboards with Plotly and Dash

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Solution: Maps

Solution: Maps

- [Instructor] All right, everybody. Our solution code is up on the right. And one of the things that may or may not have bothered you is there's a lot of white space in this layout, so you may need to play with your height and width. We're going to get a lot of opportunities to tune this type of thing in the coming sections when we start developing dashboards. You may also have wanted to suppress your color scale, but let's go ahead and dive into the notebook. All right. And so the first step was to group our ski resorts data frame by country. Leave this as a column with as_index equals false. And then we're just grabbing the sum of LiftCapacity. Our locations column is our country column from our data frame. And because these were proper, accurate country names, we can go ahead and use location mode, country, names. I change the scope to Europe, and then we're going to color each country by that LiftCapacity sum. And when we do that and we run this, we get a nice, beautiful chart…

Contents