Original



Objective

The objective of the data visualization is to provide an overview of murders that are connected to political extremism in the United States by type, including left-wing, right-wing, and Islamic extremist violence. The target audience is likely anyone who is interested in understanding the patterns and prevalence of political extremism-related murders in the United States, including journalists, policymakers, researchers, and the general public.

By presenting the data in a visual format, the visualization aims to make the information more accessible and easier to understand for a wider audience. It allows viewers to quickly grasp the scale of the problem and see how different types of political extremism compare in terms of the number of murders committed.

The visualisation chosen had the following three main issues:

  • Inconsistent use of percentage sign: To fix this issue, we should either remove the percentage sign from the white supremacy bar or add percentage signs to all the bars in the chart. Consistency in the use of percentage signs will make it easier for viewers to understand the data.

  • Inconsistent bar sorting: The bars should be sorted in descending order, from highest to lowest. This will make it easier to compare the different categories and see which category has the most incidents of murders. The sorted bars should also be spaced evenly to help with the comparison. Sorting the bars will make it easier for viewers to understand the data and quickly identify the categories with the most incidents.

  • Inconsistent color scheme: Instead of using a red color for the top three bars and grey for the bottom three, we could use a gradient color scheme. A gradient color scheme would allow us to use a single color and shade it lighter or darker to show the relative sizes of the bars. This would make the chart more visually appealing and easier to read. Alternatively, we could use a consistent color for all the bars, such as blue, which is often used for data visualization.

    By addressing these issues, we can make the visualization more effective in communicating the data and help the target audience understand the information more clearly.

Reference

Code

The following code was used to fix the issues identified in the original.

This code generates a bar chart that shows the distribution of murders connected to political extremism across different categories. The data is first defined as two vectors, “categories” and “percentages”. The percentages are formatted to include the “%” sign and the data is then stored in a data frame. A color gradient is defined using the RColorBrewer library, and a bar chart is created using the ggplot2 library. The bars are sorted in descending order, and a text label is added to each bar showing the corresponding percentage. Finally, the chart is flipped vertically using the “coord_flip()” function, and the x and y axis labels and the title are added using the “labs()” function. The resulting chart shows the percentage of murders attributed to each category of political extremism, sorted by decreasing value, and with a color gradient that increases gradually from left to right.

library(ggplot2)
library(RColorBrewer)

# Define the data
categories <- c("White supremacy", "Islamist", "Anti-government", "Other right wing", "Left wing", "Other")
percentages <- c(55, 20, 14, 6, 4, 1)

# Add percentage sign to values
percentages <- paste0(percentages, "%")

# Create the data frame
data <- data.frame(categories, percentages)

# Define a gradient color scheme
colors <- rev(colorRampPalette(c("#FFA07A","#FF4500", "#FF6347","#B22222","#8B0000"))(length(categories)))

# Create the bar chart
plot <- ggplot(data, aes(x=reorder(categories, -as.numeric(sub("%", "", percentages))), y=as.numeric(sub("%", "", percentages)))) +
  geom_bar(stat="identity", fill=colors) +
  geom_text(aes(label=percentages),hjust=-0.05, color="black") +
  scale_fill_gradientn(colors=colors, guide=FALSE) +
  coord_flip() +
  labs(x="Type of extremism", y="Percentage of murders", title="Murders connected to political extremism, by type")

According to the source cited in the original article, the Anti-Defamation League’s Center on Extremism compiled the data used in the visualization. The data was gathered from news reports, government sources, and other publicly available information. The specific data used in the visualization is not readily available, so we had to create the final aggregated percentages synthetically ourselves to demonstrate the reconstructed visualization.

Data Reference

Reconstruction

The modified plot improves upon the original in several ways. Firstly, the percentage formatting has been made consistent, which makes it easier to compare the values. Secondly, the bars have been sorted, which makes it easier to see which categories have the highest and lowest values. Finally, a color gradient has been added that increases gradually, which makes it easier to see the differences in values between categories. Overall, these improvements make the plot more visually appealing and easier to read, allowing the viewer to quickly understand the distribution of murders connected to political extremism across different categories.