Venice: Combatting Rising Sea Levels

Author

Emil Arangala

Venice: Combating Flooding

The Founding of Venice

The city of Venice was built in the 5th century CE and has been plagued by flooding since its founding.

Venice was originally built in order for its citizens to avoid the barbarian attacks that were running rampant in Italy at the time. To create a stable surface for building a city, long piles of oak and larch wood were pushed deep into the marsh ground of the Venetian lagoon until they reached a layer of hard clay. Oak and Larch are both very resistant to water which is why the foundations of the city have been able to remain intact over the millennia that the city has been around for. Because of the large amount of soil and silt that the lagoon water was in turn absorbed by the wood piles, the piles petrified much faster than they would have outside of the water. Venice is the only city in the world built on water, with more than 100 islands linked by canals and bridges.

Introduction: Venice

Since its founding Venice is sinking at a rate of about 1-2 millimeters per year due to both the marshy nature of the land it is on as well as the rising sea levels, making the risk of flooding even more prevalent. Flooding in Venice is mostly caused by high tides and strong winds, particularly winds blowing from the southeast. In the records from the last 150 years, there have been over 320 instances of intense high-water events in the city. Over half of those events have occurred in the last 30 years which means there has been an over 40% increase in these events in the last 30 years (link).

Fun Fact: New York is sinking at a similar rate to Venice (1-2 mm per year)

The city of Venice has implemented various measures to try and combat flooding throughout the city’s history, including the construction of protective barriers and the MOSE project.

Objectives

  • Examine current flooding data in Venice.

  • Explore the MOSE project and how it has been working

The Data

We need to find data on many different aspects of Venice. We need to access water level and wind speed data, as well as historical data on flooding in the city. It would also be nice to have data for mapping parts of the city like buildings, roads, and waterways.

  • BBBike

    • BBBike offers OpenStreetMap data that includes mapping of buildings, roads, waterways, railways, and various other features (link)

    • shape_city: geospatial data that has been refined to a close-up of the city of Venice

    • shape_lagoon: geospatial data that covers almost the entire Venetian lagoon

  • ISRPA

    • Houses a vast database of water and wind data from various stations throughout the Venetian lagoon (link)

    • city_tide: water level data taken from a gauge station at San Giorgio in Alga. Contains data from 2002, 2007, 2011,2013, and 2023

    • malamocco_tide: water level data taken from a gauge station at the Malamocco inlet. Contains data from 2002, 2007, 2011, 2013, and 2023

    • sea_direction: wind directional data taken from a gauge on an ocean platform in the Adriatic Sea. Contains data from 2007, 2011, 2013, and 2023

    • sea_speed: wind speed data taken from a gauge on an ocean platform in the Adriatic sea. Contains data from 2007, 2011, 2013, and 2023

The data can be found in this zip file.

The Packages

Not all of the below packages are required but I’m playing it safe till I know which ones we don’t need. These packages allow for an assortment of features, like plotting geospatial data and processing wind and water data.

require(ggspatial)
Loading required package: ggspatial
# Package for plotting geospatial data using tidyverse's ggplot2 package
require(maptiles)
Loading required package: maptiles
# Package that allows you to extract map tiles from online services like OpenStreetMap and use them in your own maps
require(osmdata)
Loading required package: osmdata
Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright
# Package that allows you  access data from OpenStreetMap
require(rnaturalearth)
Loading required package: rnaturalearth
# Package that allows us to import cartographic data from Natural Earth directly into R
require(sf)
Loading required package: sf
Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1; sf_use_s2() is TRUE
# Main package for working with vector data in R
require(terra)
Loading required package: terra
terra 1.8.5
# Main package for working with raster data in R
require(tidyterra)
Loading required package: tidyterra

Attaching package: 'tidyterra'
The following object is masked from 'package:stats':

    filter
# Package that allows you to easily plot terra objects alongside sf objects on a map
require(tidyverse)
Loading required package: tidyverse
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ tidyr::extract() masks terra::extract()
✖ dplyr::filter()  masks tidyterra::filter(), stats::filter()
✖ dplyr::lag()     masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
# Set of packages that facilitate easy data cleaning, transformation, and visualization
require(dplyr)

Dealing with the Data

In this tutorial, we will examine how wind speeds correlate with flooding events in Venice and explore the potential impact of reducing these wind speeds on water levels. The first thing we need to do is set up our working directory, this will ensure that our code blocks can access the files we want them to:

setwd("/cloud/project/Venice_Combatting_Flooding_Data") 
# load in a map of buildings in the city of venice
lagoon_buildings <- st_read("shape_lagoon/buildings.shp")
Reading layer `buildings' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_lagoon/buildings.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 31921 features and 3 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 12.161 ymin: 45.217 xmax: 12.52457 ymax: 45.463
Geodetic CRS:  WGS 84
lagoon_waterways <- st_read("shape_lagoon/waterways.shp")
Reading layer `waterways' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_lagoon/waterways.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 1737 features and 4 fields
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 12.16102 ymin: 45.21701 xmax: 12.50609 ymax: 45.46297
Geodetic CRS:  WGS 84
lagoon_roads <- st_read("shape_lagoon/roads.shp")
Reading layer `roads' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_lagoon/roads.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 15758 features and 7 fields
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 12.161 ymin: 45.217 xmax: 12.53032 ymax: 45.463
Geodetic CRS:  WGS 84
lagoon_natural <- st_read("shape_lagoon/natural.shp")
Reading layer `natural' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_lagoon/natural.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 717 features and 3 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 12.161 ymin: 45.21703 xmax: 12.52441 ymax: 45.463
Geodetic CRS:  WGS 84

If you are copying this code into a separate R document you may only need to run this line of code once, but on this Quarto website, we will need to reestablish this directory in any code block that we are reading in new files.

There are a couple of other shape files in the folder, they won’t be very useful in what we’re trying to do but they’re always fun to mess with. Here’s the code for loading more data:

# setwd("/cloud/project/Venice_Combatting_Flooding_Data") 
# lagoon_places <- st_read("shape_lagoon/places.shp")
# lagoon_landuse <- st_read("shape_lagoon/landuse.shp")
# lagoon_natural <- st_read("shape_lagoon/natural.shp")
# lagoon_points <- st_read("shape_lagoon/points.shp")
# lagoon_railways <- st_read("shape_lagoon/railways.shp")

# And if you want to load these into the map below here is the code for that
# geom_sf(data = lagoon_places, size = 0.5, color = "Pick a color")
# geom_sf(data = lagoon_landuse, size = 0.5, color = "Pick a color")
# geom_sf(data = lagoon_natural, size = 0.5, color = "Pick a color")
# geom_sf(data = lagoon_points, size = 0.5, color = "Pick a color")
# geom_sf(data = lagoon_railways, size = 0.5, color = "Pick a color")

Now we need to turn one of these shape files into an actual map:

lagoon_data <- ggplot() +
  geom_sf(data = lagoon_waterways, size = 0.5, color = "royalblue1") +
  geom_sf(data = lagoon_roads, size = 0.5, color = "coral3", alpha = .2) +
  labs(title = "Venice",
       subtitle = "Waterways and Roads",
       caption = "Source: BBBike") +
  theme_minimal() + 
  theme(panel.grid = element_blank(),
        axis.text = element_blank())
lagoon_data

That looks cool but we have nothing to base that off of. Let’s bring in a base map so we can see what a satellite map of Venice looks like underneath this.

# load in a basemap of the Venetian lagoon
lagoon_terrain <- get_tiles(lagoon_waterways,
                              provider = "Esri.WorldImagery")
lagoon_terrain
class       : SpatRaster 
dimensions  : 415, 590, 3  (nrow, ncol, nlyr)
resolution  : 0.00119, 0.00119  (x, y)
extent      : 11.95313, 12.65523, 45.08951, 45.58336  (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326) 
source(s)   : memory
colors RGB  : 1, 2, 3 
names       : Esri.World~_546_366_1, Esri.World~_546_366_2, Esri.World~_546_366_3 
min values  :                     0,                    21,                     1 
max values  :                   237,                   232,                   207 
lagoon_map <- ggplot() +
  geom_spatraster_rgb(data = lagoon_terrain) + 
  geom_sf(data = lagoon_waterways, size = 0.5, color = "royalblue1") +
  geom_sf(data = lagoon_buildings, size = 0.01, color = "darkred", alpha = .01) +
  geom_sf(data = lagoon_roads, size = 0.01, color = "coral3", alpha = .2) +
  labs(title = "Venice",
       subtitle = "Buildings, Waterways, and Roads",
       caption = "Source: BBBike") +
  theme_minimal() + 
  theme(panel.grid = element_blank(),
        axis.text = element_blank())
lagoon_map

That’s a little too zoomed out to see, let’s go in a little further:

lagoon_bbox <- st_bbox(lagoon_waterways)

# Adjust the x and y limits for zoom
xmin_zoomed <- lagoon_bbox["xmin"] + 0.01
xmax_zoomed <- lagoon_bbox["xmax"] - 0.01
ymin_zoomed <- lagoon_bbox["ymin"] + 0.01
ymax_zoomed <- lagoon_bbox["ymax"] - 0.01

lagoon_mapz <- ggplot() +
  geom_spatraster_rgb(data = lagoon_terrain) + 
  geom_sf(data = lagoon_waterways, size = 0.5, color = "royalblue1", alpha = .5) +
  geom_sf(data = lagoon_buildings, size = 0.01, color = "darkred", alpha = .01) +
  geom_sf(data = lagoon_roads, size = 0.01, color = "coral3", alpha = .2) +
  labs(title = "Venice",
       subtitle = "Buildings, Waterways, and Roads",
       caption = "Source: BBBike") +
  theme_minimal() + 
  theme(panel.grid = element_blank(),
        axis.text = element_blank()) +
  coord_sf(
    xlim = c(xmin_zoomed, xmax_zoomed),
    ylim = c(ymin_zoomed, ymax_zoomed))

lagoon_mapz

This map is pretty zoomed out from the city, but that is because we want to focus on the entire lagoon at first. If you want to mess around some more, here’s a close-up map of the city of Venice. Individual points should be easier to make out so have fun, you should be able to look back at the last few code blocks as templates for how you want to change this map:

setwd("/cloud/project/Venice_Combatting_Flooding_Data") 

city_buildings <- st_read("shape_city/buildings.shp")
Reading layer `buildings' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/buildings.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 8815 features and 3 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 12.30304 ymin: 45.4129 xmax: 12.39949 ymax: 45.46939
Geodetic CRS:  WGS 84
city_waterways <- st_read("shape_city/waterways.shp")
Reading layer `waterways' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/waterways.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 386 features and 4 fields
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 12.30101 ymin: 45.41294 xmax: 12.39939 ymax: 45.46921
Geodetic CRS:  WGS 84
city_roads <- st_read("shape_city/roads.shp")
Reading layer `roads' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/roads.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 9429 features and 7 fields
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 12.30069 ymin: 45.41292 xmax: 12.39946 ymax: 45.46363
Geodetic CRS:  WGS 84
city_places <- st_read("shape_city/places.shp")
Reading layer `places' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/places.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 4 features and 4 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: 12.33459 ymin: 45.41646 xmax: 12.39374 ymax: 45.4555
Geodetic CRS:  WGS 84
city_landuse <- st_read("shape_city/landuse.shp")
Reading layer `landuse' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/landuse.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 233 features and 3 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 12.30312 ymin: 45.41703 xmax: 12.39916 ymax: 45.46938
Geodetic CRS:  WGS 84
city_natural <- st_read("shape_city/natural.shp")
Reading layer `natural' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/natural.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 345 features and 3 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 12.30628 ymin: 45.41291 xmax: 12.39946 ymax: 45.46934
Geodetic CRS:  WGS 84
city_points <- st_read("shape_city/points.shp")
Reading layer `points' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/points.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 6337 features and 4 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: 12.30065 ymin: 45.41296 xmax: 12.39942 ymax: 45.46933
Geodetic CRS:  WGS 84
city_railways <- st_read("shape_city/railways.shp")
Reading layer `railways' from data source 
  `/cloud/project/Venice_Combatting_Flooding_Data/shape_city/railways.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 198 features and 3 fields
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 12.30064 ymin: 45.4324 xmax: 12.32112 ymax: 45.45292
Geodetic CRS:  WGS 84
city_terrain <- get_tiles(city_waterways,
                              provider = "Esri.WorldImagery")

city_bbox <- st_bbox(city_waterways)

xmin_zoomed <- city_bbox["xmin"] + 0.01
xmax_zoomed <- city_bbox["xmax"] - 0.01
ymin_zoomed <- city_bbox["ymin"] + 0.01
ymax_zoomed <- city_bbox["ymax"] - 0.01

city_map <- ggplot() +
  geom_spatraster_rgb(data = city_terrain) + 
  geom_sf(data = city_natural, size = 0.5, color = "darkgreen", alpha = .2) +
  geom_sf(data = city_landuse, size = 0.5, color = "darkolivegreen", alpha = .5) +
  geom_sf(data = city_waterways, size = 0.5, color = "royalblue1", alpha = .7) +
  geom_sf(data = city_railways, size = 0.1, color = "navy", alpha= .7) +
  geom_sf(data = city_roads, size = 0.01, color = "coral3", alpha = .5) +
  geom_sf(data = city_buildings, size = 0.01, color = "darkred", alpha = .2) +
  geom_sf(data = city_places, size = 0.5, color = "red2", alpha = .7) +
  geom_sf(data = city_points, size = 0.01, color = "goldenrod", alpha = .2) +
  labs(title = "The City of Venice",
       subtitle = "Buildings, Water, Road, and Rail ways, and Points of Interest",
       caption = "Source: BBBike") +
  theme_minimal() + 
  theme(panel.grid = element_blank(),
        axis.text = element_blank()) +
  coord_sf(
    xlim = c(xmin_zoomed, xmax_zoomed),
    ylim = c(ymin_zoomed, ymax_zoomed))

city_map

The Issue: Flooding

As I’ve said before, flooding is not a new issue for Venice. They’ve been dealing with the side effects of living on a swamp marsh since the city was first founded. The city has already taken a great deal of action to combat flooding and rising sea levels, the most effective of which is Project MOSE. Before we talk about the MOSE system let’s have a look at what flooding in Venice looked like before the implementation of the system:

setwd("/cloud/project/Venice_Combatting_Flooding_Data") 

city_tide_2002 <- read.table("city_tide/2002.txt", sep = ";", header = FALSE, stringsAsFactors = FALSE)

colnames(city_tide_2002) <- c("Date_Time", "A", "Water_Level", "Unknown")
# the data came with four columns date and time, A, water level, and 0
# A and 0 provided nothing for the data so they are being removed
city_tide_2002 <- city_tide_2002[, -c(2, 4)]
city_tide_2002$Date <- as.Date(city_tide_2002$Date_Time)
# extract the date from Date_time so that the data set is smaller

avg_tide_2002 <- aggregate(Water_Level ~ Date, data = city_tide_2002, FUN = mean)
# Calculate daily average

avg_tide_2002 <- city_tide_2002 %>%
  group_by(Date) %>%
  summarize(Average_Water_Level = mean(Water_Level, na.rm = TRUE))
head(avg_tide_2002)
# A tibble: 6 × 2
  Date       Average_Water_Level
  <date>                   <dbl>
1 2002-01-01               10.1 
2 2002-01-02                5.18
3 2002-01-03                7.07
4 2002-01-04               -4.65
5 2002-01-05               -4.22
6 2002-01-06               -4.74
ggplot(avg_tide_2002, aes(x = Date, y = Average_Water_Level)) +
  geom_line(color = "navy") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "red") +
  labs(title = "Daily Average Water Level", x = "Month", y = "Water Level (cm above ASE)") +
  theme_minimal()

Wow, water levels got pretty high that year, we’ll see if MOSE can do anything to decrease that! This data lines up with reports of when flooding tends to be at its annual high in Venice, which is from October to December every year.

MOSE stands for MOdulo Sperimentale Elletromeccanico or Electromechanical Experimental Module in English. MOSE is a system of barriers that are positioned at the three inlets of the lagoon, Lido, Malamocco, and Chioggia. The barriers are raised whenever there are high tides.

Thankfully BBBikes includes the locations of the MOSE barriers in their waterways data so let’s select their data now:

# lagoon_waterways$name
MOSE <- lagoon_waterways[lagoon_waterways$name %in% "Mose", ]

You can find a ton of information on the different parts of the city with the commented-out piece of code above. If you want to have a look through the different names of the waterways simply uncomment the text and rerun the code block.

Now that we have the data for where MOSE is. Let’s have a look at where the barriers are located:

xmin_zoomed <- lagoon_bbox["xmin"] + 0.01
xmax_zoomed <- lagoon_bbox["xmax"] - 0.01
ymin_zoomed <- lagoon_bbox["ymin"] + 0.01
ymax_zoomed <- lagoon_bbox["ymax"] - 0.01
MOSE_map <- ggplot() +
  geom_spatraster_rgb(data = lagoon_terrain) + 
  geom_sf(data = lagoon_waterways, size = 0.5, color = "royalblue1", alpha = .5) +
  geom_sf(data = lagoon_buildings, size = 0.01, color = "darkred", alpha = .01) +
  geom_sf(data = lagoon_roads, size = 0.01, color = "coral3", alpha = .2) +
  geom_sf(data = MOSE, size = 1, color = "gold") + 
  labs(title = "Venice",
       subtitle = "MOSE locations",
       caption = "Source: BBBikes") +
  theme_minimal() + 
  theme(panel.grid = element_blank(),
        axis.text = element_blank()) +
  coord_sf(
    xlim = c(xmin_zoomed, xmax_zoomed),
    ylim = c(ymin_zoomed, ymax_zoomed)
  )

# Display the zoomed map
MOSE_map

It’s a little hard to see because of how large the Venetian lagoon is but you can see four yellow lines along the perimeter of the lagoon. The southernmost barriers are located in the Cioggia inlet, in the middle is the Malamocco inlet, and the two lines in the north are the barriers at the Lido inlet.

Construction of the MOSE system began in 2003 and is expected to be completed by 2025. Already all barriers have been installed and the system was first used in October of 2020. Now that we know where the barriers are let’s have a look at whether they are doing their job:

setwd("/cloud/project/Venice_Combatting_Flooding_Data") 

city_tide_2023 <- read.table("city_tide/2023.txt", sep = ";", header = FALSE, stringsAsFactors = FALSE)

colnames(city_tide_2023) <- c("Date_Time", "A", "Water_Level", "Unknown")
# the data came with four columns date and time, A, water level, and 0
# A and 0 provided nothing for the data so they are being removed
city_tide_2023 <- city_tide_2023[, -c(2, 4)]

city_tide_2023$Date <- as.Date(city_tide_2023$Date_Time)
# extract the date from Date_time so that the data set is smaller

avg_tide_2023 <- aggregate(Water_Level ~ Date, data = city_tide_2023, FUN = mean)
# Calculate daily average

avg_tide_2023 <- city_tide_2023 %>%
  group_by(Date) %>%
  summarize(Average_Water_Level = mean(Water_Level, na.rm = TRUE))
head(avg_tide_2023)
# A tibble: 6 × 2
  Date       Average_Water_Level
  <date>                   <dbl>
1 2023-01-01                24.6
2 2023-01-02                22.8
3 2023-01-03                21.7
4 2023-01-04                17.5
5 2023-01-05                22.1
6 2023-01-06                19.9
ggplot(avg_tide_2023, aes(x = Date, y = Average_Water_Level)) +
  geom_line(color = "navy") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "red") +
  labs(title = "Daily Average Water Level", x = "Month", y = "Water Level (cm above ASE)") +
  theme_minimal()

Have a look at this graph of 2023’s water level data and compare it to the data from 2002. It may not look like MOSE is doing much of anything. Let’s take a glance at a summary of the two data sets to see if that will help:

summary(avg_tide_2002$Average_Water_Level)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 -6.878  20.311  27.318  28.198  34.824 103.459 
summary(avg_tide_2023$Average_Water_Level)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 -12.94   30.85   36.85   36.94   44.44   77.02 

It looks like in 2023 water levels in Venice were higher almost across the board, except for the minimum and maximum. This is probably because MOSE doesn’t turn until the water levels have reached 110 cm above the ASE, so hopefully the maximum was so low in 2023 because MOSE prevented higher waters from getting into the lagoon. This summary does however highlight the plight that Venice faces, the water levels in Venice are becoming higher and higher even in addition to global sea levels rising.

While the MOSE barriers have been having their success in protecting the city they still have raised concerns regarding their impact on local ecosystems. The barriers, when up, cut off the lagoon from being supplied with fresh water which has been negatively impacting the ecosystem that inhabits the lagoon. The barriers also have begun to develop their own artificial salt marshes which are very different from the ones that are already in the lagoon. There could be other ways of implementing a similar system to preserve the harmony of the Venetian ecosystem while still having the same benefits of protecting the city. Do you have any ideas for what could prevent dangerously high waters in the Venetian lagoon?

All I could think of was implanting coral into the sea around the rim of the Venetian lagoon in an attempt to buffer high tides from reaching the city or implementing a form of wind reduction at sea to break up harsh winds before they can blow high tides into the lagoon. Maybe you had a better idea? I sure hope so.

Next Steps: Wind data

As you can see MOSE has been quite effective in preventing flooding in Venice, but there’s still room for improvement. Flooding in the Venetian lagoon is caused by a mix of two things like we mentioned before, high tides and harsh winds. Let’s have a look at the wind data around the lagoon to see if there are any patterns. While we’re at it lets merge the direction data with the speed data so that we can use them together later on:

setwd("/cloud/project/Venice_Combatting_Flooding_Data") 

wind_speed_2023 <- read.table("sea_speed/2023.txt", sep = ";", header = FALSE, stringsAsFactors = FALSE)
colnames(wind_speed_2023) <- c("Date_Time", "V", "Speed", "Unknown")
wind_speed_2023 <- wind_speed_2023[, -c(2, 4)]

wind_direction_2023 <- read.table("sea_direction/2023.txt", sep = ";", header = FALSE, stringsAsFactors = FALSE)
colnames(wind_direction_2023) <- c("Date_Time", "D", "Direction", "Unknown")
wind_direction_2023 <- wind_direction_2023[, -c(2, 4)]

wind_data <- wind_speed_2023 %>%
  left_join(wind_direction_2023, by = "Date_Time")

wind_data <- wind_data %>%
  filter(!is.na(Speed) & !is.na(Direction))
# filters out any rows where speed or direction are null values

wind_data$Date_Time <- as.POSIXct(wind_data$Date_Time, format = "%Y-%m-%d %H:%M:%S")

ggplot(data = wind_data, aes(x = Date_Time, y = Speed)) +
  geom_line(color = "blue", size = 0.25) +
  labs(
    title = "Wind Speeds in 2023",
    x = "Time",
    y = "Wind Speed (m/s)"
  ) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  scale_x_datetime(date_labels = "%Y-%m-%d", date_breaks = "1 month")
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.

Kinda hard to pick out anything in that mess. This data shows the speeds of winds blowing in every direction, but we only want ones that are blowing in from the sea. Wind directional data is measured in degrees clockwise from north, so if we wanted wind coming in from sea we want a range from East to South. East would be 90 degrees and South would be 180, so we just need to look at winds that are coming from that range. Thankfully, in the last code block we already combined the wind direction and wind speed data so now we just have to trim the data:

wind_data_filtered <- wind_data %>%
  filter(Direction >= 90 & Direction <= 180)

ggplot(data = wind_data_filtered, aes(x = Date_Time, y = Speed)) +
  geom_line(color = "blue", size = 0.25) +
  labs(
    title = "Wind Speeds in 2023",
    subtitle = "Coming from South, Southeast, and East",
    x = "Time", y = "Wind Speed (m/s)") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  scale_x_datetime(date_labels = "%Y-%m-%d", date_breaks = "1 month")

That looks much better. and if you think back to when we first looked at flooding, the highest waters were in late October, which happens to be when we see our wind speeds peak. Let’s look at so slightly different water level data now. This data was taken from the Malamocco inlet.

setwd("/cloud/project/Venice_Combatting_Flooding_Data") 

malamocco_tide_2023 <- read.table("malamocco_tide/2023.txt", sep = ";", header = FALSE, stringsAsFactors = FALSE)

colnames(malamocco_tide_2023) <- c("Date_Time", "A", "Water_Level", "Unknown")
malamocco_tide_2023 <- malamocco_tide_2023[, -c(2, 4)]

malamocco_tide_2023$Date <- as.Date(malamocco_tide_2023$Date_Time)
malamocco_avg_2023 <- aggregate(Water_Level ~ Date, data = malamocco_tide_2023, FUN = mean)

malamocco_avg_2023 <- malamocco_tide_2023 %>%
  group_by(Date) %>%
  summarize(Average_Water_Level = mean(Water_Level, na.rm = TRUE))

malamocco_tide_2023$Date_Time <- as.POSIXct(malamocco_tide_2023$Date_Time, format = "%Y-%m-%d %H:%M:%S")

ggplot(malamocco_avg_2023, aes(x = Date, y = Average_Water_Level)) +
  geom_line(color = "navy") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "red") +
  labs(title = "Daily Average Water Level", x = "Month", y = "Water Level (cm above ASE)") +
  theme_minimal()

Now take a look at those two diagrams. Look like there’s any correlation there? Lets see if we can actual get mathematical evidence of that correlation:

correllation_test <- malamocco_tide_2023 %>%
  left_join(wind_data_filtered, by = "Date_Time")

wind_data <- wind_data %>%
  filter(!is.na(Speed) & !is.na(Direction))

# Perform correlation test
correlation_result <- cor.test(correllation_test$Speed, correllation_test$Water_Level)

print(correlation_result)

    Pearson's product-moment correlation

data:  correllation_test$Speed and correllation_test$Water_Level
t = 35.414, df = 21401, p-value < 2.2e-16
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 0.2225895 0.2479009
sample estimates:
      cor 
0.2352851 

Wow, That’s pretty cool! There isn’t that significant of a correlation of nearly 25% positive correlation on a 95% confidence interval is pretty cool to see. Even though that correlation is low, decreasing harsh winds could help reduce flood risk in Venice, and it could be a worthwhile lead to chase for Venice’s future.

Overall sea levels are still a prominent issue for the city of Venice, but with MOSE set to complete its construction in 2025 the amount of dangerous flooding should be drastically reduced from eras in the past. There may be other ways of dealing with the issues that Venice faces: flooding, generally high water levels, sinking foundations, and harsh winds; but MOSE is doing a good job at what it was meant for and hopefully, those better solutions can be implemented sooner rather than later.

THE END, Thanks for reading!

Sources: These may overlap, I included everything I had open on the topic to make sure I didn’t miss anything.

“BBBike Extracts OpenStreetMap (OSM, Garmin, Shapefile Etc..).” BBBike extracts OpenStreetMap (OSM, Garmin, Shapefile etc.). Accessed December 18, 2024. https://extract.bbbike.org/.

Coulling, Ian. “The Venetian Lagoon and Its Ecosystem.” Images of Venice, September 2, 2024. https://imagesofvenice.com/the-venetian-lagoon-and-its-ecosystem-2/#:~:text=The%20lagoon%20is%20the%20largest,tidal%20shallows%20and%20salt%20marshes.

“Dati.” ISPRA Servizio Laguna di Venezia - Rete meteo-mareografica. Accessed December 18, 2024. https://www.venezia.isprambiente.it/rete-meteo-mareografica.

D’Alpaos, L., R. Mel, and L. Carniello. “Addressing the Effect of the MO.S.E. Barriers Closure on Wind Setup within the Venice Lagoon.” Estuarine, Coastal and Shelf Science, June 11, 2019. https://www.sciencedirect.com/science/article/abs/pii/S0272771419300836?casa_token=_91rGHAZQg4AAAAA%3AZ5Qlmd9YdcEmZpcJSHQR1HYD2__ClO2WswHX0F9T6upUYkGqM5DcDe5l9czVYR-mfFrAwq5wiVQ.

Iovenko, Chris. “Science Saved Venice from Drowning. Could It Work Anywhere Else?” Atmos, July 9, 2024. https://atmos.earth/science-saved-venice-from-drowning-could-it-work-anywhere-else/#:~:text=Less%20than%20a%20year%20later,and%20critics%20were%20largely%20silenced.

Moraca, Sara. “Venice’s Flood Barriers Are Working Overtime. How Will They Change the Lagoon?” Nature News, April 7, 2024. https://www.nature.com/articles/d43978-024-00062-x.

“Possible Futures: The ‘Green Spaces’ Project.” We Are Here Venice. Accessed December 18, 2024. https://www.weareherevenice.org/possible-futures-the-green-spaces-project/.

“Project.” MOSE Venezia. Accessed December 19, 2024. https://www.mosevenezia.eu/project/?lang=en.

Songer, Tristan, Cameron Stuart, Josie Noone, Cecilia Bailey, and Admin. “Mose: The Future of Venice.” Engineering Rome, September 26, 2022. https://engineeringrome.org/mose-the-future-of-venice/.

Spears, Tim. “Mose Flood Barrier Protects Venice - See How It Works.” designboom, December 7, 2020. https://www.designboom.com/architecture/mose-flood-barrier-venice-storm-alex-10-05-2020/.

Towers, Phil. “Why Venice Is Sinking and When the Italian City Could Be Underwater.” The Sun, July 2, 2024. https://www.thesun.co.uk/travel/28312276/venice-sinking-when-underwater-why/.

Venezia Autentica | Discover and Support the Authentic Venice. “How Was Venice Built: An Engineering Marvel.” Venezia Autentica | Discover and Support the Authentic Venice, October 16, 2023. https://veneziaautentica.com/how-was-venice-built/.

“Venice Maps.” Search Results: All Fields similar to “Venice” - David Rumsey Historical Map Collection. Accessed December 19, 2024. https://www.davidrumsey.com/luna/servlet/view/search?showAll=when&q=venice.

Weiss, Matt J. “Venice Flood Barrier Blossoms into Coral Reef.” DivePhotoGuide, April 2, 2008. https://www.divephotoguide.com/underwater-photography-scuba-ocean-news/venice_flood_barrier_blossoms_into_coral_reef.