Different Ways to Visualize Time and Date Homicide Data From Baltimore

Don’t limit yourself to simple graphs, or simple maps.

René F. Najera, MPH, DrPH
8 min readJul 6, 2022

Baltimore City in Maryland is one of the world’s most violent cities, constantly ranking in the top 50 most violent cities in the world, and the top five most violent cities in the United States. The reasons for this are many, and they are complex. Baltimore suffered from systemic racism and segregation, from being a port city with major highways, and from corruption and betrayal of the public’s trust by their elected officials.

How so we tell the story of homicides in Baltimore? I went to the Baltimore Open Data portal and downloaded all available information on crime (Part 1 Crime Data). It was a big file, around 100 megabytes. I then used R to analyze it. I’ll include the code below, along with the outputs.

First, I’m going to load the data, filter the data to include only homicides, and create some new variables based on the CrimeDateTime variable. I will save that data as a data set named d.

d <- read.csv("Part_1_Crime_Data_.csv") %>% 
filter(Description == "HOMICIDE") %>%
mutate(Month = lubridate::month(CrimeDateTime,
label = TRUE),
Day = lubridate::day(CrimeDateTime),
Hour = lubridate::hour(CrimeDateTime),
Year = lubridate::year(CrimeDateTime),
WeekDay = lubridate::wday(CrimeDateTime,
label = TRUE)…

--

--

René F. Najera, MPH, DrPH

DrPH in Epidemiology. Public Health Instructor. Father. Husband. "All around great guy."