# Analysis setup

How to set up the analysis: the facility data workbook from HMIS/DHIS2 and the checks it must pass, the household survey files, the global reference estimates, and the national survey parameters, and how they are loaded.

The analysis setup prepares the data inputs of the analysis: the country's health facility data (by month, district and
indicator, from *DHIS2* (District Health Information Software 2, the software most countries use as their health management information system (HMIS); health facilities' monthly reports are entered in it, and the facility data workbook is exported from it.)), the *household survey* (A national survey, such as a DHS or MICS, that measures coverage by interviewing a sample of households. Its coverage figures are used as a benchmark for the facility data.) results,
the global estimates of population and other indicators, and the national survey parameters. Once loaded and checked,
they form the master facility crude data set on which every later step works.

It is the first step of the analysis. The next step is the [Data quality assessment](https://datasuite.damurka.com/en/methodology/data-quality.md).

> **Note**
>
> **At a glance**
> - **Answers:** what data, reference datasets and national parameters does the analysis need, and how are they loaded?
> - **Uses:** the Excel workbook generated from *HMIS* (Health management information system: the national system that collects routine data from health facilities, such as their monthly service reports. In most countries it runs on DHIS2.)/DHIS2 exports (see the [DHIS2 data indicator definitions](https://datasuite.damurka.com/en/methodology/indicator-definitions.md)), the optional survey files and shapefile, the embedded reference datasets, and the national survey parameters.
> - **Produces:** a working folder with the companion `.rds` file, the reference datasets matched to the country, and the national parameters used in the [data quality assessment](https://datasuite.damurka.com/en/methodology/data-quality.md) and for [denominator selection](https://datasuite.damurka.com/en/methodology/denominators.md).
> - **In the apps:** [Getting started](https://datasuite.damurka.com/en/apps/countdown/getting-started.md) (the **Load Data** wizard).

## Why

Routinely reported health facility data are an important data source for health indicators at facility and population
level. Household surveys, mostly DHS or MICS, are the primary source of population-based coverage statistics, which can
be disaggregated by socioeconomic characteristics, place of residence, subnational area, age and gender. Global
estimates of population and immunization coverage complete them. Both kinds of data are critical and need to be
considered in conjunction with each other, so all of them are loaded, checked and matched to the same country and
regions before the analysis starts.

## What the setup covers

| Part | The question it answers |
| --- | --- |
| [Country input facility data set](https://datasuite.damurka.com/en/methodology/analysis-setup/facility-data.md) | Which file holds the facility data, and how is it loaded? |
| [Checks on the uploaded data](https://datasuite.damurka.com/en/methodology/analysis-setup/data-checks.md) | Is the workbook complete and consistent enough to be analysed? |
| [Household survey results](https://datasuite.damurka.com/en/methodology/analysis-setup/survey-files.md) | Which survey files (and maps) can be added, and how are their regions matched? |
| [Global estimates](https://datasuite.damurka.com/en/methodology/analysis-setup/reference-datasets.md) | Which reference datasets come with the app, and how are they matched to the country? |
| [National survey parameters](https://datasuite.damurka.com/en/methodology/analysis-setup/survey-parameters.md) | Which national survey values and rates does the analysis need? |

## How the parts fit together

The facility data workbook is required; everything else is matched to it. The workbook must first pass the blocking
checks. The survey files and a custom shapefile are optional, but their region names must then be matched to the
workbook's. The global estimates are chosen automatically from the workbook's country. The national survey parameters
are always required: they are pre-filled from the national survey file when one is uploaded, and must be checked.

## Doing it in the app

### 1. Prepare a working folder

Create a dedicated folder and put the Excel workbook in it: see [Working folder](https://datasuite.damurka.com/en/methodology/analysis-setup/facility-data.md#working-folder).

### 2. Load the data

Open the app on the workbook (see [Getting started](https://datasuite.damurka.com/en/apps/countdown/getting-started.md)). The **Upload Data** step shows the loaded file and lets you replace the built-in reference data.

### 3. Pass the checks

The **Data Quality** step runs the [checks on the uploaded data](https://datasuite.damurka.com/en/methodology/analysis-setup/data-checks.md). Fix any blocking problem in the workbook and load it again.

### 4. Add the survey files and the shapefile (optional)

Upload the [survey files](https://datasuite.damurka.com/en/methodology/analysis-setup/survey-files.md) and, if needed, a custom shapefile; then match their region names in **Map Survey** and **Map Shapefile**.

### 5. Confirm the national rates

On **National Rates**, check every [national survey parameter](https://datasuite.damurka.com/en/methodology/analysis-setup/survey-parameters.md).

### 6. Finish loading

Press **Finish Loading Data**. The app saves the dataset and shows **Ready for analysis**.

## Points to consider

- Are all the years and districts you want to analyse in the workbook?
- Are the national survey parameters from the most recent national survey, and validated?
- Do the survey and shapefile region names match the dataset's?

## Common pitfalls

- Loading a changed workbook while its saved `.rds` copy is still in the folder: the app opens the saved copy instead. Delete the copy to load the workbook afresh.
- Accepting the pre-filled national parameters without checking them: they feed the expected ratios of the data quality assessment and the denominators.
- Mixing several countries or export batches in one working folder.

## See also

- [Getting started](https://datasuite.damurka.com/en/apps/countdown/getting-started.md): the Load Data wizard in the app, screen by screen
- [DHIS2 data indicator definitions](https://datasuite.damurka.com/en/methodology/indicator-definitions.md)
- [Denominator assessment and selection](https://datasuite.damurka.com/en/methodology/denominators.md), where the national parameters are used
- Glossary: *Household survey* (A national survey, such as a DHS or MICS, that measures coverage by interviewing a sample of households. Its coverage figures are used as a benchmark for the facility data.), *DHIS2* (District Health Information Software 2, the software most countries use as their health management information system (HMIS); health facilities' monthly reports are entered in it, and the facility data workbook is exported from it.), *Shapefile* (A set of map files (.shp, .dbf, .shx, .prj) holding the boundaries of a country's regions, used to draw maps. A standard one is built into the app for each country.), *WUENIC* (WHO and UNICEF estimates of national immunization coverage, produced each year with countries from all data sources; compared with the coverage estimated from facility data.)
- Previous: [Framework overview: end-to-end workflow](https://datasuite.damurka.com/en/methodology.md#end-to-end-workflow) · Next step: [Data quality assessment](https://datasuite.damurka.com/en/methodology/data-quality.md)
