Dave’s data science blog

Welcome to my blog. Many thanks to the makers of the Academic Hugo template and the authors of Blogdown for R. Here you’ll find bite-sized examples of problems tackled mostly using R.

David Leedal

David Leedal

Data scientist

Biography

I’ve been applying computational science to various problems for 20 years. First as a research scientist studying flood risk management and geoengineering assessment and more recently in the private sector on environmental, insurance, and site planning projects. I’m hugely appreciative of the Open Source community - I’ve learnt so much from the posts and tutorials generously supplied by others. I mostly work with R. This is my contribution, it’s partly a place for me to make a record of methods I’ve used that have worked so that I can find them again, and partly a means to share those methods in the hope they might help someone else. Keep the community vibrant. UseR.

Interests

  • Data science
  • Simulation modelling
  • Geospatial analysis
  • Statistics
  • Data visualisation

Education

  • PhD in Climate Change and Control Theory, 2007

    Lancaster University

  • BSc in Environmental Science, 2002

    Lancaster University

Recent Posts

Spatial features: the fundamentals

Get the packages library(sf) library(dplyr) Spatial features from first principles Early on my geospatial learning path I came across Barry Rowlingson’s cheat sheet for R’s sp and raster librarys. I find it really useful to build simple test examples from scratch to make sure I know what I’m doing before diving in to large data sets and being overwhelmed be multiple tricky edge cases (or worse, corner cases).

Quick and easy classification column (data.table)

Quickly add higher-level classification column to data. A very common use-case is to add a column to a table of data that indicates a category for each row where the category is dependent on the value of one of the table column.

Collecting Highway Bearings

Given a point, what highway is it on and what direction does that highway go? I’m kicking off this blog with a geospatial example.