Predicting the spread of Covid-19 using networks in R

Predicting the spread of Covid-19 using networks in R

We will be focusing on geographic networks, where the nodes are places, and the edges link two places if they neighbour each other. Ultimately we will try and use such a network to predict Covid cases in one area based on Covid cases in neighbouring areas.

Like all infectious diseases, Covid-19 transmission happens on a very local level. It does not just jump randomly around the world, it has to pass from person to person, and these people will have to travel to a new place to spread the virus there. It is for this reason that networks have often been used to help model the spread of diseases, whether it’s by using a social network to model the spread of the disease between people, or geographic networks to help us predict outbreaks based on what’s going on in neighbouring places.

In this blog series, we will be focusing on geographic networks, where the nodes are places, and the edges link two places if they neighbour each other. Ultimately we will try and use such a network to predict Covid cases in one area based on Covid cases in neighbouring areas.

The accuracy of this approach will be limited as it does not take account of epidemiological factors (such as herd immunity and social distancing) or other ways areas are linked (such as trains). However, this blog series still provides a helpful guide for visualising networks and using them to create features for predictive analysis. It also shows that network analysis can be a helpful piece of a larger Covid model.

In the UK, the smallest areas of geography that Covid cases are published on are called Middle Layer Super Output Areas (MSOAs) so we will focus on these. You can see this data in an interactive map here, and download it here.

In this first part, we will create some visualisations to motivate why such an approach might work, then we will create the network seen in the above image. We will showcase code as we go along, and also, all of the code can be found on github.

These are all the packages that were used to create the visualisations shown in this post.

## Set up ----
## Load packages
library(dplyr)
library(readr) ## Loading the data
library(tidyr)
library(sf) ## For the maps 
library(sp) ## Transform coordinates 
library(ggplot2)
library(viridis)
library(gganimate) ## For the animated map
## Network packages
library(igraph) ## build network
library(spdep) ## builds network
library(tidygraph)
library(ggraph) ## for plotting networks

predictions covid19 r data-science network

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Data Cleaning in R for Data Science

A data scientist/analyst in the making needs to format and clean data before being able to perform any kind of exploratory data analysis.

50 Data Science Jobs That Opened Just Last Week

Data Science and Analytics market evolves to adapt to the constantly changing economic and business environments. Our latest survey report suggests that as the overall Data Science and Analytics market evolves to adapt to the constantly changing economic and business environments, data scientists and AI practitioners should be aware of the skills and tools that the broader community is working on. A good grip in these skills will further help data science enthusiasts to get the best jobs that various industries in their data science functions are offering.

Data Science Course in Dallas

Become a data analysis expert using the R programming language in this [data science](https://360digitmg.com/usa/data-science-using-python-and-r-programming-in-dallas "data science") certification training in Dallas, TX. You will master data...

Applications Of Data Science On 3D Imagery Data

The agenda of the talk included an introduction to 3D data, its applications and case studies, 3D data alignment and more.

Data Science Tools Illustrated Study Guides

These data science tools illustrated guides are broken up into four distinct categories: data retrieval, data manipulation, data visualization, and engineering tips. Both online and PDF versions of these guides are available.