A map of Ireland’s January median rainfal color coded across 25 weather stations for 164 years (1850-2014)
Author
Okello Simon
Data source
Ireland weather data of 164 years (1850-2014) providing long view of rainfall patterns. Data contains files for weather stations names,locations (longitudes & latitudes), elevations. It was saved in Rbinary to allow easy loading into Rstudio. Data was supplied by Prof. Conor Murphy and Dr. Simon Noone.
Running Code
Installed packages
To prepare the R environment with all necessary tools for spatial data analysis, data manipulation, and mapping.
# Install package and set working directoryif (!require("tmap")) install.packages("tmap", dependencies =TRUE)
Loading required package: tmap
Warning: package 'tmap' was built under R version 4.4.2
Breaking News: tmap 3.x is retiring. Please test v4, e.g. with
remotes::install_github('r-tmap/tmap')
if (!require("sf")) install.packages("sf", dependencies =TRUE)
Loading required package: sf
Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.3.1; sf_use_s2() is TRUE
if (!require("dplyr")) install.packages("dplyr", dependencies =TRUE)
Loading required package: dplyr
Warning: package 'dplyr' was built under R version 4.4.2
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Set directory
Providing the default folder where R looks for files to read and where it saves output files
setwd("D:/Masters D info/GY672/Class Materials-20241106")
Load and explore data
The code is for loading and exploring the datasets to: Confirm successful data loading, understand the structure and content of the rain and stations objects, get a quick overview of the data’s beginning and end for validation.
# A tibble: 6 × 4
Year Month Rainfall Station
<dbl> <fct> <dbl> <chr>
1 1850 Jan 169 Ardara
2 1851 Jan 236. Ardara
3 1852 Jan 250. Ardara
4 1853 Jan 209. Ardara
5 1854 Jan 188. Ardara
6 1855 Jan 32.3 Ardara
tail(rain)
# A tibble: 6 × 4
Year Month Rainfall Station
<dbl> <fct> <dbl> <chr>
1 2009 Dec 99.9 Waterford
2 2010 Dec 70.2 Waterford
3 2011 Dec 80.7 Waterford
4 2012 Dec 114. Waterford
5 2013 Dec 136. Waterford
6 2014 Dec 28.7 Waterford
Calculating median rainfall for January
The code calculates the median rainfall for each weather station in January. This is useful for summarizing large datasets to avoid the influence of outliers.
Adding the stations to the median rainfall for January
The code combines spatial information about weather stations with their corresponding median January rainfall data:To create a unified dataset that links weather station details with their median January rainfall values.
stations_medians <- stations %>%left_join(january_medians, by ="Station")
Code used to create the map
This code creates an interactive map that visualizes the median January rainfall for weather stations. Weather stations are represented as bubbles, with size and color indicating median January rainfall. You can zoom and pan to explore the spatial distribution of rainfall across regions.
tm_shape(stations_sf) +tm_bubbles(size =0.8, col ="median_rainfall",palette ="Reds",title.col ="Median January Rainfall (mm)") +tm_basemap("OpenStreetMap")
Discussions of patterns
Observation on extreme values show Killarney (177.7 mm) records the highest median rainfall and Dublin Airport (63.0 mm) records the lowest rainfall. Dublin Airport location on the eastern seaboard and relative shelter from Atlantic systems may have contributed to this.
Context on regional disparities show, The west and southwest experience high rainfall probably due to their exposure to Atlantic weather systems and topographical influences and the east and midlands are drier because they lie further from the Atlantic.
An observation on geographical locations show west of Ireland (e.g., Valentia: 166.0 mm, Ardara: 171.6 mm, Killarney: 177.7 mm) recording the highest median rainfall. This appears to be consistent with the influence of the Atlantic Ocean, which brings moist air and frequent rain to the western regions. Stations in the east (e.g., Dublin Airport: 63.0 mm, Phoenix Park: 67.6 mm, Armagh: 75.0 mm) record much lower rainfall. Stations in central Ireland (e.g., Mullingar: 80.6 mm, Birr: 77.5 mm) also have relatively low rainfall compared to coastal areas, likely due to their distance from the Atlantic.
It’s also interesting to note that, stations in urban centers record some of the lowest rainfall for instance Dublin Airport (63.0 mm) and Phoenix Park(67.6 mm), compared to Rural locations like Killarney(177.7 mm) and Valentia (166.0 mm) generally have higher rainfall, likely due to their proximity to natural features like forests, which promote precipitation.
Seasonal context indicate that, January is a typically wet month in Ireland due to the dominance of Atlantic depressions. The data reflects this, but it also highlights that local geography and position relative to the prevailing winds significantly influence rainfall patterns.
Conclusion
The patterns in the data vividly show wetter conditions in the west, drier in the east, with coastal areas receiving more rainfall than inland regions. This align with Ireland’s climatic characteristics. Notably, this variability underscores the importance of geographical factors like proximity to the Atlantic, topography, and urbanization in shaping rainfall distribution.