Ireland’s Median Rainfall in January 1850-2014

Author

Michael Shiel

Published

January 13, 2026

Introduction

The goal for this blog is to create a map of the median rain fall levels in the the month of January between the period 1850 and 2014. Three R packages were used in order to complete the map seen below; Thematic Maps (TMAP) for map creation and interactivity; Simple Features (SF) in order to convert table data into spatial data; and Tidyverse for readability and additional features like the pipe (%>%) operator. The blog provides a brief description and analysis of the data being used, the methods employed in order to create the map (Fig. 1) and a short discussion of the results and any spatial patterns identified.


Data

The data used for this blog was sourced from The Irish Climate Analysis and Research UnitS (ICARUS) research center. The rainfall.RData file contains two objects: a rain table and a stations table. The rain table is a collection of monthly rainfall levels for twenty-five different weather stations between the period of January 1850 and December 2014 (49,500 total entries). There are 5 unique variables which can be seen in the plot below.

Year Month Rainfall Station
1850 Jan 169.0 Ardara
1851 Jan 236.4 Ardara
1852 Jan 249.7 Ardara
1853 Jan 209.1 Ardara
1854 Jan 188.5 Ardara
1855 Jan 32.3 Ardara


The stations table contains the geographic information for each of the 25 weather stations present in the rain table. There are a total 9 variables within the table. The only shared variable between rain and stations is the station name (Station), this variable will later act as a primary key between the two tables. Note: Given that the Latitude and Longitude as doubles they must later be converted to coordinates using the SF package.

Station Elevation Easting Northing Lat Long County Abbreviation Source
Athboy 87 270400 261700 53.60 -6.93 Meath AB Met Eireann
Foulksmills 71 284100 118400 52.30 -6.77 Wexford F Met Eireann
Mullingar 112 241780 247765 53.47 -7.37 Westmeath M Met Eireann
Portlaw 8 246600 115200 52.28 -7.31 Waterford P Met Eireann
Rathdrum 131 319700 186000 52.91 -6.22 Wicklow RD Met Eireann
Strokestown 49 194500 279100 53.75 -8.10 Roscommon S Met Eireann


Methodology

This section outlines the 5 steps taken in order to create Fig.1 later in blog.
Step 1: In order to calculate the median rainfall for January, the irrelevant months must be removed. To do this the rain table was filtered into a new R object entitled jan_rain.

#Filter only for the month of January.
rain %>% filter(Month == "Jan")-> jan_rain
Year Month Rainfall Station
1850 Jan 169.0 Ardara
1851 Jan 236.4 Ardara
1852 Jan 249.7 Ardara
1853 Jan 209.1 Ardara
1854 Jan 188.5 Ardara
1855 Jan 32.3 Ardara


Step 2: Is to calculate the median rainfall in January for each of the 25 weather stations across the study period. To achieve this the filtered jan_rain table was piped into a function which groups all 4125 entries by the Station variable. Then, this is piped into a summary function paired with a median calculation which complies our grouped entries to a single row for each station and stores it in a new variable entitled Median. Finally the output of this function is writeen into a new R frame titled median_jan_rain. The code executed and it’s resulting table can be seen below:

jan_rain %>%
  group_by(Station)%>%
  summarise(Median = median(Rainfall, na.rm = TRUE)) -> median_jan_rain
  #Note: na.rm ignores any missing values.
Station Median
Ardara 171.6
Armagh 75.0
Athboy 87.1
Belfast 102.1
Birr 77.5
Cappoquinn 147.4


Step 3: Is to join the median January rainfall levels to the [stations]{style=“color:teal} table as this is the table that contains the geographic information needed to plot them using TMAP. As mentioned previously, the Station variable can be used as a primary key between rain and stations tables. This also works for median_jan_rain as it has retained the same variables as rain aswell as the new calculated Median. A left join was chosen as the join type as the goal is to only join the new Median variable from med_jan_rain while also keeping the geographical information present in stations. The code for this operation is below:

stations %>% left_join(median_jan_rain, by = "Station") -> stations
Station Elevation Easting Northing Lat Long County Abbreviation Source Median
Athboy 87 270400 261700 53.60 -6.93 Meath AB Met Eireann 87.1
Foulksmills 71 284100 118400 52.30 -6.77 Wexford F Met Eireann 105.7
Mullingar 112 241780 247765 53.47 -7.37 Westmeath M Met Eireann 80.6
Portlaw 8 246600 115200 52.28 -7.31 Waterford P Met Eireann 123.3
Rathdrum 131 319700 186000 52.91 -6.22 Wicklow RD Met Eireann 126.6
Strokestown 49 194500 279100 53.75 -8.10 Roscommon S Met Eireann 102.5


Step 4: Is to convert stations into a SF object in order to be able to use the coordinate values (Lat and Long) present within the stations table. The achieve this the SF conversion function was used to convert coordinates to a point geometry by setting the coords parameter to Long and Lat. The Coordinate Reference System (CRS) was set to WGS1984 (EPSG:4326) as standard. The output of which was stored in a new spatial object called sf_stations.

stations %>% st_as_sf(coords = c("Long", "Lat"), crs = 4326) -> sf_stations
Station Elevation Easting Northing County Abbreviation Source Median geometry
Athboy 87 270400 261700 Meath AB Met Eireann 87.1 POINT (-6.93 53.6)
Foulksmills 71 284100 118400 Wexford F Met Eireann 105.7 POINT (-6.77 52.3)
Mullingar 112 241780 247765 Westmeath M Met Eireann 80.6 POINT (-7.37 53.47)
Portlaw 8 246600 115200 Waterford P Met Eireann 123.3 POINT (-7.31 52.28)
Rathdrum 131 319700 186000 Wicklow RD Met Eireann 126.6 POINT (-6.22 52.91)
Strokestown 49 194500 279100 Roscommon S Met Eireann 102.5 POINT (-8.1 53.75)


Step 5: Is to construct the map using the TMAP package. The TMAP mode was set to view to make the map interactive rather than static. The process is as follows: The tm_shape function extracts the geometry from the sf_stations table. The tm_bubbles aesthetic was chosen as the weather stations are represented at single point. The fill parameter was set to correspond with the Median of each station. Equal Interval was chosen as the classification method so that each class bin was similar to one another in size. The number of breaks chosen was 6 in order to evenly distribute all values. A scale bar was also added in order to align with cartographic best practice. The resultant map can be seen in Fig.1 in the section below:

tmap_mode("view")
tm_shape(sf_stations) +
tm_bubbles(fill = "Median", 
  fill.scale = tm_scale_intervals(style = "equal", n = 6),
  fill.legend = tm_legend(title = "Median Rainfall (mm)")) +
tm_scalebar(position = c("left", "bottom"))



Results and Discussion

Fig 1: Map of Ireland’s Median Rainfall in January between 1850 and 2014. Source: ICARUS Research Center

A number of spatial patterns can be observed when analysing Fig. 1 above. For example coastal weather stations tend to recieve a higher median January rainfall particularly in the South. Furthermore, There there is a East and West divide between rainfall levels. There are two reasons for this, one is their proximity to the sea means a higher air moisture content is present meaning more rain. The other is that Ireland’s prevailing wind brings in coastal showers that may be further out from the South West to the mainland (Met Éireann). Additionally, further inland weather stations have a lower median January rainfall likely becuase they are further away from the coast. There are a number of outliers to this observation, in the East, Dublin Airport (63mm) and Phoenix Park (67.6) have some of the lowest median rainfall despite being on the coast of the Irish Sea. Furthermore, in the West, Shannon Airport (92.9mm) weather station is also lower than expected when comparing to the surrounding West coast stations. This is due to the rain shadow or the orographic effect. This is a climatic process in which mountain slopes facing the wind receive more rainfall than on downward slopes due to changes in air temperature due to a quick rise in elevation (Britannica 2023). This process can be seen Fig. 1 as the weather stations just South of Dublin Airport (Rathdrum (126.6mm)) and Shannon Airport (Killarney (177.7mm)) receive nearly double the rainfall as they are located on the South facing slopes of the Wicklow and MacGillyCuddy’s Reeks respectively.

Conclusion

In conclusion this short blog described the processes required to create an interactive showing the median rainfall in January in Ireland between the period of 1850 and 2014. The inital 4 steps were executed using the SF and Tidyverse package in order to prepare the data. The TMAP package was also used to plot Fig. 1 and embed it in the section above. The spatial patterns that were identified were the disparity between coastal and inland weather stations including any outliers. The factors that influence these patterns are orographic effect, proximity to the coast and prevailing winds. One limitation is that the use of the Leaflet R package could allow for further interactivity in Fig. 1, for example a plot could be coded to pop-up when the user clicks on a particular weather station.

Bibliography

Britannica. (2023). Orograhpic Precipitation. [online]. Available at: https://www.britannica.com/science/orographic-precipitation. [Accessed 13/01/2026]

Met Éireann. (n.a.). Wind. [online]. Available at: https://www.met.ie/climate/what-we-measure/wind. [Accessed 13/01/2026]

Pebesma, E. (2018). Simple Features for R: Standardized Support for Spatial Vector Data. The R Journal. Vol 10(1), pgs. 439-446. Available at: https://doi.org/10.32614/RJ-2018-009.

Tennekes, M. (2018). tmap: Thematic Maps in R. Journal of Statistical Software. Vol 84(6), pgs. 1–39. Available at: doi:10.18637/jss.v084.i06.

Wickham, H. Averick, M. Bryan, J. Chang, W. McGowan, LD. François, R. Grolemund, G. Hayes, A. Henry, L. Hester, J. Kuhn, M. Pedersen, TL. Miller, E. Bache, SM. Müller, K. Ooms, J. Robinson, D. Seidel, DP. Spinu, V. Takahashi, K. Vaughan, D. Wilke, C. Woo, K. Yutani, H. (2019). Welcome to the tidyverse. Journal of Open Source Software. Vol 4(43), 1686. Available at: doi:10.21105/joss.01686.