Bathing waters status - Europe (Shiny app)

S. Klayn
2021-07-04

Idea and data

Every year, EU countries conduct bathing water monitoring for microbiological pollution, and report their status.

Data are available from the EEA -> location, name and status of designated bathing waters for each country.

Shiny app idea: show the bathing waters for a user-selected country and year on an interactive map, and colour according to their status.

Map tab

Bathing water status in Cyprus, 2008

Bathing waters in the selected country are displayed in the map tab, and are coloured according to their status in the selected year.

The map is built with leaflet and fully interactive.

Note: The image on the left is a static snapshot, because the presentation format doesn't easily allow embedding leaflet maps.

Summary tab

The summary table tab shows the number and % bathing waters with a status for the selected country and year.

bw.data %>% 
    filter(country_name == "Cyprus") %>%
    filter(year == 2008) %>% 
    ## summarize - number and % of bathing waters with a given status each year
    group_by(status) %>% 
    summarize(bw_nb = n()) %>% 
    mutate(bw_percent = (bw_nb/sum(bw_nb))*100)
# A tibble: 2 x 3
  status     bw_nb bw_percent
  <ord>      <int>      <dbl>
1 excellent    107      98.2 
2 sufficient     2       1.83

Shiny app

The app is deployed on RStudio's shiny server.

Here's a screenshot:
Bathing waters app interface