gravatar

Blaise

Blaise

Recently Published

Reproducing DfT Stats19 Pedestrian Factsheet 2024
Output of code to reproduce the UK Department for Transport (DfT) pedestrian factsheet 2024 https://www.gov.uk/government/statistics/reported-road-casualties-great-britain-pedestrian-factsheet-2024/reported-road-casualties-in-great-britain-pedestrian-factsheet-2024 code is available https://github.com/ropensci/stats19/blob/master/vignettes/Pedestrian_factsheet_2024.Rmd
Solar thermal - The worlds most misunderstood energy technology?
Solar thermal is the walking and cycling of the energy world. Low tech, low resource and quick and cheap to build. But in many places, including the UK it has been completely overlooked. I was passing through Denmark and decided to drop in and learn about Denmarks experiences.
Daily average solar and wind in the UK and Denmark in 2020
How did daily average solar irradiation hitting the earths surface (i.e. what gets past the clouds and can be used to generate electricity) compare with wind speed throughout 2020? ECMWF meteo data is plotted for the UK and Denmark, two countries with huge wind resources and significant installed solar capacity and potential.
Private PCR test locations
The UK government provides a list of private COVID test providers: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/995458/covid-private-testing-providers-general-testing-220621.csv/preview however no explicit location data is provided. This map has used the Rselenium server wrapper R package to scrape the postcodes from each website and used the PostcodesioR R package to determine the address of that postcode.
Using Rselenium and PostcodesioR to plot UK Government Private PCR list
The UK government provides a list of private test providers: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/995458/covid-private-testing-providers-general-testing-220621.csv/preview A list of websites and emails is fine if you are ordering a kit, but most mail order kits won't provide results for at least 24 hours until you have posted them back. If you want to find providers that can do a test on site and get a same day you need to know where the companies are based, information that is not given in the list. This is a perfect case for webscraping, loop through the urls and extract UK postcodes and plot them on a map. Open most browsers such as Chrome or Firefox and it is very easy to view the page source code (in Chrome right click and select 'View Page Source'). The most common R webscraping tool is rvest. However, testing a few urls it soon became apparent many websites are Java based. The Rselenium package gets round this. It essentially piggybacks on the browsers ability to decode the website and enables website attributes to be fetched as plain text.
COVID private tests
EU met data
Summary of open access weather data in the EU
Worldmet UK stations
Locations of the UK weather stations with NOAA data accessible through the worldmet package.