<a href='https://www.bsc.es/es'><img src='https://www.cmb.cat/wp-content/uploads/2014/01/BSC-Logo.jpg' align="right" height="190" width="190" /></a>

# Short-term effect of temperature and rainfall on the incidence of West Nile Neuroinvasive Disease in Europe: a multi-country case-crossover analysis


[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) 

<!-- badges: end -->

Data and R code to support Moirano et al., (2025). Short-term effect of temperature and rainfall on the incidence of West Nile Neuroinvasive Disease in Europe: a multi-country case-crossover analysis. *Lancet Regional Health Europe*

## Authors

Giovenale Moirano, PhD ([ORCID](https://orcid.org/0000-0002-0009-5770))\
Chloe Fletcher, MSc\
Jan C. Semenza, PhD ([ORCID](https://orcid.org/0000-0002-4625-874X))\
Rachel Lowe, PhD ([ORCID](https://orcid.org/0000-0003-3939-7343))

Contact information: [giovenale.moirano@bsc.es](giovenale.moirano@bsc.es)

Date of creation: 18 June 2024

## Description

This repository includes the code and data to reproduce the analysis of 'Short-term effect of temperature and rainfall on the incidence of West Nile Neuroinvasive Disease in Europe: a multi-country case-crossover analysis'.

The repository is divided as follows:

1. Data
2. Functions
3. Scripts
4. Shapefiles 

### Detailed Description

1. Data folder contains:
    -  Two dataset including aggregated cases of West Nile Neuroinvasive Disease across Europe to reproduce Figure 1 of the manuscript:
        - "1.monthly_cases.csv",
        - "2.cumulative_cases.csv",
    - A simulated dataset of West Nile Neuroinvasive Disease cases across 4 regions: 
        - "3.data_sim.csv",
    - Two dataset of daily temperature and precipitation for the 4 regions:
        - "4.temperatures.csv",
        - "5.precipitation.csv",
    - A dataset containing weekly average temperatures and weekly cumulative precipitation for the 4 regions:
        - "6.weekly_prep_temp.csv",
    - The case crossover dataset obtained from the simulated data:
        - "7.case_cross_data.csv".

2. Functions folder contains:
    - "tssc_sampling.R" function to create a case crossover dataset starting from a linelist of cases,
    - "attrdl.R" function to compute attributable fraction of cases  from distributed lag nonlinear models.

3. Scripts folder contains:
    - "0.descriptive_cases.R" code to produce Figure 1 of the manuscript,
    - "1.from_cases_to_case_crossover.R" code to create the Case Crossover dataset starting from the simulated dataset, 
    - "2.exp_res_health_impact.R" code to reprodue Fig 2,3,4, 
    - "3.two_stage_country_specific.R" code to reproduce Table 1. 

**Note that Scripts 1,2,3 are applied to a simplified simulated dataset and results will slightly differ from the ones presented in the manuscript.

4. Shapefiles folder contains:
    - "Europe_pop" NUTS3 level shapefile of Europe with population data to reproduce Fig.1. 
