Make beautiful world maps in RStudio | R programming

Описание к видео Make beautiful world maps in RStudio | R programming

Get the code here: https://felixanalytix.com

Newsletter: https://felixanalytix.substack.com
Twitter:   / felixanalytix  
Instagram:   / felixanalytix  

00:00 How to Make World Maps
00:20 Install R packages
01:12 Download World Data
01:41 Plot Empty World Map
02:11 Change Map Projection
04:07 Data Wrangling using the Tidyverse
06:05 Add Country Iso3 Code
07:33 Plot a World Map using ggplot2
09:15 Add Text Labels to World Map
10:54 Plot Multiple World Maps using ggplot2
12:12 Final Remarks

In this video I show you how to create world maps and customize them by changing the map projection, adding texts and the colours and even make multiple world maps based on your data using R and RStudio. First we get world data from the Natural Earth R package. We use the sf R package to change the map projection from the proj.org project, i.e. the Robinson and Winkel Trimple world projections. Then we use dplyr and the tidyverse R package to make data wrangling, using the countrycode R package to get Iso code for the country names. This allows us to join the world data with our own dataset. Finally, we plot a world visualization using the ggplot2 R package and customize the color of the countries and the texts. I show how to add country text labels in the world visualization with ggplot2. Finally, using facet_wrap from ggplot2 we create multiple world maps visualizations of the same data to make data exploratory analysis.

Комментарии

Информация по комментариям в разработке