Birth Month by Gender

[This article was first published on R – Exegetic Analytics, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Based on some feedback to a previous post I normalised the birth counts by the (average) number of days in each month. As pointed out by a reader, the results indicate a gradual increase in the number of conceptions during (northern hemisphere) Autumn and Winter, roughly up to the end of December. Normalising the data to give births per day also shifts the peak from August to September.

births-per-day

> library(lifespan)
> month.days <- data.frame(
+   month = month.abb,
+   days = c(31, 28.25, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
+ )
> group_by(births, month) %>% summarise(count = sum(count)) %>%
+   merge(month.days) %>%
+   mutate(perday = count / days) %>%
+   ggplot(aes(x = month, y = perday / 1000)) +
+   geom_bar(stat = "identity", fill = "#39A75E") +
+   labs(x = "", y = "Total Births per Day [thousands]") +
+   theme_classic()

I also broke the births data down by gender. The August peak persists for both genders but female births exhibit consistently higher variability that male births. For that I have no plausible explanation. Suggestions?

births-gender-boxplot

> group_by(births, year, month, sex) %>% summarise(count = sum(count)) %>%
+   merge(month.days) %>%
+   mutate(perday = count / days) %>% ggplot() +
+   geom_boxplot(aes(x = month, y = perday, fill = sex)) +
+   labs(x = "", y = "Births per Day") +
+   theme_classic() + theme(legend.title = element_blank())

To leave a comment for the author, please follow the link and comment on their blog: R – Exegetic Analytics.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)