A day by day record of the number of births in each US State.
data(Birthdays)A data frame with 374221 observations on the following variables.
state state where child was born
year year (1969-1988)
month month (1-12)
day day of month
date date as a date object
births number of births
Births, Births78, Births2015, BirthsSSA, BirthsCDC for data sets that are
aggregated at the level of the entire country.
data(Birthdays)
if (require(mosaic)) {
MI <- Birthdays %>% filter(state == "MI")
gf_point(births ~ date, Birthdays, data = MI)
gf_line(births ~ date, Birthdays, data = MI, color = ~ wday)
gf_line(births ~ date,
data = Birthdays %>% group_by(date) %>% summarise(births = sum(births)))
}
#> Loading required package: mosaic
#> Registered S3 method overwritten by 'mosaic':
#> method from
#> fortify.SpatialPolygonsDataFrame ggplot2
#>
#> The 'mosaic' package masks several functions from core packages in order to add
#> additional features. The original behavior of these functions should not be affected by this.
#>
#> Attaching package: ‘mosaic’
#> The following objects are masked from ‘package:dplyr’:
#>
#> count, do, tally
#> The following object is masked from ‘package:Matrix’:
#>
#> mean
#> The following object is masked from ‘package:ggplot2’:
#>
#> stat
#> The following objects are masked from ‘package:stats’:
#>
#> IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
#> quantile, sd, t.test, var
#> The following objects are masked from ‘package:base’:
#>
#> max, mean, min, prod, range, sample, sum