<commit_before>
width = 640;height=480;
border.muni <- c("Tijuana", "Cd. Juarez", "Nuevo Laredo", "Matamoros")

ct <- read.csv("data/cities.csv")
ct[is.na(ct)] <- 0
ct$rate.men <- ct$Masc / ct$Pop.Masc * 100000
ct$rate.women <- ct$Fem / ct$Pop.Fem * 100000
ct$rate <- ct$Total / ct$Grand.Total * 100000
m.ct <- melt(ct[,c(1:2,10:12)], id = c("Year","Municipality"))
m.ct <- subset(m.ct, Year <= 2007)


hwomen <- subMuni(m.ct, c("<NAME>", "Cd. Juarez", "Toluca"))
hwomen.border <- subMuni(m.ct, border.muni)
hrates <- subMuni(m.ct, c("Toluca", "Cd. Juarez", "Badiraguato",
                          "<NAME>"))
border <- subMuni(m.ct, border.muni)


########################################################
#Plot Murder rates comparing Ciudad Juarez
########################################################
dfs <- list(hwomen, hrates, border, hwomen.border)
subs <- list("rate.women", "rate", "rate", "rate.women")
titles <- list("Homicide rate for women (1990-2007)",
               "Homicide rates (1990-2007)",
               "Homicide rates in border cities (1990-2007)",
               "Homicide rates for women in border cities (1990-2007)")
filenames <- list("charts/women.png", "charts/rates.png",
                  "charts/border.png", "charts/women-border.png")

mapply(plotM, dfs, subs, titles, filenames)

<commit_msg>chart of the metropolitan areas of Juarez and Toluca<commit_after>
width = 640;height=480;
border.muni <- c("Tijuana", "Cd. Juarez", "Nuevo Laredo", "Matamoros")

ct <- read.csv("data/cities.csv")
ct[is.na(ct)] <- 0
ct$rate.men <- ct$Masc / ct$Pop.Masc * 100000
ct$rate.women <- ct$Fem / ct$Pop.Fem * 100000
ct$rate <- ct$Total / ct$Grand.Total * 100000
m.ct <- melt(ct[,c(1:2,10:12)], id = c("Year","Municipality"))
m.ct <- subset(m.ct, Year <= 2007)


hwomen <- subMuni(m.ct, c("<NAME>", "Cd. Juarez", "Toluca"))
hwomen.border <- subMuni(m.ct, border.muni)
hrates <- subMuni(m.ct, c("Toluca", "Cd. Juarez", "Badiraguato",
                          "<NAME>"))
border <- subMuni(m.ct, border.muni)


########################################################
#Plot Murder rates comparing Ciudad Juarez
########################################################
dfs <- list(hwomen, hrates, border, hwomen.border)
subs <- list("rate.women", "rate", "rate", "rate.women")
titles <- list("Homicide rate for women (1990-2007)",
               "Homicide rates (1990-2007)",
               "Homicide rates in border cities (1990-2007)",
               "Homicide rates for women in border cities (1990-2007)")
filenames <- list("charts/women.png", "charts/rates.png",
                  "charts/border.png", "charts/women-border.png")

mapply(plotM, dfs, subs, titles, filenames)

jt <- read.csv("data/juarez-toluca.csv")
jt$rate <- jt$Hfemenino / jt$Femenino * 10^5
p <- ggplot(jt, aes(Year, rate, group = MA, color = MA)) +
  geom_line() +
  opts(title = "Homicide rates in the metropolitan areas of Ciudad Juárez and Toluca (1990 - 2007)") +
  xlim(1990, 2009)
savePlot(direct.label(p, "last.points"), "charts/juarez-toluca")
{'fraction_non_alphanumeric': 0.2483574244415243, 'fraction_numerical': 0.05026281208935611, 'mean_word_length': 3.7652582159624415, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6824092', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1060, 'n_words': 246}