Skip to main content

Posts

Featured

Step-by-step: How to plot a map with slider to represent time evolution of murder rate in the US using Plotly

This post in based on this other one I posted a few days ago, where I'm exploring a new data set about murder rates in the US. I decided to write a plot detailing how to plot a map of said murder rates in the US, but also adding a slider to explore the different years included in the data set. The data is gathered and published by the FBI , but I'm gonna be using this other version , that I minimally modified to make it easier to use. Also, I am using this post to practice how to embed my own python code in a way that is useful and looks nice. I am gonna do this by converting the particular snippet of code into html here . Ok, so, let's start with the data, which looks like this: We have one row per year and per state, and in each one of them, we have the population of the state, as well as the total number of violent crimes committed, the breakdown by type of crime, and the murder rate per 100,000 people. I'm gonna start by plotting a single year of d...

Latest Posts

Probando a insertar gráficas de Tableau

Brief example about data interpolation with Scipy

Getting longitude-latitude coordinates for a (long) list of cities using Python and a free API

Exploring US crime data (Part II)