R

Access Open Street Map features programmatically with osmdata package in R

Masumbuko Semba
OpenStreetMaps is a great source of spatial data. Most common programming languages have packages for downloading data from OSM. In this tutorial we are going to see how to download hosptial features data using R’s osmdata (Padgham et al. 2017) package and plot it using ggplot (Wickham 2016), and interactively using tmap (Tennekes 2018). This requires some knowledge of spatial data structures.

CHIRPS precipitation data made easier access in R with wior package

Masumbuko Semba
The Climate Hazards Group InfraRed Precipitation with Station data (CHIRPS) is a quasi-global rainfall data set. As its title suggests it combines data from real-time observing meteorological stations with infra-red satellite data to estimate precipitation. CHIRPS incorporates 0.05° resolution satellite imagery with in-situ station data to create gridded rainfall time series for trend analysis and seasonal drought monitoring. The global dataset covers the area from \(40^\circ\)N to \(4^\circ\)S and from \(20^\circ\)W to \(50^\circ\)E with a spatial resolution of 0.

Access and Download satellite data in tidy form with rerddap

Masumbuko Semba
R
In the post titled Access, Download, Process and VIsualize sea surface height and geostrophic current from AVISO in R posted in my blog on Monday, Apr 15, 2019, I explained how we can download the satellite data like sea surface height from AVISO in R. I illustrate in detail getting the data using xtractomatic package (Mendelssohn 2018). Though xtractomatic package provide functions that allows us to get access to the ERDDAP server and get the data, but one big challenge is that the data comes is array and need an expensive computation process, especially if you deal with gridded data for a long term time series.

PCA made easy in R

Masumbuko Semba
R
In the previous post I illustrated a simple way to do Principal Component Analysis in R. I simply used the output results from prcomp() function of R base. But, I constantly find hard to the untidy output that prcomp generates and wished to get a tidy result. In this post I will illustrate the approaches that I was inspired by Claus Wilke in the post PCA tidyverse style.

Simplified Principal Component Analysis in R

Masumbuko Semba
R
Principal Component Analysis (PCA) Principal Component Analysis (PCA) is widely used to explore data. This technique allows you visualize and understand how variables in the dataset varies. Therefore, PCA is particularly helpful where the dataset contain many variables.This is a method of unsupervised learning that allows you to better understand the variability in the data set and how different variables are related. The Components in PCA are the underlying structure in the data.