Recap In the last post we got to the stage where we had the data for each club’s league positions since 1958/59 in a Google sheet. The next step is to visualise this data in a Shiny app. Shiny lets you create visualisations that your users can interact with, and they have slightly different code … Read More “My First Shiny App Part II: The Shiny code itself” »
Author: Rob
Happy New Year to all my readers! Blog stats My last post took the blog through past 4,000 page views for 2017, up 41 per cent on 2016. I only started R for Journalists in October 2016, so it’s not an entirely fair comparison for a full year of 2017. However, I put this website … Read More “2017 Blog Stats” »
Here is my first Shiny app! Shiny lets you create interactive visualisations in R. It’s a big step forward from the static visualisations we have done thus far. R has a fairly steep learning curve at the beginning. It took me several months and a DataCamp course before I began to know what I was … Read More “My First Shiny App: See Where Your Team Ranks in the Football Pyramid” »
Often I use R to handle large datasets, analyse the data and filter out the data I don’t need. When all this is done, I usually use write.csv() to print my data off and reopen it in Google Sheets. My workflow would look something like this: full_data <- read.csv(“some_dataset.csv”) #R analysis ending up with relevant_data write.csv(relevant_data, … Read More “How to Use googlesheets to Connect R to Google Sheets” »
On Tuesday I gave a workshop at the Data Journalism UK conference, run by Paul Bradshaw. This was the worked example for absolute beginners that we went through. If you’ve never looked at R before and want to run some R code, load up this page , copy the following in step by step … Read More “R for Absolute Beginners” »
Recently the British Department for Transport published its latest STATS19 data for the year 2016. We’ve looked at this data before. To recap, each row of the STATS19 data is a traffic accident that caused injury or death, identified by a unique Accident Index. It’s an extremely detailed dataset containing fields such as the latitude … Read More “Road accidents in November” »
Over the past two weeks I’ve been looking at Network Rail’s delays data. The data tells us how many delays there have been to trains thanks to all kinds of problems that affect the railways, from natural causes such as that seasonal favourite ‘leaves on the line‘ to human causes such as vandalism. There are … Read More “Vandalism Causing Train Delays” »
Back in August 2014, around the 100th anniversary of the outbreak of the First World War, the Data Unit published our analysis of the Commonwealth War Graves Commission‘s records of fallen soldiers, airmen, sailors and other servicemen and women who gave their lives during the next four years. As the 100th anniversaries have come and … Read More “The Losses in the Final Year of WW1” »
Over the past few years a good source of data has been Parliament’s petitions website. Anyone can start petitions or sign them. MPs have to consider the ones that get to 100,000 signatures for debates. The most popular petitions often end up leading the news cycle, such as the petition arguing for a second EU … Read More “Scraping in R: Access to mortgage petition” »
It’s time to branch out into a new area of data visualisation: proportion area plots. These plots use area to show proportion between different related values. A common type of proportional area plots are tree maps. We are going to be using the same principle but with circles. A common subject for area visualisation is … Read More “Spring Budget 2017: Circle visualisation” »