In this project, I decided to explore different ways of spelling the phonetic name of “ash-lee.” This project aims to filter and visualize the variety of spellings to compare the popularity over time. Utilizing the babynames data set: If a name list of “ash-lee” spellings was created, we can visualize comparisons between names filtering by sex and year. I hypothesize that we will see more variations of the name over time.

#Goal = to compare different spellings of the phonetically similar name of "ash-lee". 
library(tidyverse)
library(babynames)

#created list of names to analyze, found list online of different spellings of Ashley
namelist <- c("Ashley", "Ashleigh", "Ashlee", "Ashlea", "Ashli", "Ashlie", "Ashly")

#filter babynames by provided list
filtered <- babynames %>% 
  filter(name %in% namelist)

#aggregate totals by name(includes both genders), arranged by year
filtered_mf <- filtered %>% 
  group_by(name, year) %>% 
  summarise(n = sum(n)) %>% 
  arrange(year)

In this visualization, we are looking at variations of “ash-lee” for males and females over time.

#plot data 
filtered_mf %>% 
  ggplot(aes(year,n, color = name)) +
  geom_line()

In this visualization, we are looking at variations of “ash-lee” for only females over time.

#create data for just females
filtered_f <- babynames %>% 
  filter(name %in% namelist & sex %in% "F")

#plot data for females only
filtered_f %>% 
  ggplot(aes(year,n, color = name)) +
  geom_line()

In this visualization, we are looking at variations of “ash-lee” for only males over time.

#create data for just males
filtered_m <- babynames %>% 
  filter(name %in% namelist & sex %in% "M")

#plot data for males only
filtered_m %>% 
  ggplot(aes(year,n, color = name)) +
  geom_line()

This visualization shows a side by side comparison of female versus male, accounting for population changes.

#create facet for proportion 
filtered %>% 
  ggplot(aes(year,prop, color = name)) +
  geom_line() + 
  facet_wrap(~sex)

After visualizing the data, there are multiple takeaways that could be significant. When comparing male and females, the graph shows significantly more female “ash-lee” names than males. Additionally, it is interesting to note that the name in general did not exist until around 1960. It was popularized in the UK by Lord Ashley in the 1800s, a British social reformer. In the US, the rise of popularity of Ashley was most likely due to the soap opera “The Young and the Restless.” This play was released in 1974, which is on par with the results of the graph.