Exploring Biblical Baby Names

Author

Clayton Karnavas

This report will explore trends in Biblical baby names in the US.

The data is sourced from the “babynames” data set, an R package created by Hadley Wickham that compiles baby names in the US from 1880 to 2017. The data set is based on US Social Security Administration data, found online at:

https://www.ssa.gov/oact/babynames/limits.html

Hypothesis

I predict that Biblical baby names in the US have consistently decreased in popularity since the start of the recorded data in 1880.

Loading Required Packages

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.4.4     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(babynames)

Creating a Biblical Names Data Set

The first step of this process was to find a data set that included every name in the Bible. I found this data set online at:

https://github.com/deeprnd/data/blob/master/bible/People.csv

Next, I imported this data set into R using the “readr” package. The data set included columns that were not necessary to the project, such as the birth place and surname of the Biblical figures, so I imported only the “Name” column. I named this data set “biblenames”.

biblenames <- read_csv("People.csv", col_types = cols_only(Name = col_guess()))

Merging Data Sets

Now I needed to merge the “biblenames” and “babynames” data sets.

However, I first had to rename the “Name” column in “biblenames” so that it would match the corresponding “babynames” column. The change was to simply make the “N” in “Name” lowercase using the “colnames” function.

I then merged the data sets using the “inner_join” function. I named this joined data set “merged”.

colnames(biblenames)[1] <- "name"

babynames |> 
  inner_join(biblenames, relationship = "many-to-many") -> merged
Joining with `by = join_by(name)`

Tracking the Averages of Biblical Names Over Time

Now I wanted to track how these names as a collective performed over time. I decided to track the average of the ten boys’ and ten girls’ names, as well as an average of all 20 names together.

To do this, I created new data frames for the boys’ and girls’ names. I then took these data frames and further refined them by grouping by year and using the “summarize” function to take the mean values. I named these new data sets “boys_average” and “girls_average”.

Next, I joined the “boys_average” and “girls_average” data frames and used the “mutate” function to get a combined average by adding the two data frames together and dividing by two. I called this data frame “combined_average”.

boys_data <- merged |> 
  filter(name %in% c('Michael', 'Joseph', 'Jonathan', 'Benjamin', 'Alexander', 'Jeremiah', 'Nathan', 'James', 'John', 'Ethan')) |> 
  filter(sex == "M")

girls_data <- merged |> 
  filter(name %in% c('Abigail', 'Mary', 'Chloe', 'Azariah', 'Hannah', 'Leah', 'Anna', 'Eden', 'Sarah', 'Naomi')) %>%
  filter(sex == "F")

boys_average <- boys_data |> 
  group_by(year) |> 
  summarize(boys_average_count = mean(prop))

girls_average <- girls_data |> 
  group_by(year) |> 
  summarize(girls_average_count = mean(prop))

combined_average <- inner_join(boys_average, girls_average, by = "year") |> 
  mutate(combined_average_count = (boys_average_count + girls_average_count) / 2)

Visualizing the Combined Averages

The next step was to graph the combined averages on a line chart. This line chart depicts the average of the top ten boys’ and top ten girls’ baby names over time, as well as an average of all 20 names.

I graphed this by using the “ggplot” package with three separate “geom_line” values for the boys’ (blue), girls’ (pink), and combined (black) averages. Once again the line chart depicts the names over time with “Year” as the x-value and “Proportion” as the y-value.

ggplot() +
  geom_line(data = combined_average, aes(x = year, y = combined_average_count), color = "black", linewidth = 1.5) +
  geom_line(data = boys_average, aes(x = year, y = boys_average_count), color = "blue", linewidth = 0.75) +
  geom_line(data = girls_average, aes(x = year, y = girls_average_count), color = "pink", linewidth = 0.75) +
  labs(title = "Biblical Baby Names Over Time (1880-2017)",
       x = "Year",
       y = "Proportion")

Visualizing the boys’, girls’, and combined names averages better revealed a general trend of decreasing popularity of Biblical names in the US. In 1880, popular Biblical names accounted for almost 2.5% of all names and have gradually declined until landing at proportion a less than 0.5%.

Additionally, the visualization demonstrates how popular Biblical names have shifted with respect to gender. In 1880, girls’ popular Biblical names made up almost 3.5% of all girls names, while boys’ Biblical names accounted for a little over 1%. Around 1950, the boys’ popularity of Biblical names surpasses the girls’. At the end of the recorded data, the boys Biblical names made up around 0.5% of boys’ names, while the girls’ accounted for around 0.2%.

Conclusion

After examining the data, my findings support the hypothesis that the popularity of Biblical baby names in the US have consistently decreased in the span of 1880 to 2017.