library(tidyverse)
metric <- data.frame(stringsAsFactors=FALSE,
Year = c(1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015,
2016, 2017, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 1991, 1992, 1993,
1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015, 2016, 2017, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 1991, 1992,
1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015, 2016, 2017),
Rate = c(41.02, 41.23, 41.45, 41.66, 41.87, 42.09, 42.31, 42.52, 42.74,
42.96, 43.18, 43.4, 43.63, 43.85, 44.08, 44.3, 44.53, 44.76,
44.99, 45.22, 45.46, 45.69, 45.92, 46.16, 46.4, 46.64, 46.88,
32.12, 31.59, 31.07, 30.56, 30.06, 29.56, 29.08, 28.6, 28.13,
27.67, 27.22, 26.77, 26.33, 25.9, 25.47, 25.05, 24.64, 24.24, 23.84,
23.45, 23.06, 22.69, 22.31, 21.95, 21.59, 21.23, 20.88, 37.77,
37.32, 36.88, 36.44, 36.01, 35.58, 35.15, 34.74, 34.32, 33.91,
33.51, 33.11, 32.72, 32.33, 31.94, 31.56, 31.19, 30.82, 30.45,
30.09, 29.73, 29.38, 29.03, 28.68, 28.34, 28, 27.67, 34.2, 33.1,
46.1, 37, 42.8, 40.1, 49.4, 50.6, 41.3, 50.9, 41.6, 46.3, 49.8,
38.3, 40, 36.5, 35.6, 35.1, 54.5, 48.5, 42.6, 50.8, 56.1, 42.8,
42.7, 52, 34.9, 30.6, 27.9, 32.7, 30.1, 23.4, 37.4, 27.5, 32.2,
18.3, 27.9, 33.2, 21.8, 26.1, 31.3, 25.9, 34.8, 20.5, 18.8, 20.7,
24.5, 23.6, 20.5, 26.1, 20.4, 24.2, 15.4, 20.5, 38.5, 35.5,
32.6, 38.7, 27.7, 29.4, 36.6, 31.5, 38.7, 32.5, 34.4, 41.4, 34.7,
32.7, 34, 30.7, 34.6, 32, 43.7, 27, 19.7, 23.4, 33.4, 31, 27.3,
27.1, 17.7),
Site = c("C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34", "C50",
"C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50",
"C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50",
"C50", "C50", "C50", "C50", "C50", "C50", "C50", "C61", "C61",
"C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61",
"C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61",
"C61", "C61", "C61", "C61", "C61", "C61", "C61", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34", "C33-C34",
"C33-C34", "C33-C34", "C50", "C50", "C50", "C50", "C50", "C50",
"C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50",
"C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50", "C50",
"C50", "C50", "C50", "C61", "C61", "C61", "C61", "C61", "C61",
"C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61",
"C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61", "C61",
"C61", "C61", "C61"),
Metric = c("Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Modeled", "Modeled", "Modeled", "Modeled", "Modeled",
"Modeled", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed", "Observed", "Observed", "Observed",
"Observed", "Observed")
)
ggplot(mapping = aes (Year, Rate, color = Metric)) +
geom_line(data = metric %>% filter(Metric == "Modeled")) +
geom_point(data = metric %>% filter(Metric == "Observed")) +
facet_wrap(~Site) +
scale_x_continuous(breaks = c(1991,2004,2017)) +
xlab("Year of Death") +
ylab("Rate per 100,000")
Created on 2019-09-20 by the reprex package (v0.3.0.9000)