In the realm of environmental management and agricultural planning, understanding seasonal weather patterns is essential. This blog post delves into an in-depth analysis of rainfall in January across Ireland, a period typically marked by significant precipitation that profoundly affects the region. By examining data collected from various weather stations, this study explores how geographic characteristics, such as elevation and proximity to the coast, influence rainfall distribution. Utilizing advanced GIS tools and statistical methods, this analysis visualizes rainfall variations and examines correlations to offer deeper insights into the climatic influences at play. This comprehensive approach not only enhances our understanding of Ireland’s weather patterns but also informs strategic planning for water resource management and flood prevention strategies.
The analysis utilizes data from 25 weather stations across Ireland, each station recording environmental metrics with a particular focus on rainfall. For this study, the dataset specifically includes rainfall data for the month of January, collected over several years. Each record in the dataset identifies the station by its unique ID and includes geographic coordinates, allowing for precise mapping. Key attributes such as elevation and distance from the coast are also part of the dataset, providing a basis to explore their influence on rainfall variations. This targeted selection of data supports a focused investigation into spatial patterns and climatic influences across the region.
library(sf)
library(dplyr)
library(tmap)
library(ggplot2)
setwd("/home/students/24250027")
dt <- load("rainfall (5).RData")
head(stations)
## # A tibble: 6 Ă— 9
## Station Elevation Easting Northing Lat Long County Abbreviation Source
## <chr> <int> <dbl> <dbl> <dbl> <dbl> <chr> <chr> <chr>
## 1 Athboy 87 270400 261700 53.6 -6.93 Meath AB Met E…
## 2 Foulksmills 71 284100 118400 52.3 -6.77 Wexford F Met E…
## 3 Mullingar 112 241780 247765 53.5 -7.37 Westme… M Met E…
## 4 Portlaw 8 246600 115200 52.3 -7.31 Waterf… P Met E…
## 5 Rathdrum 131 319700 186000 52.9 -6.22 Wicklow RD Met E…
## 6 Strokestown 49 194500 279100 53.8 -8.1 Roscom… S Met E…
head(rain)
## # 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
weather_stations_cleaned <- stations %>%
inner_join(rain, by = "Station")
# Filter weather station data for January
rain_jan80 <- filter(rain, Month == 'Jan')
print(names(stations))
## [1] "Station" "Elevation" "Easting" "Northing" "Lat"
## [6] "Long" "County" "Abbreviation" "Source"
# Summarizing median rainfall
rain_jan80 <- rain_jan80 %>%
group_by(Station) %>%
summarize(median_rainfall = median(Rainfall, na.rm = TRUE))
print(rain_jan80)
## # A tibble: 25 Ă— 2
## Station median_rainfall
## <chr> <dbl>
## 1 Ardara 172.
## 2 Armagh 75
## 3 Athboy 87.1
## 4 Belfast 102.
## 5 Birr 77.5
## 6 Cappoquinn 147.
## 7 Cork Airport 135.
## 8 Derry 97.3
## 9 Drumsna 99.1
## 10 Dublin Airport 63
## # ℹ 15 more rows
To elucidate the patterns and relationships in Ireland’s rainfall data, four distinct types of data visualizations were employed:
These techniques were selected to comprehensively analyze both individual and relational aspects of the data, enabling informed decisions for environmental management and planning.
Purpose and Visualization Choice: The interactive map highlights spatial rainfall patterns using a color gradient, where darker blue represents higher rainfall. It enables users to quickly identify areas with high or low rainfall and interact with individual weather station data for deeper insights.
Data Used: The map visualizes median rainfall data from 25 weather stations across Ireland for January. Each station is represented by its geographic location, with rainfall values (in mm) ranging from 63.0 mm at Dublin Airport to 177.7 mm at Killarney. The data captures regional rainfall variations influenced by geography, proximity to the coast, and topography.
# Convert to an sf object
weather_stations_cleaned_sf <- st_as_sf(weather_stations_cleaned, coords = c("Long", "Lat"), crs = 4326)
# Set the interactive map mode
tmap_mode('view')
## tmap mode set to interactive viewing
# Plot the distribution of rainfall
tm_map <- tm_shape(weather_stations_cleaned_sf) +
tm_dots(col = "Rainfall", size = 0.1, palette = "Blues", style = "quantile") # Visualization of rainfall at points
# Convert the tmap to leaflet for embedding
library(leaflet)
leaflet_map <- tmap_leaflet(tm_map)
# Show the map
leaflet_map