Evaluating Scripting Languages : How Python Can Help Political Methodologists

Why Python? Political methodologists tend to make passionate statements about their software tools. The PolMeth mailing list frequently gives strong advocacy for the use of Linux, LTEX, Emacs and other specific programmes. For statistical analysis R has become the mainstream programming language. However, frequent encouragements to use PHP for web purposes or Perl for various scripting tasks highlight the need for a major scripting language beside R. Once political scientists need systematic parsing of markup languages or have to generate web presentations from their data, R quickly reaches its limits. For me, Python has become my favourite scripting language of choice. Having had some previous exposure to C, Java, PHP and Perl, Python turned out to meet all my needs for software development, that R can not fulfil. So let me introduce you to the beauty of Python. Python helps with almost all of the data management tasks I need. Two applications of the language accompany my every day work: First, I use Python scripts to generate data sets from information provided at internet pages (web scraping). Second, I work with SQLite and Django to manage more complex data sets that require database operations, such as merging, virtual tables, and visualization in web pages. Both of these usages of a modern programming language have increased my productivity significantly and made data resources more easily available. In order to introduce you to Python, I first evaluate contemporary programming languages and their appropriateness for political methodology. Subsequently, I demonstrate how to use Python to generate a data set from an online source. In the last part, I discuss some more advanced issues of data analysis and evaluate how Python can help in a world of ever more easily available online data.