2024-06-18

Project overview

This is a simple overview of the earthquakes in the selected countries in europe. The project use the following libraries:

  • leaflet
  • tidyverse
  • shiny

List of supported countries: United Kingdom, France, Bulgaria, Italy, Spain, Portugal, Balkans Nw, Switzerland, Slovakia, Germany, Romania, Hungary, Norway, Belgium, Poland, Slovenia and Czech Republic.

Dataset

The sample of the data that was used in app.

d2 <- read.csv("eu.csv")
d2[5:10,]
##     X Latitude Longitude  COUNTRY    CITY Mag Deaths       Date
## 5   5     43.4      28.5 Bulgaria Balchik 7.2      4 1901-03-31
## 6   6     38.1      13.4    Italy Palermo  NA     NA 1903-05-13
## 7   7     44.3      10.0    Italy       N  NA     NA 1903-07-28
## 8   8     41.8      23.2 Bulgaria  Struma 7.5     NA 1904-04-04
## 9   9     41.8      23.2 Bulgaria  Struma 7.8     NA 1904-04-04
## 10 10     42.1      13.9    Italy Central  NA     NA 1905-08-26

Server

The R server main calculation

d2 %>% dplyr::filter(COUNTRY %in% (input$select_id) & 
                       Date > input$daterange1[1] & 
                       Date < input$daterange1[2] ) %>%
        dplyr::mutate(popup_text = eq_create_label(.)) %>% 
  eq_map("popup_text")

Where

  • input$select_id - is a checkbox selector
  • input$daterange1 - is a datarange item

Screenshot

This is a screenshot of the actual app.

{width=50%, height = 50%}

Documentation

There are two main elements that one can manipulate:

  • the date
  • country list

You can select the specific time frame and countries that you want to investigate. On the right side there will be a interactive map that will show you where exactly the event occurs: - the date, - magnitude - number of deaths.

Below the map you can see a simple summary.