R exercise: Analysing data

R exercise: Analysing data

While using R for your everyday calculations is so much more fun than using your smartphone, that’s not the (only) reason we’re here. So let’s move on to the real thing: How to make data tell us a story.

First you’ll need some data. You haven’t learned how to get and clean data, yet. We’ll get to that later. For now you can practice on this data set. The data journalists at Berliner Morgenpost used it to take a closer look at refugees in Germany and kindly put the clean data set online. You can also play around with your own set of data. Feel free to look for something entertaining on the internet – or in hidden corners of your hard drive. Remember to save your data in your working directory to save yourself some unneccessary typing.

R crash course: Getting started

At journocode, we’re starting out with an intro to the tool we rely on most right now: The statistical programming language R. “R: A Language for Data Analysis and Graphics” is mostly used in statistics, but is very useful for journalists working with data as well.

You can install R here. Since it is open source, there are tons of packages with additional functions and possibilities. We will show you how to find and install them in the next chapters.