Company
Date Published
Author
Lesley Cordero
Word count
1500
Language
English
Hacker News points
None

Summary

This tutorial explains how to create a map visualization of the United States Electoral College using Python's plotly module in a Jupyter Notebook. To start, you need to set up your environment by installing Python and Pip, and then install the necessary modules including plotly and jupyter. You also need to get an account with Plotly and obtain an API key. The tutorial then guides you through formatting data using plotly's Data class, adding labels for each state, and creating a layout class. Finally, it shows how to display the map on the Plotly website and explore different display options available. The tutorial concludes by providing embed markup that can be used to elegantly display the visualization in any HTML file.