2020-ridgeplot

So the motive was to recreate a ridgeplot summarizing some keywords of year 2020. One of my long time subscribed RSS feed rud.is happened to have one of such tutorial post back from last year.

In that post, hrbrmstr was in fact, recreating another post by Axios.

Can’t wait to do it myself with fresh new data in 2020. Well, it’s not the end of year 2020 technically, but that will do as well.

Everything was fine until the last step, where a plot should be rendered. But instead, I had the infamous “polygon edge not found” error which somehow is related with disabled Arial font:

Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  :
polygon edge not found
In addition: Warning message:
In grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  :
no font could be found for family "EconSansCndReg"

A quick fix for this is to use default theme in {hrbrthemes} package, replace theme_ipsum_es() with theme_ipsum().

Additionally, the original code:

theme(strip.text.y = element_text(angle = 180, hjust = 1, vjust = 0))

does not effectively rotate the facet group name here. Here’s what I do:

theme(strip.text.y.left = element_text(angle = 0, hjust = 1, vjust = 0, size=rel(0.618)))

Interest over time: Numbers represent search interest relative to the highest point on the chart for the given region and time. A value of 100 is the peak popularity for the term. A value of 50 means that the term is half as popular. A score of 0 means that there was not enough data for this term.