library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.0.3
library(openintro)
## Warning: package 'openintro' was built under R version 4.0.3
## Warning: package 'airports' was built under R version 4.0.3
## Warning: package 'cherryblossom' was built under R version 4.0.3
## Warning: package 'usdata' was built under R version 4.0.3

Exercise 1

What command would you use to extract just the counts of girls baptized? Try it!

head(arbuthnot)
## # A tibble: 6 x 3
##    year  boys girls
##   <int> <int> <int>
## 1  1629  5218  4683
## 2  1630  4858  4457
## 3  1631  4422  4102
## 4  1632  4994  4590
## 5  1633  5158  4839
## 6  1634  5035  4820
arbuthnot$girls
##  [1] 4683 4457 4102 4590 4839 4820 4928 4605 4457 4952 4784 5332 5200 4910 4617
## [16] 3997 3919 3395 3536 3181 2746 2722 2840 2908 2959 3179 3349 3382 3289 3013
## [31] 2781 3247 4107 4803 4881 5681 4858 4319 5322 5560 5829 5719 6061 6120 5822
## [46] 5738 5717 5847 6203 6033 6041 6299 6533 6744 7158 7127 7246 7119 7214 7101
## [61] 7167 7302 7392 7316 7483 6647 6713 7229 7767 7626 7452 7061 7514 7656 7683
## [76] 5738 7779 7417 7687 7623 7380 7288
arbuthnot$boys
##  [1] 5218 4858 4422 4994 5158 5035 5106 4917 4703 5359 5366 5518 5470 5460 4793
## [16] 4107 4047 3768 3796 3363 3079 2890 3231 3220 3196 3441 3655 3668 3396 3157
## [31] 3209 3724 4748 5216 5411 6041 5114 4678 5616 6073 6506 6278 6449 6443 6073
## [46] 6113 6058 6552 6423 6568 6247 6548 6822 6909 7577 7575 7484 7575 7737 7487
## [61] 7604 7909 7662 7602 7676 6985 7263 7632 8062 8426 7911 7578 8102 8031 7765
## [76] 6113 8366 7952 8379 8239 7840 7640
glimpse(arbuthnot)
## Rows: 82
## Columns: 3
## $ year  <int> 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1...
## $ boys  <int> 5218, 4858, 4422, 4994, 5158, 5035, 5106, 4917, 4703, 5359, 5...
## $ girls <int> 4683, 4457, 4102, 4590, 4839, 4820, 4928, 4605, 4457, 4952, 4...
# bar graph
ggplot(data = arbuthnot, aes(x = year, y = girls)) + geom_line()

### ANSWER ###
girls_baptized <- arbuthnot$girls
sum(girls_baptized)
## [1] 453841

Exercise 2

Is there an apparent trend in the number of girls baptized over the years? How would you describe it? (To ensure that your lab report is comprehensive, be sure to include the code needed to make the plot as well as your written interpretation.)

Yes–the trend here is that the annual number of baptized girls generally increases during this time period. Although from 1640-1660 there is a general decline, there number of baptized girls increases steadily and strongly from 1661 onward. Therefore, this graph is trending an increase.

Citation for adding a trendline: https://stackoverflow.com/questions/38412817/draw-a-trend-line-using-ggplot

# scatter plot
ggplot(data = arbuthnot, aes(x = year, y = girls)) + geom_point() + geom_smooth(method = "lm")
## `geom_smooth()` using formula 'y ~ x'

Exercise 3

Now, generate a plot of the proportion of boys born over time. What do you see?

From generating a plot of the proportion of boys born overtime, I see that this plot has a similar design/shape to the girls born, and compared it between the number of boys and girls born.

arbuthnot$girls + arbuthnot$boys
##  [1]  9901  9315  8524  9584  9997  9855 10034  9522  9160 10311 10150 10850
## [13] 10670 10370  9410  8104  7966  7163  7332  6544  5825  5612  6071  6128
## [25]  6155  6620  7004  7050  6685  6170  5990  6971  8855 10019 10292 11722
## [37]  9972  8997 10938 11633 12335 11997 12510 12563 11895 11851 11775 12399
## [49] 12626 12601 12288 12847 13355 13653 14735 14702 14730 14694 14951 14588
## [61] 14771 15211 15054 14918 15159 13632 13976 14861 15829 16052 15363 14639
## [73] 15616 15687 15448 11851 16145 15369 16066 15862 15220 14928
arbuthnot <- arbuthnot %>% 
  mutate(total = boys + girls)
arbuthnot
## # A tibble: 82 x 4
##     year  boys girls total
##    <int> <int> <int> <int>
##  1  1629  5218  4683  9901
##  2  1630  4858  4457  9315
##  3  1631  4422  4102  8524
##  4  1632  4994  4590  9584
##  5  1633  5158  4839  9997
##  6  1634  5035  4820  9855
##  7  1635  5106  4928 10034
##  8  1636  4917  4605  9522
##  9  1637  4703  4457  9160
## 10  1638  5359  4952 10311
## # ... with 72 more rows
ggplot(data = arbuthnot, aes( x = year, y = total)) + geom_line()

arbuthnot <- arbuthnot %>% 
  mutate(boy_to_girl_ratio = boys/total)
arbuthnot
## # A tibble: 82 x 5
##     year  boys girls total boy_to_girl_ratio
##    <int> <int> <int> <int>             <dbl>
##  1  1629  5218  4683  9901             0.527
##  2  1630  4858  4457  9315             0.522
##  3  1631  4422  4102  8524             0.519
##  4  1632  4994  4590  9584             0.521
##  5  1633  5158  4839  9997             0.516
##  6  1634  5035  4820  9855             0.511
##  7  1635  5106  4928 10034             0.509
##  8  1636  4917  4605  9522             0.516
##  9  1637  4703  4457  9160             0.513
## 10  1638  5359  4952 10311             0.520
## # ... with 72 more rows
ggplot(data = arbuthnot, aes(x = year, y = boys)) + geom_line()

ggplot(data = arbuthnot, aes(x = year, y = girls)) + geom_line()

Exercise 4

What years are included in this data set? What are the dimensions of the data frame? What are the variable (column) names?

In this dataset, every year from 1940 until 2002 is included; 62 total years. Just like the arbuthnot dataset, the variables are year, boys, and girls. There are 3 dimensions, which are the same as the variable/column names.

present$year
##  [1] 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954
## [16] 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969
## [31] 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984
## [46] 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999
## [61] 2000 2001 2002
head(present)
## # A tibble: 6 x 3
##    year    boys   girls
##   <dbl>   <dbl>   <dbl>
## 1  1940 1211684 1148715
## 2  1941 1289734 1223693
## 3  1942 1444365 1364631
## 4  1943 1508959 1427901
## 5  1944 1435301 1359499
## 6  1945 1404587 1330869
dim(present)
## [1] 63  3
total_yearsP <- (2002-1940)
total_yearsP
## [1] 62

Exercise 5

How do these counts compare to Arbuthnot’s? Are they of a similar magnitude?

These counts are of a similar magnitude to Arbuthnot’s, in the sense that they have the same main/original variables: Boys, Girls, and Year. In terms of years, there is a difference of 19. Between both datasets, there is a difference of 118308394 and 112562805 for boys and girls respectively.

arbuthnot$year
##  [1] 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643
## [16] 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658
## [31] 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673
## [46] 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688
## [61] 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703
## [76] 1704 1705 1706 1707 1708 1709 1710
total_yearsA <- (1710 - 1629)
total_yearsP <- (2002-1940) 


year_difference <- abs(total_yearsA - total_yearsP)
year_difference
## [1] 19
boys_difference <- abs(sum(arbuthnot$boys) - sum(present$boys))
boys_difference
## [1] 118308394
girls_difference <- abs(sum(arbuthnot$girls) - sum(present$girls))
girls_difference
## [1] 112562805

Exercise 6

Make a plot that displays the proportion of boys born over time. What do you see? Does Arbuthnot’s observation about boys being born in greater proportion than girls hold up in the U.S.? Include the plot in your response. Hint: You should be able to reuse your code from Exercise 3 above, just replace the dataframe name.

According to this analysis, there are more boys born in proportion than girls. In this case for the Present dataset, there is a difference of 5776130 more boys being born.

present$girls + present$boys
##  [1] 2360399 2513427 2808996 2936860 2794800 2735456 3288672 3699940 3535068
## [10] 3559529 3554149 3750850 3846986 3902120 4017362 4047295 4163090 4254784
## [19] 4203812 4244796 4257850 4268326 4167362 4098020 4027490 3760358 3606274
## [28] 3520959 3501564 3600206 3731386 3555970 3258411 3136965 3159958 3144198
## [37] 3167788 3326632 3333279 3494398 3612258 3629238 3680537 3638933 3669141
## [46] 3760561 3756547 3809394 3909510 4040958 4158212 4110907 4065014 4000240
## [55] 3952767 3899589 3891494 3880894 3941553 3959417 4058814 4025933 4021726
present <- present %>% 
  mutate(total = boys + girls)
present
## # A tibble: 63 x 4
##     year    boys   girls   total
##    <dbl>   <dbl>   <dbl>   <dbl>
##  1  1940 1211684 1148715 2360399
##  2  1941 1289734 1223693 2513427
##  3  1942 1444365 1364631 2808996
##  4  1943 1508959 1427901 2936860
##  5  1944 1435301 1359499 2794800
##  6  1945 1404587 1330869 2735456
##  7  1946 1691220 1597452 3288672
##  8  1947 1899876 1800064 3699940
##  9  1948 1813852 1721216 3535068
## 10  1949 1826352 1733177 3559529
## # ... with 53 more rows
ggplot(data = present, aes( x = year, y = total)) + geom_line()

present <- present %>% 
  mutate(boy_to_girl_ratio = boys/total)
present
## # A tibble: 63 x 5
##     year    boys   girls   total boy_to_girl_ratio
##    <dbl>   <dbl>   <dbl>   <dbl>             <dbl>
##  1  1940 1211684 1148715 2360399             0.513
##  2  1941 1289734 1223693 2513427             0.513
##  3  1942 1444365 1364631 2808996             0.514
##  4  1943 1508959 1427901 2936860             0.514
##  5  1944 1435301 1359499 2794800             0.514
##  6  1945 1404587 1330869 2735456             0.513
##  7  1946 1691220 1597452 3288672             0.514
##  8  1947 1899876 1800064 3699940             0.513
##  9  1948 1813852 1721216 3535068             0.513
## 10  1949 1826352 1733177 3559529             0.513
## # ... with 53 more rows
ggplot(data = present, aes(x = year, y = boys)) + geom_line()

ggplot(data = present, aes(x = year, y = girls)) + geom_line()

x <- sum(present$boys)
x
## [1] 118792776
y <- sum(present$girls)
y
## [1] 113016646
bg_diff_present <- (x-y)
bg_diff_present
## [1] 5776130

Exercise 7

In what year did we see the most total number of births in the U.S.? Hint: First calculate the totals and save it as a new variable. Then, sort your dataset in descending order based on the total column. You can do this interactively in the data viewer by clicking on the arrows next to the variable names. To include the sorted result in your report you will need to use two new functions: arrange (for sorting). We can arrange the data in a descending order with another function: desc (for descending order). The sample code is provided below.

From arranging this dataset into descending order, we see 1961 was the year with the most births.

present
## # A tibble: 63 x 5
##     year    boys   girls   total boy_to_girl_ratio
##    <dbl>   <dbl>   <dbl>   <dbl>             <dbl>
##  1  1940 1211684 1148715 2360399             0.513
##  2  1941 1289734 1223693 2513427             0.513
##  3  1942 1444365 1364631 2808996             0.514
##  4  1943 1508959 1427901 2936860             0.514
##  5  1944 1435301 1359499 2794800             0.514
##  6  1945 1404587 1330869 2735456             0.513
##  7  1946 1691220 1597452 3288672             0.514
##  8  1947 1899876 1800064 3699940             0.513
##  9  1948 1813852 1721216 3535068             0.513
## 10  1949 1826352 1733177 3559529             0.513
## # ... with 53 more rows
present$total
##  [1] 2360399 2513427 2808996 2936860 2794800 2735456 3288672 3699940 3535068
## [10] 3559529 3554149 3750850 3846986 3902120 4017362 4047295 4163090 4254784
## [19] 4203812 4244796 4257850 4268326 4167362 4098020 4027490 3760358 3606274
## [28] 3520959 3501564 3600206 3731386 3555970 3258411 3136965 3159958 3144198
## [37] 3167788 3326632 3333279 3494398 3612258 3629238 3680537 3638933 3669141
## [46] 3760561 3756547 3809394 3909510 4040958 4158212 4110907 4065014 4000240
## [55] 3952767 3899589 3891494 3880894 3941553 3959417 4058814 4025933 4021726
present %>% arrange(desc(total))
## # A tibble: 63 x 5
##     year    boys   girls   total boy_to_girl_ratio
##    <dbl>   <dbl>   <dbl>   <dbl>             <dbl>
##  1  1961 2186274 2082052 4268326             0.512
##  2  1960 2179708 2078142 4257850             0.512
##  3  1957 2179960 2074824 4254784             0.512
##  4  1959 2173638 2071158 4244796             0.512
##  5  1958 2152546 2051266 4203812             0.512
##  6  1962 2132466 2034896 4167362             0.512
##  7  1956 2133588 2029502 4163090             0.513
##  8  1990 2129495 2028717 4158212             0.512
##  9  1991 2101518 2009389 4110907             0.511
## 10  1963 2101632 1996388 4098020             0.513
## # ... with 53 more rows
LS0tDQp0aXRsZTogIkxhYiAxOiBJbnRybyB0byBSIg0KYXV0aG9yOiAiSm9lIENvbm5vbGx5Ig0KZGF0ZTogImByIFN5cy5EYXRlKClgIg0Kb3V0cHV0OiBvcGVuaW50cm86OmxhYl9yZXBvcnQNCi0tLQ0KDQpgYGB7ciBsb2FkLXBhY2thZ2VzLCBt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