How to (quickly) enrich a map with natural and anthropic details

In this post I show how to enrich a ggplot map with data obtained from the Open Street Map (OSM) API. After adding elevation details to the map, I add water bodies and elements identifying human activity. To highlight the areas more densely inhabitated, I propose to use a density-based clustering algorithm of OSM features.


Thursday, 9 August 2018


Twitter: frbailo




  • Bayesian forecasting for uni/multivariate time series
    Bayesian forecasting for uni/multivariate time series The post Bayesian forecasting for uni/multivariate time series first appeared on R-bloggers.
  • How to Make Impressive Shiny Dashboards in Under 10 Minutes with semantic.dashboard
    Introducing semantic.dashboard Dashboards allow you to structure reports intuitively and break them down into easy-to-read chunks. As a result, end-users can navigate and explore data much easier than with traditional reports. The shinydashboard R package has been out for ages, and it is a good option with a decent ... The post How to Make […]
  • Championing the R Community for the NHS
    The NHS is one of the UK’s most valued institutions and serves as the healthcare infrastructure for millions of people.... The post Championing the R Community for the NHS appeared first on Mango Solutions. The post Championing the R Community for the NHS first appeared on R-bloggers.
  • Visualizing geospatial data in R—Part 2: Making maps with ggplot2
    How to create annotated, multi-layered maps and choropleth maps in R using ggplot2. The post Visualizing geospatial data in R—Part 2: Making maps with ggplot2 first appeared on R-bloggers.
  • DALEX 2.1.0 is live on GitHub!
    Dreamworks animation. Image from: the awesome reception of my last blog about improvements for DALEX and DALEXtra, I couldn’t stand waiting for the next opportunity to share some details about new features with you. Sadly at some point, I realized that ... The post DALEX 2.1.0 is live on GitHub! first appeared on R-bloggers.

RSS Simply Statistics

  • The Four Jobs of the Data Scientist
    In 2019 I wrote a post about The Tentpoles of Data Science that tried to distill the key skills of the data scientist. In the post I wrote: When I ask myself the question “What is data science?” I tend to think of the following five components. Data science is (1) the application of design […]
  • Palantir Shows Its Cards
    File this under long-term followup, but just about four years ago I wrote about Palantir, the previously secretive but now soon to be public data science company, and how its valuation was a commentary on the value of data science more generally. Well, just recently Palantir filed to go public and therefore submitted a registration […]
  • Asymptotics of Reproducibility
    Every once in a while, I see a tweet or post that asks whether one should use tool X or software Y in order to “make their data analysis reproducible”. I think this is a reasonable question because, in part, there are so many good tools out there! This is undeniably a good thing and […]

RSS Statistical Modeling, Causal Inference, and Social Science

  • The Shrinkage Trilogy: How to be Bayesian when analyzing simple experiments
    There are lots of examples of Bayesian inference for hierarchical models or in other complicated situations with lots of parameters or with clear prior information. But what about the very common situation of simple experiments, where you have an estimate and standard error but no clear prior distribution? That comes up a lot! In such […]
  • Hamiltonian Monte Carlo using an adjoint-differentiated Laplace approximation: Bayesian inference for latent Gaussian models and beyond
    Charles Margossian, Aki Vehtari, Daniel Simpson, Raj Agrawal write: Gaussian latent variable models are a key class of Bayesian hierarchical models with applications in many fields. Performing Bayesian inference on such models can be challenging as Markov chain Monte Carlo algorithms struggle with the geometry of the resulting posterior distribution and can be prohibitively slow. […]
  • Understanding Janet Yellen
    I don’t know anything about Janet Yellen, the likely nominee for Secretary of the Treasury. For the purpose of this post, my ignorance is OK, even desirable, in that my goal is to try to understand mixed messages that I’m receiving. Two constrasting views on the prospective Treasury Secretary First, here’s Joseph Delaney: So, I […]