This will be the last baby name related post but this came out of part two web scrapping post last month. I was looking for the fastest rising Names. I flip the logic and looked for the fastest declining names in relative popularity.
Out of that exercise this gem fell out.
Here is the messy ggplot code:
nm<-"Hillary" p<-ggplot(names,aes(x=Year,y=Rank)) p<- p + ylim(max(names$Rank),min(names$Rank)) p<- p + geom_line(data = names[which(names$Female %in% nm),], aes(group=Female, colour = Female), alpha = 1, size = 1) p<- p + opts(title = "Poor, Poor Hillary: Popularity of the Female Name 'Hillary' \n But we already that the Clinton Prseidency was better to certain women") matrix.label<-data.frame(Year = 1996 , Rank = 100, Text = "Clinton \n Presidency") # create the custom on graphic text label, kind of a hack p <- p + geom_rect(aes(xmin = 1992 , xmax = 2001 , ymin = 1000 , ymax = 1 ),fill = "Blue", alpha = .002) p <- p + geom_rect(aes(xmin = 2007 , xmax = 2008 , ymin = 1000 , ymax = 1 ),fill = "Green", alpha = .002) matrix.label2<-data.frame(Year = 2007 , Rank = 100, Text = "Hillary's \n Presidential \n Run") # 1993 ->2001 the years of the Clinton Presdidency but 1992 was when he won the election so that is our starting point p <- p + geom_text(data = matrix.label, aes(label = Text, size =3)) p <- p + geom_text(data = matrix.label2, aes(label = Text, size = 3)) p
For the Data look at my github project https://github.com/jofusa/ssa-baby-names