f-franco / covid-19-municipalities-of-hope

A geographic analysis to visualize a COVID-19 policy in Mexico by using ggplot2 with R to build a cartogram.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COVID-19: Visualizing the municipalities of hope in Mexico

By summer 2020, the federal government in Mexico presented a program that would lead the re-opening of the economy, "municipios de la esperanza" (municipalities of hope).

This map is similar to the one shown by Mexico's federal government during the presentation of this policy.

Although the map does a good work to show the geographic extension of the chosen municipalities, it does little to reflect the amount of people that would benefit. This notebook shows the execution process of building a visualization with which better evaluate the extent of this program in Mexico with respect to the population. There are two main parts to this process, data transformation and cartogram plotting.

Data Transformation

It was necessary to build a table that contained the names of all municipalities in Mexico, along with its population and whether they were part of the program or not.

Cartogram Plotting

To properly plot the data in a way that was useful to appreciate the impact of the program, certain parameters were changed with respect to the scaling of the polygons and their color.

Result

Each colored polygon represents a municipality. The color of each polygon indicates whether the municipality was classified as "municipio de la esperanza" (purple) or not (yellow). The size of each polygon is proportional to the population of each municipality, and the original borders are included for easier viewing.

To see a more detailed look at the building process, you can visit my post in Medium.

About

A geographic analysis to visualize a COVID-19 policy in Mexico by using ggplot2 with R to build a cartogram.


Languages

Language:R 100.0%