Skip to content

Instantly share code, notes, and snippets.

@jtrecenti
Created October 25, 2015 18:16
Show Gist options
  • Select an option

  • Save jtrecenti/9ab775f1e01208e9c6ae to your computer and use it in GitHub Desktop.

Select an option

Save jtrecenti/9ab775f1e01208e9c6ae to your computer and use it in GitHub Desktop.
grafico de dispersao baseado em dados sobre armas e homicidios que vi no face.
library(ggplot2)
d <- data.frame(
label = c('USA', 'IEM', 'FIN', 'SUI', 'IRQ', 'SER', 'FRA', 'CAN', 'SUE', 'AUS', 'BRA'),
armas = c(90, 61, 55, 46, 39, 37.5, 32, 31.5, 31.5, 31, 8.8),
homic = c(4.2, 4.2, 2.2, 0.7, 2.0, 1.2, 1.1, 1.6, 1.0, 0.6, 21.0)
)
ggplot(d, aes(x = armas, y = homic, label = label)) +
geom_text() +
xlab('Armas por 100 mil habitantes') +
ylab('Homicídios por 100 mil habitantes')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment