Blog Archives

Trust in the EU and National Parliaments

February 8, 2012
By
Trust in the EU and National Parliaments

I have been playing around with some data from Eurobarometer, to support some arguments for a small comment I am writing for the Maastricht Law Review. I got the data for the following two questions:I would like to ask you a question about how much ...

Read more »

Text Mining and The Danish Immigration Debate

January 26, 2012
By
Text Mining and The Danish Immigration Debate

I have for a while now wanted to learn how to do text mining in R. I have played a bit around with the tm package before, but nothing really serious. Being a Danish expat that might soon move back to Denmark with a Swiss girlfriend and child, the Dani...

Read more »

Knitr is Awesome!

January 19, 2012
By

I love TikZ in LaTeX and I use it exclusively when writing figures for my papers. I also use the tikzDevice package to convert all figures I create in R to TikZ code, so the font used in the text and figures is the same (and having your R figures in Ti...

Read more »

Creating LaTeX Tables from Zelig and Statnet objects

January 9, 2012
By

As a PhD student that uses quantitative methods a lot, one annoying part of my job is to type up my results, especially formatting tables with regression models can be a lot of work. Luckily there is an excellent package in R, apsrtable, which will gen...

Read more »

Analyzing R-bloggers

January 6, 2012
By
Analyzing R-bloggers

In the last two posts we saw how to download posts from R-bloggers, and then extract the title, author and date of each post and write that information to a csv file. Since we now have a nice data set from r-bloggers, we can start to examine the develo...

Read more »

Scraping R-bloggers with Python – Part 2

January 5, 2012
By

In my previous post I showed how to write a small simple python script to download the pages of R-bloggers.com. If you followed that post and ran the script, you should have a folder on your hard drive with 2409 .html files labeled post1.html , post2....

Read more »

Scraping R-Bloggers with Python

January 4, 2012
By

In this post I promised to show how I use Python with the BeautifulSoup and Mechanize modules to scrape information from different websites. As a fun exercise, and something that should interest the readers of R-bloggers, I thought it would be interest...

Read more »

Voting Networks in the Danish Parliament

January 2, 2012
By
Voting Networks in the Danish Parliament

One of my Christmas presents was the book Beautiful Visualization. Chapter 8 by Andrew Odewahn is a very nice piece on visualizing the U.S Senate social graph. Odewahn basically builds an affinity network, where ties represent whether two senator have ...

Read more »

Legislative Activity in the Danish Parliament

December 22, 2011
By
Legislative Activity in the Danish Parliament

As mentioned in this post, I have been using the powerful combination of the Beautiful Soup and Mechanize modules in Python to build a web scrapers. The amount of data on the web is amazing, and I believe that any quantitatively oriented social scienti...

Read more »