Dr Dominic Royé
  • About
  • Blog
  • Publications
  • Bioclim
  • Data Viz

Meeting People Where They R

This is my blog where I practice sharing my curiosity about R, particularly, the world of cartography and data visualization. I take this opportunity to invite you to participate in the #30DayChartChallenge.

Broken Chart: discover 9 visualization alternatives

R
R:Intermediate
Visualization
Charts
Remake
Bad practice
Distribution
Temperature
I’ve wanted to write a post for a while about a graph that the Spanish Ministry for Ecological Transition publishes every month, summarizing the average monthly temperature in Spain. If we look closely, there is a misuse of the geometry type to present the temperature variable. In this specific…
Dec 14, 2025
Dominic Royé

Always normalize your data

GIS
R
R:Elementary
Visualization
Map
Proportional symbol
Normalize
I recently came across a map from the National Atlas of Spain showing the number of libraries by municipality. However, one thing directly caught my attention. There’s a saying that many maps show only the population, and this seems to be the case here. The map does not provide any remarkable…
Jan 5, 2025
Dominic Roye

Map of circles grouped in multiple locations

GIS
R
R:Advanced
Visualization
Map
Proportional symbol
Circles
In my first post of 2024, which unfortunately has not been possible before April, I will explain how we can group in the same location several proportional circles. In 2022 I was looking for how to represent the number of heat wave days according to the degree of severity in Spain. I found the…
Apr 20, 2024
Dominic Royé

Inserted maps with ggplot2

GIS
R
R:Elementary
Visualization
Today I present a short post on how we can position an outermost territory near the main map or insert an orientation map. In this example we use the typical map of Spain where the Canary Islands are located in the southwest of the peninsula.
Oct 8, 2023
Dominic Royé

Part II. Orthographic map

Tomorrow’s weather

GIS
R
R:Advanced
Visualization
A while back I saw Chris Campbell’s global maps from the Financial Times like in this Tweet and I thought I needed to do it in R. In this first post of 2023 well see how we can access the GFS (Global Forecast System) data and visualize it with {ggplot2}, even though there are several ways, in this…
Feb 20, 2023
Dominic Royé

Hillshade effects

GIS
R
R:Intermediate
Visualization
Hillshade
DEM
Elevation
It is very common to see relief maps with shadow effects, also known as ‘hillshade’, which generates visual depth. How can we create these effects in R and how to include them in ggplot2?
Jul 20, 2022
Dominic Royé

Use of multidimensional spatial data

GIS
R
R:Advanced
Visualization
NCDF
Drought
Spain
Raster
Space-time information is vital in many disciplines, especially in climatology or meteorology, and this makes it necessary to have a format that allows a multidimensional structure. It is also important that this format has a high degree of interchange compatibility and can store a large number of…
Mar 8, 2022
Dominic Royé

Visualize the day-night cycle on a world map

GIS
R
R:Intermediate
Visualization
World map
Day-night
Animation
In April of this year, I made an animation of the 24-hour average temperature of January 2020, also showing the day-night cycle.
Dec 20, 2021
Dominic Royé

Climate circles

R
R:Elementary
Visualization
Climate
Polar
Temperature
The climate of a place is usually presented through climographs that combine monthly precipitation and temperature in a single chart. However, it is also interesting to visualize the climate on a daily scale showing the thermal amplitude and the daily average temperature. To do this, the averages…
Sep 4, 2021
Dominic Royé

Firefly cartography

GIS
R
R:Intermediate
Visualization
Firefly
Map
Cartography
Firefly maps are promoted and described by John Nelson who published a post in 2016 about its characteristics. However, these types of maps are linked to ArcGIS, which has led me to try to recreate them in R. The recent ggplot2 extension ggshadow facilitates the creation of this cartographic…
Jun 1, 2021
Dominic Royé

Bivariate dasymetric map

GIS
R
R:Advanced
Visualization
Bivariate
Map
Income
Urban
A disadvantage of choropleth maps is that they tend to distort the relationship between the true underlying geography and the represented variable. It is because the administrative divisions do not usually coincide with the geographical reality where people live. Besides, large areas appear to…
Mar 1, 2021
Dominic Royé

A heatmap as calendar

Visualization
R
R:Intermediate
Calendar
Heatmap
Climate
Recently I was looking for a visual representation to show the daily changes of temperature, precipitation and wind in an application xeo81.shinyapps.io/MeteoExtremosGalicia (in Spanish), which led me to use a heatmap in the form of a calendar. The shiny application is updated every four hours…
Dec 20, 2020
Dominic Royé

Climate animation of maximum temperatures

Visualization
R
R:Advanced
Animation
Temperature
Climate
GIS
In the field of data visualization, the animation of spatial data in its temporal dimension can show fascinating changes and patterns. As a result of one of the last publications in the social networks that I have made, I was asked to make a post about how I created it. Well, here we go to start…
Oct 11, 2020
Dominic Royé

River flow directions

GIS
R
R:Advanced
River
Directions
Distribution
I recently created a visualization of the distribution of river flow directions and also of coastal orientations. Following its publication in social networks, I was asked to make a post about how I did it. Well, here we go to start with an example of rivers, coastal orientation is somewhat more…
Jul 24, 2020
Dominic Royé

Visualize climate anomalies

Visualization
R
R:Intermediate
Climate
Anomaly
Temperature
When we visualize precipitation and temperature anomalies, we simply use time series as bar graph indicating negative and positive values in red and blue. However, in order to have a better overview we need both anomalies in a single graph. In this way we could more easly answer the question of…
Mar 29, 2020
Dominic Royé

Geographic distance

Spatial analysis
R
R:Elementary
GIS
Distance
Cities
The first post of this year 2020, I will dedicate to a question that I was recently asked. The question was how to calculate the shortest distance between different points and how to know which is the closest point. When we work with spatial data in R, currently the easiest thing is to use the sf p…
Jan 19, 2020
Dominic Royé

Visualize urban growth

Visualization
R
R:Elementary
GIS
City
Geography
The General Directorate for the Cadastre of Spain has spatial information of the all buildings except for the Basque Country and Navarra. This data set is part of the implementation of INSPIRE, the Space Information Infrastructure in Europe. More information can be found here. We will use the…
Nov 1, 2019
Dominic Royé

Visualize monthly precipitation anomalies

Visualization
R
R:Intermediate
Anomaly
Climate
Precipitation
Boxplot
Normally when we visualize monthly precipitation anomalies, we simply use a bar graph indicating negative and positive values with red and blue. However, it does not explain the general context of these anomalies. For example, what was the highest or lowest anomaly in each month? In principle, we…
Jul 7, 2019
Dominic Royé

Tidy correlation tests in R

Statistics
R
R:Advanced
Correlation
Tests
When we try to estimate the correlation coefficient between multiple variables, the task is more complicated in order to obtain a simple and tidy result. A simple solution is to use the tidy() function from the broom package. In this post we are going to estimate the correlation coefficients…
Apr 17, 2019
Dominic Royé

Import Excel sheets with R

Management
R
R:Intermediate
Excel
Sheets
We usually work with different data sources, and sometimes we can find tables distributed over several Excel sheets. In this post we are going to import the average daily temperature of Madrid and Berlin which is found in two Excel files with sheets for each year between 2000 and 2005: download.
Mar 10, 2019
Dominic Royé

Calculating the distance to the sea in R

GIS
R
R:Elementary
Distance
Raster
The distance to the sea is a fundamental variable in geography, especially relevant when it comes to modeling. For example, in interpolations of air temperature, the distance to the sea is usually used as a predictor variable, since there is a casual relationship between the two that explains the…
Jan 8, 2019
Dominic Royé

How to create ‘Warming Stripes’ in R

Visualization
R
R:Elementary
Warming stripes
Global warming
This year, the so-called warming stripes, which were created by the scientist Ed Hawkins of the University of Reading, became very famous all over the world. These graphs represent and communicate climate change in a very illustrative and effective way.
Dec 5, 2018
Dominic Royé

Accessing OpenStreetMap data with R

Visualization
R
R:Elementary
Map
OSM
Point of interest
Recently I created a map of the distribution of gas stations and electric charging stations in Europe.
Nov 3, 2018
Dominic Royé
No matching items
    Back to top

    Reuse

    CC BY-SA 4.0
    Buy Me A Coffee

    © 2018-2025 Dominic Royé ∙ Made with Quarto

    • Contact