This repository contains the data analised to study the diffusion of PPR in 3 States of Nigeria ( Bauchi , Kano, Plateau) and the main R-functions developed to analyse the data , simulate the diffusion of PPR and identify senmkdirtinel nodes in the optics of improving surveillance system. The material produced consitutes the object of some publciations , few of them still in course of submission. In particular:
A descriptive analysis of livestock mobility data using differnt appraoches of data collection "Combining market surveys and participative approaches to map small ruminant mobility in three selected states in northern Nigeria" to be submitted
A simulation work to identify possible nodes for surveillance network as shwon in the proceeding of the conference Complex Network XXIII a copy of which can be found in the folder Papers
An extend version of the previous work to study the possibility of using backbone nodes as possible sentinel nodes. A preprint of the work is available at preprint submitted as invited paper to Plos Complex Systems
All the activities related to this project (data collection, analysis ,simulation) are part of the Lidiski Project
Background
In sub-Saharan Africa, livestock mobility is essential to one of the pillars of the production and trade of livestock and, in turn, is one of the primary sources of income for livestock owners. Due to a lack of infrastructure and storage facilities (like slaughterhouses , fridge cells and warehouses , high speed road and adapted trucks ) , live animals are sold at the nearest local market and then moved through the commercial chain toward larger metropolitan areas for consumption
Better knowledge of mobility patterns could help identify areas to control to monitor spread, assess the occurrence of outbreaks, and identify possible areas/markets to survey for surveillance purposes . However the monitoring and control of TADs is complicated by the permeability of Nigerian borders, the absence of livestock identification and tracking systems, and of a centralized systems for TADs.
Focusing on small ruminant, mobility data were collected using 2 complementary approaches : market survey and Focus Group Discussion. We conducted a market survey using semi-structured questionnaires from 1065 market traders and 20 separate Focus group discussions with traders and transhumance in 10 Local Government Areas (LGAs) in the three Northern States namely: Plateau, Bauchi and Kano. The respondent movements by type, animal movement, reason for movement was described and summarized. Data collected were used to reconstruct small ruminant mobility networks, whose nodes were LGAs, in the 3 states of the survey area and with other State in Nigeria and movement mapped.
Features
The scripts provided in this repository allow to
Provide a preliminary descriptive analysis of the data collected and the network analysis
Simulate the diffusion of a PPR like disease using a stochatic SI network model
Identify cluster of nodes that could have similar epidemic potential
Identify sentinel nodes and characteristics using Random Forest
Content of the repository
The repository contains 4 folders:
Papers containing published articles
1_Data containing:
FGDdata.xlsx, an excel file containg the list of movements collected during FGD. Each line corresponds to a declared movement. Administrative Unit of origin and destination are provided together with GPS coordinates. Information about Importance of the movement and type of FGD are provided too
Marketdata.xlsx, an excel file containg the list of movements collected during market survey. Each line corresponds to a declared movement. Administrative Unit of origin and destination are provided together with GPS coordinates. The number of animals transported as well species and transportation mean are provided. Information of the market (locations and coordinates) id of the survey as well as characteristics of the respondents are provided
data_used_for_plosone_article.csv an extraction from the market data containing only the district id for origin and destination of the movement together with the weight of each link , used for SI simulator. The data is provided in 3 columns : Column Origine containing the id for the node of origine of the movement; Destiantion containing the id of the destiantion node; weight an integer number corresponding to the number of animals excahnged
2_Scripts containing 3 sub folders:
Descriptive: containg the R script NetworkAnalysis.R for the descriptive analysis of the datasets FGDdata.xlsx and Marketdata.xlsx. The script provide some of basic statistics for the type of data present int eh files, Furthermore it transform the data in network and develop network analysis for centrality and global measures, communtiy detection and resilience of the network either separately , eitehr combining the 2 in asingle network. Results are saved in the folder 3_Outputs/Descriptive
SI_model, a series of R scripts and R Markdowns to simulate the diffusion of PPR and identify sentinel nodes together with the characteristics. These scripts were used for the proceeding and the invited article
1_Script_SI_seed_AA.R , containing the script for simulating an SI model on the network. The scripts need a networke , either weigthed or unweighted, a probability of transmission, an integer value indicating the duration of the simulation, and another integer number indicating the number of simulations. Results are saved in the folder 3_Outputs/SI_Model
2_Script_Seed_clustering.Rmd, Markdown for identifyding cluster of seeds ( first node infected) based on their epidemic activity. Results are saved in the folder 3_Outputs/SI_Model
3_Script_Vulnerability.Rmd, Markdown for estimating for each node its vulnerability and calssify as possible sentinel candidate. Results are saved in the folder 3_Outputs/SI_Model
4_Script_RF_Charcteristcs_SentinelNode.Rmd, Markdown for Random Forest methods to select characteristic of sentinel nodes. Results are saved in the folder 3_Outputs/SI_Mode
Description of the functions
In the following we provide a description of the main functions used in the differnt folders
Description of NetworkAnalysis 2_Scripts/Descriptive
Description of 1_Script_SI_seed_AA.R in 2_Scripts/SI_Model
The set of the function present in the scripts allow to simulate the diffusion of a PPR like disease over a network , store the results ,and identify possible tranmission paths ( called trees). The core function is SI_function .
SI_function.R
This function runs a single scenario for simulation . Given a direct network , a probability of transmission and a list of infected and susceptible nodes , at each time of the simulation the code selects each susceptible node in the Destination, check if there are infected neighbors (Origins) and if so update the status of the node using the cumulative probability.
Input
The parameters of the function are:
net : a network ( weighted or not) in the form of a dataframe containing the columns Origine, Destination and if available weight. The first two columns could be strings , while weight should be integer number
tmax : Integer number indicating the length of the simulation
S_vec : a vector containing the id of the nodes that are susceptibles
I_vec : a vector containing the infected nodes
trans_prob : the probability that infection can be transmitted
WEIGHT: a binary variable (Yes , No) to switch between weighted and unweighted networK
SI_seed_AA
The function SI_seed_AA runs all the simulations , given a network , a list of possible seeds and a list of possible transmission porbabilities.As an output a list of 2 dataframes is provided . One containing all the infection in all simulations , the other containing all the transmission trees
Input
net : a network ( weighted or not) in the form of a dataframe containing the columns Origine, Destination and if available weight.The first two columns could be strings , while weight should be integer number
nsimulations: Integer number corresponding to the number of simulations
tmax : Integer number indicating the length of the simulation
trans_probs : a vector of transmission probabilities (real number between 0 and 1
Output
a list containing 2 dataframes
df_infect: dataframe containing all the simulations results
time: time at which destination has been infected
Infec : Id Node infected
ite: iteration number
trans_prob: transmission probability used for the simulation
Seed: seed used for the simulation
df_tree : dataframe containing all the trees estimated
Destination : Infected node
Origine : Possible Infector
weight : weight of the link between the 2 (if available)
time_infectious: time at which infectious has been infected. If 0 is a seed
time_infected: time at which destination has been infected
interval : difference between the 2 Should be positive
ite: iteration number
trans_prob: transmission probability used for the simulation
Seed: seed used for the simulation