Open courses

Analyzing data with code
R for journalists
Working in a spreadsheet can be messy and cluttered. Especially if you have a very large dataset and need to perform many operations. You need to document every step to be able to repeat your analyses later (for verification or with new data). Fortunately, there is R.
With a few simple lines of code, you can do the same things in R as in a spreadsheet: scraping, cleaning, sorting, filtering, grouping (pivot tables), creating statistics and graphs, but now in an uncluttered workflow that can be easily modified, repeated and shared. Experience why R (freeware) has quickly won the hearts of many data journalists.

What you will learn
- Installing R and Posit Studio (formerly R Studio)
- Explore windows and tabs
- Use scripts and notebooks
- Install and load packages
- Import datasets into R
- Explore datasets in R
- Apply basic Tidyverse functions (‘verbs’)
- Export datasets from R to Excel or CSV
- Merge datasets in R
- Scraping data with R
- Interview data in R (statistics)
- Create graphs in R
- Clean up data with R
A comprehensive workbook with sample scripts and exercises accompanies the course.
Some experience with spreadsheets is recommended for this course, but not necessary.