In the first part of the exploratory analysis on the Landslides dataset we reorganized the dataset in order to get ready to analyzing in deep some questions.

In this second part of the project, the main focus is to exploit the data through visualizations, so here we are checking the location of landslides on a map in order to facilitate the analysis.

Map indicating the geographical location

We can see the distribution of the events, and we conclude that it is a phenomenon that affects almost all countries.

However, some countries and regions are more affected than others.

﻿﻿﻿﻿﻿﻿﻿﻿﻿

Step by step on how to embed a leaflet map in wordpress

Map indicating the quantity per country

Through the map above we see the geographical location of the events, and while it is possible to zoom in and see the location of the events, it is difficult to gauge how affected a country is with respect to others.

That is why it is interesting to use another view, through a choropleth map we can show the distribution of an event by geographical regions where each of the areas that make up the same (in our case the countries that suffered a landslide), will appear colored with greater or lesser intensity.

﻿﻿﻿﻿﻿﻿﻿﻿



Technical implementation

Map indicating the geographical points

The inclusion of the geographic points within a map, is direct and simple, out-of-the-box, only required to have in a dataset the complete list of the points to be located, with latitude and longitude, and then use the option marketClusterOptions.

b <- leaflet(df) %>% addTiles() %>% addMarkers(~longitude, ~latitude, clusterOptions = markerClusterOptions()) b %>% addProviderTiles(providers$CartoDB.Positron)

Map indicating the distribution by region – choropleth map

Considering the distribution of our variable landslides, with a greater concentration of values in certain ranges, I decided to establish a greater number of bins so that the most affected countries can be differentiated from the least.

m <- leaflet(data = mundo) %>% addPolygons(fillColor = ~pal(n), fillOpacity = 0.9, color = "white", weight = 1, popup = casecountpopup) %>% addLegend(position = "bottomleft",pal = pal, values = ~n, title = "Landslide 2007-2016") %>% setView(lat = 38.0110306, lng = -110.4080342, zoom = 3) m %>% addProviderTiles(providers$CartoDB.Positron)

The complete code can be found in my Github account.

Sources

Kirschbaum, D. B., Adler, R., Hong, Y., Hill, S., & Lerner-Lam, A. (2010). A global landslide catalog for hazard applications: method, results, and limitations. Natural Hazards, 52(3), 561–575. doi:10.1007/s11069-009-9401-4. [1] Kirschbaum, D.B., T. Stanley, Y. Zhou (In press, 2015). Spatial and Temporal Analysis of a Global Landslide Catalog. Geomorphology. doi:10.1016/j.geomorph.2015.03.016. [2]