5 Upload Data
This guide details how to upload data into the cd2030 app, ensuring compatibility with the Countdown Health Facility Data (HFD) Format.
5.1 Understanding the Upload Process
The Upload Data module allows you to:
- Upload health facility data structured according to the Countdown HFD Format.
- Validate the uploaded file for format and data integrity.
- Prepare the data for analysis within the app.
5.2 Supported File Formats
The app supports the following file types:
- Excel Files (
.xls,.xlsx): Primarily for raw or minimally processed data. - Stata Files (
.dta): Processed and formatted data adhering to the HFD standard. - R Data Files (
.rds): For pre-processed data, settings, or cached data.
5.3 Uploading Your File
Once your data is prepared:
- Navigate to the Load Data section in the app’s sidebar.
- Drag and Drop: Drag your file into the designated upload area.
- Browse: Alternatively, click Browse to select the file from your computer.
The app will automatically validate the uploaded file.
- Successful Upload: A confirmation message will appear: “Upload successful: Your file is ready for analysis.”
- Upload Errors: If errors are detected, an error message will be displayed. See the “Troubleshooting Uploads” section below.
5.4 Troubleshooting Uploads
The following table lists common upload errors and their solutions:
| Error Message | Cause | Solution |
|---|---|---|
| “Unsupported file format” | File type not supported. | Save your file as .xls, .xlsx, .dta, or .rds. .dta is the recommended format. |
| “The following required columns are missing from the data: [column names]” | Missing essential columns in the data. | Add the missing column(s) to your dataset and ensure their values are valid. Refer to the HFD Guidelines for required columns. |
| “The following sheets are missing: [sheet names]” (Primarily for Excel files) | Missing one or more required sheets in the Excel file. | Ensure all required sheets are present and conform to the template. If working with .dta or .rds files, this error should not occur. |
| “Sheet [Sheet Name] is empty” (Primarily for Excel files) | The sheet exists but contains no data. | Populate the sheet with valid data or remove the empty sheet. If working with .dta or .rds files, this error should not occur. |
| “Key Columns ‘[column names]’ missing in [Sheet Name]” (Primarily for Excel files) | A key column (district, year, or month) is missing from the specified sheet. |
Add the missing column(s) to the sheet and ensure the data is structured correctly. If working with .dta or .rds files, this error should not occur. |
“Column name ‘[column name]’ must not be duplicated. Use .name_repair to specify repair.” |
Duplicate column names in the dataset. | Ensure all column names are unique. Rename or remove duplicate columns. |
| “Non-numeric values found in numeric column ‘[column name]’. These values have been coerced to NA.” | A numeric column contains non-numeric data. | Check the specified column for non-numeric values (e.g., text, special characters). Correct these values or convert them to missing values (NA) before uploading. |
5.5 Data Validation within the App
The app performs the following validation checks during the upload process:
- File Format Check: Confirms the file is in a supported format.
- Sheet Presence Check (Excel only): Verifies that all required sheets are present.
- Column Presence and Uniqueness Check: Ensures all required columns are present and unique.
- Data Availability Check: Checks that required sheets/data are not empty and key columns are populated.
- Data Type Validation: Checks that numeric columns contain valid numeric values. Non-numeric values will be coerced to NA.
5.6 How Errors Are Handled
- If validation fails, the upload process stops, and an informative error message is displayed.
- Consult the “Troubleshooting Uploads” section for solutions to common errors.