Skip to content

Instantly share code, notes, and snippets.

@apreshill
Last active April 1, 2016 17:30
Show Gist options
  • Save apreshill/2cd1f3406b26bdd2c82112c67361101e to your computer and use it in GitHub Desktop.
Save apreshill/2cd1f3406b26bdd2c82112c67361101e to your computer and use it in GitHub Desktop.
Prevalence of ASD in the US from most recent 4 CDC ADDM surveys
site total n_asd prevalence_1000 data_source l95_1000 u95_1000 year_survey year_pub birth_cohort table for_line
Alabama 36566 174 4.8 ho 4.1 5.5 2008 2012 2000 2 1
Arizona 32601 507 15.6 eh 14.3 17 2008 2012 2000 2 1
Arkansas 4940 52 10.5 eh 8 13.8 2008 2012 2000 2 1
Colorado 7725 91 11.8 eh 9.6 14.5 2008 2012 2000 2 0
Colorado 29336 188 6.4 ho 5.6 7.4 2008 2012 2000 2 1
Florida 29366 211 7.2 ho 6.3 8.2 2008 2012 2000 2 1
Georgia 50427 601 11.9 eh 11 12.9 2008 2012 2000 2 1
Maryland 27022 336 12.4 eh 11.2 13.8 2008 2012 2000 2 1
Missouri 25668 357 13.9 ho 12.5 15.4 2008 2012 2000 2 1
New Jersey 7082 145 20.5 eh 17.4 24.1 2008 2012 2000 2 1
North Carolina 36913 525 14.2 eh 13.1 15.5 2008 2012 2000 2 1
Pennsylvania 18440 245 13.3 ho 11.7 15.1 2008 2012 2000 2 1
South Carolina 23769 264 11.1 eh 9.8 12.5 2008 2012 2000 2 1
Utah 2123 45 21.2 eh 15.8 28.4 2008 2012 2000 2 1
Wisconsin 34451 267 7.8 ho 6.9 8.7 2008 2012 2000 2 1
Total 337093 3820 11.3 NA 11 11.7 2008 2012 2000 2 1
Alabama 21833 125 5.7 ho 4.8 6.8 2010 2014 2002 2 1
Arizona 33768 530 15.7 eh 14.4 17.1 2010 2014 2002 2 1
Arkansas 38956 605 15.5 eh 14.3 16.8 2010 2014 2002 2 1
Colorado 38806 384 9.9 ho 9 10.9 2010 2014 2002 2 1
Georgia 48529 754 15.5 eh 14.5 16.7 2010 2014 2002 2 1
Maryland 27605 458 16.6 eh 15.1 18.2 2010 2014 2002 2 1
Missouri 25367 359 14.2 ho 12.8 15.7 2010 2014 2002 2 1
New Jersey 31723 696 21.9 eh 20.4 23.6 2010 2014 2002 2 1
North Carolina 37783 655 17.3 eh 16.1 18.7 2010 2014 2002 2 1
Utah 23756 442 18.6 eh 16.9 20.4 2010 2014 2002 2 1
Wisconsin 35623 330 9.3 ho 8.3 10.3 2010 2014 2002 2 1
Total 363749 5338 14.7 NA 14.3 15.1 2010 2014 2002 2 1
Arizona 32615 494 15.2 eh 13.9 16.5 2012 2016 2004 2 1
Arkansas 14153 170 12 ho 10.3 14 2012 2016 2004 2 0
Colorado 40538 436 10.8 ho 9.8 11.8 2012 2016 2004 2 1
Georgia 49720 771 15.5 eh 14.1 16.6 2012 2016 2004 2 1
Maryland 9577 174 18.2 eh 15.7 21.1 2012 2016 2004 2 1
Maryland 18154 148 8.2 ho 6.9 9.6 2012 2016 2004 2 0
Missouri 25870 297 11.5 ho 10.2 12.9 2012 2016 2004 2 1
New Jersey 32851 800 24.6 eh 22.9 26.3 2012 2016 2004 2 1
North Carolina 38913 656 16.9 eh 15.6 18.2 2012 2016 2004 2 1
South Carolina 24356 302 12.4 eh 11.1 13.9 2012 2016 2004 2 1
Utah 23945 431 17.3 eh 15.7 19 2012 2016 2004 2 1
Wisconsin 35556 384 10.8 ho 9.8 11.9 2012 2016 2004 2 1
Total 346978 5063 14.6 NA 14.2 15 2012 2016 2004 2 1
Alabama 35126 212 6 ho 5.3 6.9 2006 2010 1998 2 1
Florida 27615 116 4.2 ho 3.5 5 2006 2010 1998 2 1
Missouri 26533 321 12.1 ho 10.8 13.5 2006 2010 1998 2 1
Pennsylvania 17886 150 8.4 ho 7.2 9.8 2006 2010 1998 2 1
Wisconsin 34058 257 7.6 ho 6.7 8.5 2006 2010 1998 2 1
Arizona 41650 504 12.1 eh 11.1 13.2 2006 2010 1998 2 1
Colorado 7184 54 7.5 eh 5.7 9.8 2006 2010 1998 2 0
Georgia 46621 474 10.2 eh 9.3 11.1 2006 2010 1998 2 1
Maryland 26489 243 9.2 eh 8.1 10.4 2006 2010 1998 2 1
North Carolina 22195 230 10.4 eh 9.1 11 2006 2010 1998 2 1
South Carolina 22681 196 8.6 eh 7.5 9.9 2006 2010 1998 2 1
Total 308038 2757 9 NA 8.6 9.3 2006 2010 1998 2 1
# load packages
suppressWarnings(suppressMessages(library(dplyr)))
suppressWarnings(suppressMessages(library(ggplot2))) # devtools::install_github("hadley/ggplot2") only if you want subtitles/captions
suppressWarnings(suppressMessages(library(tidyr)))
suppressWarnings(suppressMessages(library(readr)))
suppressWarnings(suppressMessages(library(ggthemes)))
# source file path
source_cdc <- "update file path/cdc_addm_all.csv"
# load data files & rename cols
cdc <- read_csv(source_cdc, col_names = TRUE)
# filter sites
addm_for_plot <- cdc %>%
filter(!(site %in% c("Total", "Florida", "Pennsylvania")))
# small multiples plot
cols <- c("#4878CF", "#6ACC65")
addm <- ggplot(addm_for_plot)
addm <- addm + geom_line(aes(group = for_line, x = year_survey, y = prevalence_1000, colour = data_source), lty = 3)
addm <- addm + geom_pointrange(aes(x = year_survey, y = prevalence_1000, ymin = l95_1000, ymax = u95_1000, colour = data_source), size = .5, fatten = 2)
addm <- addm + facet_wrap(~ site)
addm <- addm + scale_x_continuous(breaks = c(2006, 2008, 2010, 2012), name = "ADDM Survey Year")
addm <- addm + scale_color_manual(values = cols, name = "Record Source", labels = c("Educational + Health", "Health only"))
addm <- addm + expand_limits(x = c(2005, 2013), y = 0)
addm <- addm + scale_y_continuous(name = "Prevalence per 1000 children aged 8 years (95% CI)")
addm <- addm + theme_hc()
addm <- addm + labs(title = "Prevalence of Autism Spectrum Disorder Among Children Aged 8 Years in the US Across 4 Survey Years", subtitle = "Content source: CDC Autism and Developmental Disabilities Monitoring (ADDM) Network")
addm <- addm + theme(plot.title=element_text(face="bold", size=10, margin=margin(b=6)))
addm <- addm + theme(panel.grid.major.y = element_line(size = .25))
addm <- addm + theme(axis.ticks = element_blank())
addm <- addm + theme(plot.subtitle=element_text(size=8))
addm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment