R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

library(readxl)
Parish <- read_excel("~/Diocese/Study_v8.xlsx")
Parish$Name <- NULL
Parish$"EDOW Name" <- NULL
Parish$Street <- NULL
Parish$Street2 <- NULL
Parish$Country_Code <- NULL
Parish$Country <- NULL
Parish$Mail_Street <- NULL
Parish$Mail_Street2 <- NULL
Parish$Mail_City <- NULL
Parish$Mail_State <- NULL
Parish$Mail_Zip <- NULL
Parish$Mail_Country <- NULL
Parish$Mail_Country_Code <- NULL
Parish$Address <- NULL
Parish$ZipKey <- NULL
Parish$AdjustedDate <- NULL
Parish$Zip <- NULL
Parish$Region <- factor(Parish$Region)
Parish$City <- factor(Parish$City)
Parish$State <- factor(Parish$State)
Parish$County <- factor(Parish$County)
summary(Parish)
##   ParishUEID            Region        PID         Short_Name       
##  Length:89          SM     :22   Min.   :101.0   Length:89         
##  Class :character   DC     :14   1st Qu.:124.0   Class :character  
##  Mode  :character   PN     :11   Median :212.0   Mode  :character  
##                     MC     :10   Mean   :235.5                     
##                     DN     : 9   3rd Qu.:311.0                     
##                     DS     : 9   Max.   :507.0                     
##                     (Other):14                                     
##              City    State                    County    Established  
##  Washington    :32   DC:32   Charles             : 6   Min.   :1638  
##  Silver Spring : 7   MD:57   District of Columbia:32   1st Qu.:1796  
##  Bethesda      : 3           Montgomery          :24   Median :1873  
##  Chevy Chase   : 3           Prince George's     :20   Mean   :1846  
##  Upper Marlboro: 3           St. Mary's          : 7   3rd Qu.:1902  
##  Brandywine    : 2                                     Max.   :1991  
##  (Other)       :39                                                   
##   Max of Year    Min of Year      Latitude       Longitude     
##  Min.   :2010   Min.   :1998   Min.   :38.19   Min.   :-77.40  
##  1st Qu.:2015   1st Qu.:1998   1st Qu.:38.85   1st Qu.:-77.07  
##  Median :2015   Median :1998   Median :38.92   Median :-77.01  
##  Mean   :2015   Mean   :2001   Mean   :38.87   Mean   :-76.98  
##  3rd Qu.:2015   3rd Qu.:1998   3rd Qu.:38.99   3rd Qu.:-76.94  
##  Max.   :2015   Max.   :2015   Max.   :39.29   Max.   :-76.43  
##                                                                
##     ZipNum           Mean Income        Pop2015         Pop2010     
##  Length:89          Min.   : 46676   Min.   : 1111   Min.   : 1051  
##  Class :character   1st Qu.: 88444   1st Qu.:13016   1st Qu.:12775  
##  Mode  :character   Median :112848   Median :28141   Median :26866  
##                     Mean   :122302   Mean   :28751   Mean   :27242  
##                     3rd Qu.:142680   3rd Qu.:40707   3rd Qu.:38551  
##                     Max.   :253212   Max.   :69820   Max.   :64696  
##                                                                     
##      Growth           HH2010     
##  Min.   :0.8143   Min.   :   28  
##  1st Qu.:1.0135   1st Qu.: 6339  
##  Median :1.0416   Median :11724  
##  Mean   :1.0568   Mean   :10962  
##  3rd Qu.:1.0798   3rd Qu.:15364  
##  Max.   :1.5614   Max.   :26825  
## 
Inflation <- read_excel("~/Diocese/Study_v8.xlsx",
sheet = "Inflation")
Inflation$Jan  <-NULL
Inflation$Feb  <-NULL
Inflation$Mar  <-NULL
Inflation$Apr  <-NULL
Inflation$May  <-NULL
Inflation$Jun  <-NULL
Inflation$Jul  <-NULL
Inflation$Aug  <-NULL
Inflation$Sep  <-NULL
Inflation$Oct  <-NULL
Inflation$Nov  <-NULL
Inflation$Dec  <-NULL
Inflation$`http://www.usinflationcalculator.com/inflation/historical-inflation-rates/`  <-NULL
Inflation$Avg  <-NULL
str(Inflation)
## Classes 'tbl_df', 'tbl' and 'data.frame':    18 obs. of  2 variables:
##  $ Year : num  1998 1999 2000 2001 2002 ...
##  $ Index: num  100 97.8 94.6 92.1 90.6 ...
Natality <- read_excel("~/Diocese/Natality1998-2015.xlsx")
Group <- read_excel("~/Diocese/Study_v8.xlsx",
sheet = "Groups")
Natality$County <- factor(Natality$County)
Marriage <- read_excel("~/Diocese/State_Marriage_Rates_90_95_99-15.xlsx")