output: html_notebook
Introduction
The COVID-19 pandemic has become one of the most significant global health crises of the 21st century, affecting millions of people across the world. Understanding the spatial distribution and spread of this disease is essential for effective planning, response, and prevention. Geographic Information System, commonly known as GIS, plays a vital role in visualizing disease patterns by using maps and spatial data. In this presentation, we use GIS-based mapping techniques to analyze the spread, impact, and severity of COVID-19 at global and national levels. Our study highlights the first detection and death locations, the most affected countries and continents, and the division-wise situation in Bangladesh. Through interactive maps and visual analysis, this presentation aims to provide a clear understanding of how COVID-19 spread geographically and how preventive measures helped reduce its impact.
Presented By
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.6
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.1 ✔ tibble 3.3.1
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.2
## ✔ purrr 1.2.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(sf)
## Linking to GEOS 3.13.1, GDAL 3.11.4, PROJ 9.7.0; sf_use_s2() is TRUE
library(rnaturalearth)
library(lubridate)
library(viridis)
## Loading required package: viridisLite
covid_data <- read.csv("C:/Users/DFIT/Desktop/WHO-COVID-19-global-daily-data.csv")
world <- ne_countries(scale = "medium", returnclass = "sf")
library(tidyverse)
library(sf)
library(rnaturalearth)
library(lubridate)
library(viridis)
covid <- read.csv("C:/Users/DFIT/Desktop/WHO-COVID-19-global-daily-data.csv")
covid$Date_reported <- as.Date(covid$Date_reported)
library(leaflet)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>% # English labels
addCircleMarkers(
lng = 114.3055, # Wuhan longitude
lat = 30.5928, # Wuhan latitude
radius = 10,
color = "red",
fillOpacity = 0.9,
popup = paste0(
"<b>First COVID-19 Detection</b><br>",
"Location: Wuhan, China<br>",
"Date: December 2019"
)
)
1.This is a Point GIS map showing where and when COVID-19 was first detected.11 The first known COVID-19 case was identified in Wuhan, China, in December 2019. The red point marks the exact location of the first detection. A point map is used because this event occurred at a specific place and time.
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>% # English labels
addCircleMarkers(
lng = 114.3055, # Longitude of Wuhan
lat = 30.5928, # Latitude of Wuhan
radius = 10,
color = "black",
fillOpacity = 0.9,
popup = paste0(
"<b>First COVID-19 Death</b><br>",
"Location: Wuhan, China<br>",
"Date: January 2020"
)
)
2.This Point GIS map shows the location of the first COVID-19 death. The first reported COVID-19 death occurred in Wuhan, China, in January 2020. The black point represents the place of the first death. Point mapping is appropriate here because it highlights a single historical event.
# Load libraries
library(leaflet)
library(sf)
library(dplyr)
library(rnaturalearth)
# Create dataset (given values)
cases_data <- data.frame(
Country = c("United States of America", "India", "France", "Germany", "Brazil"),
confirmed_cases = c(
111820082,
45035393,
40138560,
38828995,
38743918
)
)
# World map
world <- ne_countries(scale = "medium", returnclass = "sf")
# Join data
world_cases <- world %>%
left_join(cases_data, by = c("name" = "Country"))
# Color palette
pal <- colorNumeric(
palette = c("yellow", "orange", "red", "darkred"),
domain = world_cases$confirmed_cases,
na.color = "#e0e0e0"
)
# Interactive choropleth map
leaflet(world_cases) %>%
addProviderTiles("CartoDB.Positron") %>% # English labels
addPolygons(
fillColor = ~pal(confirmed_cases),
fillOpacity = 0.85,
color = "white",
weight = 0.4,
popup = ~paste0(
"<b>Country:</b> ", name,
"<br><b>Confirmed Cases:</b> ",
ifelse(
is.na(confirmed_cases),
"Data not shown",
formatC(confirmed_cases, format = "d", big.mark = ",")
)
)
) %>%
addLegend(
position = "bottomright",
pal = pal,
values = ~confirmed_cases,
title = "Confirmed COVID-19 Cases"
)
3.The United States has the highest confirmed COVID-19 cases globally, followed by India, France, Germany, and Brazil.
United States – ≈ 111,820,082 confirmed cases (most in the world) India – ≈ 45,035,393 confirmed cases France – ≈ 40,138,560 confirmed cases Germany – ≈ 38,828,995 confirmed cases Brazil – ≈ 38,743,918
# Load libraries
library(ggplot2)
library(dplyr)
# Create dataset
covid_cases <- data.frame(
Country = c("United States", "India", "France", "Germany", "Brazil"),
Confirmed_Cases = c(
111820082,
45035393,
40138560,
38828995,
38743918
)
)
# Create final picture-style bar chart
ggplot(covid_cases,
aes(x = reorder(Country, Confirmed_Cases),
y = Confirmed_Cases)) +
geom_col(fill = "darkred", width = 0.7) +
coord_flip() +
labs(
title = "Top 5 Countries by Confirmed COVID-19 Cases",
subtitle = "United States has the highest number of cases worldwide",
x = "Country",
y = "Confirmed Cases"
) +
theme_minimal(base_size = 14)
4.This bar chart shows the top five countries by confirmed COVID-19 cases. The United States has the highest number of cases, followed by India, France, Germany, and Brazil.
# Load libraries
library(dplyr)
library(leaflet)
library(sf)
library(rnaturalearth)
# Load WHO dataset
covid <- read.csv("C:/Users/DFIT/Desktop/WHO-COVID-19-global-daily-data.csv")
# Country-wise total deaths
country_deaths <- covid %>%
group_by(Country) %>%
summarise(
total_deaths = sum(New_deaths, na.rm = TRUE),
.groups = "drop"
)
# Select Top 5 death countries
top5_deaths <- country_deaths %>%
arrange(desc(total_deaths)) %>%
slice(1:5)
# World map
world <- ne_countries(scale = "medium", returnclass = "sf")
# Join ONLY top 5 with world map
world_top5 <- world %>%
left_join(top5_deaths, by = c("name" = "Country"))
# Color palette (Top 5 only)
pal <- colorNumeric(
palette = c("orange", "red", "darkred"),
domain = world_top5$total_deaths,
na.color = "#e0e0e0"
)
# Interactive map
leaflet(world_top5) %>%
addProviderTiles("CartoDB.Positron") %>% # English labels
addPolygons(
fillColor = ~pal(total_deaths),
fillOpacity = 0.85,
color = "white",
weight = 0.4,
popup = ~paste0(
"<b>Country:</b> ", name,
"<br><b>Total COVID-19 Deaths:</b> ",
ifelse(
is.na(total_deaths),
"Not in Top 5",
formatC(total_deaths, format = "d", big.mark = ",")
)
)
) %>%
addLegend(
position = "bottomright",
pal = pal,
values = ~total_deaths,
title = "Top 5 COVID-19 Deaths (WHO Dataset)",
labFormat = labelFormat(big.mark = ",")
)
6.This choropleth map highlights the top five countries with the highest COVID-19 deaths. Darker red colors indicate higher numbers of deaths. All other countries are shown in light grey for comparison.
# Load libraries
library(dplyr)
library(ggplot2)
# Load WHO dataset
covid <- read.csv("C:/Users/DFIT/Desktop/WHO-COVID-19-global-daily-data.csv")
# Country-wise total deaths
country_deaths <- covid %>%
group_by(Country) %>%
summarise(
total_deaths = sum(New_deaths, na.rm = TRUE),
.groups = "drop"
)
# Top 5 death countries
top5_deaths <- country_deaths %>%
arrange(desc(total_deaths)) %>%
slice(1:5) %>%
mutate(
label = paste0(
Country, "\n",
formatC(total_deaths, format = "d", big.mark = ","),
" deaths"
)
)
# Pie chart with labels + density color
ggplot(top5_deaths,
aes(x = "", y = total_deaths, fill = total_deaths)) +
geom_col(width = 1, color = "white") +
coord_polar(theta = "y") +
geom_text(
aes(label = label),
position = position_stack(vjust = 0.5),
size = 4,
color = "black"
) +
scale_fill_gradient(
low = "yellow",
high = "darkred",
name = "Death Density"
) +
labs(
title = "Top 5 Countries by COVID-19 Deaths",
subtitle = "Color intensity represents death density"
) +
theme_void() +
theme(
plot.title = element_text(size = 16, face = "bold"),
plot.subtitle = element_text(size = 12)
)
# Load library
library(leaflet)
# Create Bangladesh-focused map
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
# Zoom to Bangladesh
setView(lng = 90.4125, lat = 23.8103, zoom = 7) %>%
# Red point for first COVID detection
addCircleMarkers(
lng = 90.4125, # Dhaka longitude
lat = 23.8103, # Dhaka latitude
radius = 10,
color = "red",
fillOpacity = 0.9,
popup = paste0(
"<b>First COVID-19 Case in Bangladesh</b><br>",
"Location: Dhaka<br>",
"Date: 8 March 2020"
)
)
This map shows where COVID-19 was first identified in Bangladesh. The first confirmed COVID-19 cases were reported in Dhaka on 8 March 2020. The red marker highlights the exact location where the virus was initially detected. This visualization helps us understand the starting point of the COVID-19 outbreak in Bangladesh.
library(leaflet)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
# Focus on Bangladesh
setView(lng = 90.4125, lat = 23.8103, zoom = 7) %>%
# First COVID death location
addCircleMarkers(
lng = 90.4125, # Dhaka
lat = 23.8103,
radius = 30,
color = "black",
fillOpacity = 0.9,
popup = paste0(
"<b>First COVID-19 Death in Bangladesh</b><br>",
"Location: Dhaka<br>",
"Date: 18 March 2020"
)
)
This map shows the location of the first reported COVID-19 death in Bangladesh. The first death was recorded in Dhaka on 18 March 2020. The highlighted location indicates where the first fatal case occurred. This helps us understand the early impact of COVID-19 in Bangladesh.
install.packages("rnaturalearthhires", repos = "https://ropensci.r-universe.dev")
## Installing package into 'C:/Users/DFIT/AppData/Local/R/win-library/4.5'
## (as 'lib' is unspecified)
## package 'rnaturalearthhires' successfully unpacked and MD5 sums checked
##
## The downloaded binary packages are in
## C:\Users\DFIT\AppData\Local\Temp\RtmpOOy3b9\downloaded_packages
# Load libraries
library(leaflet)
library(sf)
library(dplyr)
library(rnaturalearth)
library(rnaturalearthdata)
##
## Attaching package: 'rnaturalearthdata'
## The following object is masked from 'package:rnaturalearth':
##
## countries110
# Bangladesh division-wise COVID-19 deaths (example aggregated data)
bd_deaths <- data.frame(
division = c(
"Dhaka", "Chattogram", "Khulna", "Rajshahi",
"Rangpur", "Sylhet", "Barisal", "Mymensingh"
),
deaths = c(
9500, 5200, 3100, 2700,
1800, 1600, 1200, 900
)
)
# Get Bangladesh administrative divisions (level 1)
bd_divisions <- ne_states(
country = "Bangladesh",
returnclass = "sf"
)
# Join deaths data with division map
bd_map <- bd_divisions %>%
left_join(bd_deaths, by = c("name" = "division"))
# Color palette (death density)
pal <- colorNumeric(
palette = c("yellow", "orange", "red", "darkred"),
domain = bd_map$deaths,
na.color = "#f0f0f0"
)
# Interactive choropleth map
leaflet(bd_map) %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(
fillColor = ~pal(deaths),
fillOpacity = 0.85,
color = "white",
weight = 0.6,
popup = ~paste0(
"<b>Division:</b> ", name,
"<br><b>Total COVID-19 Deaths:</b> ",
ifelse(is.na(deaths), "Data not available",
formatC(deaths, format = "d", big.mark = ","))
)
) %>%
addLegend(
position = "bottomright",
pal = pal,
values = ~deaths,
title = "COVID-19 Deaths by Division",
labFormat = labelFormat(big.mark = ",")
)
This map shows how COVID-19 deaths are distributed across different divisions of Bangladesh. Areas with darker red color indicate a higher number of deaths, while lighter colors represent lower numbers. Dhaka division experienced the highest number of COVID-19 deaths compared to other divisions. The map helps to understand the regional differences in the impact of COVID-19 within Bangladesh.
# Load libraries
library(ggplot2)
library(dplyr)
# Bangladesh division-wise COVID-19 deaths (same data as map)
bd_deaths <- data.frame(
Division = c(
"Dhaka", "Chattogram", "Khulna", "Rajshahi",
"Rangpur", "Sylhet", "Barisal", "Mymensingh"
),
Deaths = c(
9500, 5200, 3100, 2700,
1800, 1600, 1200, 900
)
)
# Create labels
bd_deaths <- bd_deaths %>%
mutate(
label = paste0(
Division, "\n",
formatC(Deaths, format = "d", big.mark = ","),
" deaths"
)
)
# Pie chart with death density colors
ggplot(bd_deaths, aes(x = "", y = Deaths, fill = Deaths)) +
geom_col(width = 1, color = "white") +
coord_polar(theta = "y") +
geom_text(
aes(label = label),
position = position_stack(vjust = 0.3),
size = 2.8,
color = "black"
) +
scale_fill_gradient(
low = "yellow",
high = "red",
name = "Death Rate"
) +
labs(
title = "Division-wise COVID-19 Death Rate in Bangladesh",
subtitle = "Darker color indicates higher death rate"
) +
theme_void() +
theme(
plot.title = element_text(size = 16, face = "bold"),
plot.subtitle = element_text(size = 12)
)
This chart shows the distribution of COVID-19 deaths across different
divisions of Bangladesh. Each segment represents a division, along with
the total number of deaths. Darker red colors indicate higher death
rates, while lighter colors represent lower rates. Dhaka division
accounts for the highest proportion of COVID-19 deaths in
Bangladesh.
library(leaflet)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
# Center Bangladesh
setView(lng = 90.4125, lat = 23.8103, zoom = 7) %>%
# Dhaka – highest prevention focus
addCircleMarkers(
lng = 90.4125, lat = 23.8103,
radius = 14,
color = "darkred",
fillOpacity = 0.9,
popup = "<b>Dhaka</b><br>Highest prevention focus<br>Lockdown, vaccination, awareness"
) %>%
# Chattogram – medium-high focus
addCircleMarkers(
lng = 91.7832, lat = 22.3569,
radius = 11,
color = "red",
fillOpacity = 0.9,
popup = "<b>Chattogram</b><br>Strong prevention measures"
) %>%
# Other cities – moderate focus
addCircleMarkers(
lng = 91.8807, lat = 24.8949,
radius = 9,
color = "orange",
fillOpacity = 0.9,
popup = "<b>Sylhet</b><br>Prevention & awareness programs"
) %>%
addCircleMarkers(
lng = 88.6089, lat = 24.3745,
radius = 9,
color = "orange",
fillOpacity = 0.9,
popup = "<b>Rajshahi</b><br>Preventive monitoring"
) %>%
addCircleMarkers(
lng = 89.5672, lat = 22.8456,
radius = 9,
color = "yellow",
fillOpacity = 0.9,
popup = "<b>Khulna</b><br>Public health prevention focus"
)
This map highlights major areas in Bangladesh where COVID-19 prevention efforts were strongly focused. Dhaka received the highest level of preventive attention due to high population density and infection risk. Other major cities also implemented measures such as lockdowns, vaccination programs, and public awareness campaigns. These preventive strategies played an important role in controlling the spread of COVID-19 in Bangladesh.
Conclusion
This study used GIS-based maps to analyze the spatial and temporal patterns of COVID-19 at global and national levels. The analysis showed that COVID-19 first emerged in Wuhan, China, and later spread rapidly across different continents. Countries like the United States experienced the highest number of confirmed cases and deaths. In Bangladesh, Dhaka was identified as the most affected area, recording the earliest cases and the highest number of deaths. Division-wise analysis revealed clear regional differences in the impact of the pandemic. Finally, preventive measures such as lockdowns, vaccination programs, and public awareness played a crucial role in reducing the spread of COVID-19. Overall, GIS mapping proved to be an effective tool for understanding, monitoring, and managing the COVID-19 pandemic.