How to Create Map Plots with Plotly | by Caroline Arnold | Sep, 2023

How to Create Map Plots with Plotly | by Caroline Arnold | Sep, 2023

[ad_1]

5 examples from the Significant Volcanic Eruption database

Caroline Arnold
Towards Data Science
Photo by Willian Justen de Vasconcellos on Unsplash

Plotly is a great open source library for visualizing data. In this blog post, I am going to show you how to generate cartographic plots with plotly, working with the Python backend.

For illustration purposes, I will use the Significant Volcanic Eruption Database, published by the US National Centers for Environmental Information under the U.S. Government Work License. The dataset is available for download here: https://public.opendatasoft.com/explore/dataset/significant-volcanic-eruption-database/information/

You are going to see the following five visualizations:

  1. Global distribution of significant volcanic eruptions
  2. Volcano types in North America
  3. Volcanic eruptions associated with tsunamis
  4. Most damaging volcanic eruptions
  5. Funny map projections

For readers interested in using plotly for data analysis, please refer to my recent post on visualizing data from the Women’s World Cup:

Preparing the data

After downloading the volcanic eruption database, we load it as a pandas DataFrame. DataFrames integrate naturally with Plotly and are convenient for data analysis. We transform the columns that encode whether a volcanic eruption is associated with a volcano or an earthquake to True/False values and add new columns for the latitude and longitude of an eruption.

[ad_2]
Source link

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *