An R package providing utility functions and reference data for working with health information systems databases, particularly DHIS2 (District Health Information System 2) data from Uganda.
ramptools simplifies working with versioned health data by providing:
- Database utilities for managing and querying versioned SQLite databases
- Period handling for DHIS2 temporal data formats (weekly/monthly)
- Reference datasets for Uganda's administrative geography and health indicators
- Data transformation utilities for working with health information data
get_latest_version()- Retrieve the most recent data version from a databaseget_version_metadata()- Access metadata for specific data versionsget_data()- Query versioned data with filtering by ID variables and versionget_db_diff()- Identify new or changed data compared to existing database recordsget_id_vars()/get_value_var()- Discover database schema information
get_period_range()- Generate sequences of DHIS2-formatted periods (weekly/monthly)make_week_map()- Create mappings between ISO weeks and datesmake_month_map()- Create mappings between months and dates
get_output_dir()- Create versioned output directories with standardized naming (YYYY_MM_DD.VV)get_latest_output_date_index()- Find the latest version index for a given date
make_human_readable()- Merge human-readable location and indicator names onto raw DHIS2 data
The package includes reference data for Uganda:
uga_district_shp- District-level shapefilesuga_subcounty_shp- Subcounty-level shapefilesuga_region_shp- Region-level shapefilesuga_water_shp- Water body shapefiles
loc_table- Location hierarchy with administrative unitsdistrict_pop- Population data by districtindicator_table- DHIS2 indicator definitions and metadataage_sex_table- Age-sex stratification reference data
# Install from source
devtools::install_github("yourusername/ramptools")- data.table
- DBI
- RSQLite
- dplyr
This package is designed for teams working with:
- DHIS2 health information systems data
- Versioned data workflows requiring audit trails
- Uganda health and geographic data analysis
- Time series analysis of health indicators
MIT License