In response to last week's post on the rapidly increasing ideology of the US Republican Party, Mike Lawrence suggested another way of looking at the DW-NOMINATE ideology data. Rather than simply looking at boxplots of the congress scores by party over time, we could fit a smooth curve to get a better sense of the trends over time. Mike provided R code to do exactly that, using a generalized additive model to fit the smooth curve to the data since the two-party system began, and using his ez package to visualize the result. I modified Mike's code slightly to match the traditional party colours and to put year (rather than congress number) on the horizontal axis:

In this chart, higher means more rightward-leaning. While the Democratic party has drifted leftwards over the past 50 years, you can see a sudden turn to the right beginning in 2005. And in this version of the chart you can clearly see the march of the Republican party to the far right, beginning in 1975.

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** Revolutions**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...

**Tags:** current events, graphics, R