# data4health   <img src='man/figures/harmonize_banner_nobg.png' align="right" width="30%" alt="Harmonize logo" /> <img src='man/figures/BSC_logo.png' align="right" width="20%" alt="BSC logo"/>



<div align="justify">

<!-- badges: start -->

[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) 
[![GitHub
contributors](https://img.shields.io/github/contributors/harmonize-tools/data4health)](https://github.com/harmonize-tools/data4health/graphs/contributors)
![commits](https://badgen.net/github/commits/harmonize-tools/data4health/main) 



<!-- badges: end -->

## Overview
<a href='https://www.harmonize-tools.org/'><img src="man/figures/data4health_logo.png" align="right" hspace="10" vspace="0" width="16%" alt="data4health logo"/></a>
<p style="font-family: Arial, sans-serif; font-size: 14px;">

*data4health* is a tool developed as part of the HARMONIZE project to facilitate the cleaning, filtering, and aggregation of health data at customised spatiotemporal resolutions. Originally designed for data from Brazil, Colombia, the Dominican Republic, and Peru, the tool is  adaptable for any linelist health data.

<img src="man/figures/flowchart.svg" alt = "data4health flowchart" width="100%">

The R package offers two modes of operation based on the user's coding experience:

<ul>

<li>For users with <b>coding experience</b>: A wide range of functions can be directly used within R.</li>

<li>For <b>non-coding users</b>: A graphical user interface (GUI) guides users through the data processing pipeline in an intuitive, user-friendly way.</li>

</ul>

Key features of the R Package:

<ul>

<li>Instructions on how to access health data</li>

<li>Functions for cleaning and preprocessing health data</li>

<li>Spatial harmonisation, allowing aggregation to any coarser administrative unit</li>

<li>Temporal harmonisation, enabling aggregation to epidemiological weeks, months or years</li>

<li>Data visualization capabilities</li>

<li>Output as a .csv file, formatted to meet user-specified requirements</li>

</ul>

</p>


## Installation

The latest version of the data4health package is hosted on
CRAN and can by installed using the following commands:

``` r
install.packages("data4health")
library(data4health)
```


## How to use it

There are two main functionalities of data4health. 

For **code-experienced users**, a series of functions to support health data analysis are provided that users can implement to simplify their existing data pipeline. An overview over how to make use of them can be found in the Overview vignette.

Users with **less code experience** can employ the graphic user interface to clean and aggregate their data in a user-friendly way by typing the following command and waiting for the a browser window to open:

``` r 
d4h_ui()
```


## Roadmap:

Future functionalities of data4health include:

* d4h_clean_helper function: gives suggestions about how to best clean the data, e.g. proposes misspelled categories, which columns to transform, etc.
* report function: allows the user to produce interactive/static reports of the aggregated health data

If you have any needs, or suggestions for new functions or new functionalities of current functions, please do not hesitate to create an issue. See CONTRIBUTING.md for details on how to contribute or get in touch.

## Resources

#### Package website

The [data4health website](https://bsc-es.github.io/GHRtools/docs/data4health/data4health.html) includes detailed guides for each function, example workflows using reported disease cases and instructions on how to access health data.

#### Project website

[HARMONIZE](https://www.harmonize-tools.org/) is an international consortium co-creating cost-effective and reproducible digital tools for stakeholders in hotspots affected by a changing climate in Latin America & the Caribbean (LAC), including cities, small islands, highlands, and the Amazon rainforest.

The HARMONIZE digital toolkits will allow local researchers and users, including national disease control programs, to link, interrogate and use multi-scale spatiotemporal data, to understand the links between environmental change and infectious disease risk in their local context, and to build robust early warning and response systems in low-resource settings.

The project offers resources and [tools](https://harmonize-tools.github.io/) developed in conjunction with different teams from Brazil, Colombia, Dominican Republic, Peru and Spain.

#### Other HARMONIZE tools

Within HARMONIZE, each data category has its own digital toolkit to allow local researchers and users, to prepare, interrogate and eventually merge the data spatially and temporally, to understand the links between environmental change and infectious disease risk in their local context, and to build robust early warning and response systems in low-resource settings. The other HARMONIZE toolkits include:

<ul>
  <li><a href="https://github.com/harmonize-tools/clim4health">clim4health</a></li>
  <li><a href="https://github.com/harmonize-tools/socio4health">socio4health</a></li>
  <li><a href="https://github.com/harmonize-tools/land4health">land4health</a></li>
  <li><a href="https://github.com/harmonize-tools/drone4health">drone4health</a></li>
  <li><a href="https://github.com/Harmonize-Brazil/cube4health">cube4health</a></li>
</ul>


## Organizations

<table>
  <tr>
    <td>
      <a href="https://www.bsc.es/">
        <img src="https://imgs.search.brave.com/t_FUOTCQZmDh3ddbVSX1LgHYq4mzCxvVA8U_YHywMTc/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9zb21t/YS5lcy93cC1jb250/ZW50L3VwbG9hZHMv/MjAyMi8wNC9CU0Mt/Ymx1ZS1zbWFsbC5q/cGc" alt="BSC logo" width="120"/>
      </a>
    </td>
    <td>
      <strong>GHR</strong><br>
      Global Health Resilience
    </td>
  </tr>
</table>

## Developers


**[Daniela Lührsen](https://www.bsc.es/luhrsen-daniela-sofie)**
<a href="https://orcid.org/0009-0002-6340-5964" style="margin-left: 15px;"><img src="https://orcid.org/sites/default/files/images/orcid_16x16.png" alt="ORCID" style="width: 16px; height: 16px;" /></a>\
Barcelona Supercomputing Center (BSC), Spain

**[Raquel Martins Lana, PhD](https://www.bsc.es/martins-lana-raquel)**
<a href="https://orcid.org/0000-0002-7573-1364" style="margin-left: 15px;"><img src="https://orcid.org/sites/default/files/images/orcid_16x16.png" alt="ORCID" style="width: 16px; height: 16px;" /></a>\
Barcelona Supercomputing Center (BSC), Spain

**[Carles Milà, PhD](https://www.bsc.es/mila-garcia-carles)**
<a href="https://orcid.org/0000-0003-0470-0760" style="margin-left: 15px;"><img src="https://orcid.org/sites/default/files/images/orcid_16x16.png" alt="ORCID" style="width: 16px; height: 16px;" /></a>\
Barcelona Supercomputing Center (BSC), Spain

**[Rachel Lowe, PhD](https://www.bsc.es/lowe-rachel)**
<a href="https://orcid.org/0000-0003-3939-7343" style="margin-left: 15px;"><img src="https://orcid.org/sites/default/files/images/orcid_16x16.png" alt="ORCID" style="width: 16px; height: 16px;" /></a>\
Barcelona Supercomputing Center (BSC), Spain \
Catalan Institution for Research and Advanced Studies (ICREA), Spain


</div>
