SUPPLEMENTARY ANALYSIS CODE
===========================
"Geographic Concentration of Malaria Burden in Indonesia:
A Provincial Spatial Analysis of Elimination Progress and Programme
Indicators, 2020-2024"

CONTENTS
--------
analysis_code.py       Full analysis pipeline (see module docstring for
                        section-by-section description matching the
                        manuscript's Methods and Results subsections).
panel_data.csv          The harmonized 34-province x 5-year (2020-2024)
                        panel dataset (170 rows), exported from the
                        "Panel Data (34-province)" sheet of the
                        accompanying supplementary data workbook.
provinces_34.geojson    34-province boundary geometry (pre-2022 boundary
                        scheme) used to build spatial weights and maps.
                        Source: GADM (Database of Global Administrative
                        Areas), version 4.1, Indonesia level-1 (province)
                        layer, https://gadm.org/download_country.html,
                        accessed 5 September 2026. Downloaded as a
                        shapefile (gadm41_IDN_1.shp + companion files)
                        and converted to GeoJSON with a single 'geoname'
                        property per feature; the 'Bangka Belitung'
                        province name was changed to 'Bangka-Belitung'
                        and 'DI Yogyakarta'/'DKI Jakarta' in the panel
                        dataset map to GADM's 'Yogyakarta'/'Jakarta Raya'
                        via the NAME_MAP dictionary in analysis_code.py.
                        GADM v4.1's Indonesia level-1 layer already uses
                        the pre-2022 (34-province) boundary scheme, so no
                        post-split dissolving of the six Papua-region
                        provinces was needed for this file.

HOW TO RUN
----------
Requires Python 3.10+ and the packages listed in the analysis_code.py
docstring (pandas, numpy, scipy, statsmodels, geopandas, libpysal, esda,
pyproj, matplotlib). Install with:

    pip install pandas numpy scipy statsmodels geopandas libpysal esda pyproj matplotlib

Then, from this directory:

    python3 analysis_code.py

This prints every statistical result reported in the manuscript (Tables
3-7 and the LISA, log(1+API), province fixed-effects, mixed-effects, and
priority-weighting sensitivity checks) to the console, in the order the
corresponding Methods subsections appear in the manuscript.

REPRODUCIBILITY NOTE
---------------------
All point estimates (Moran's I values, regression coefficients, priority
ranks) are fully deterministic given the input data. Only the
permutation-based p-values for Moran's I and LISA depend on a random
seed; a fixed seed (42) is set immediately before every such calculation,
so the exact p-values reported in the manuscript are reproduced exactly
by this script.

Note on the mixed-effects sensitivity model (Methods, item 6b): this
model uses API calculated at full precision directly from cases and
population, not the two-decimal-place rounded API column used for
descriptive reporting elsewhere in this script and workbook. Using the
rounded column instead would create 10 province-years that display as
API = 0.00 without truly being zero (no province-year in this dataset
has zero confirmed cases), which would incorrectly appear to require an
additive-constant workaround before taking a logarithm.

This script was verified, immediately before manuscript submission, to
reproduce every numeric result reported in the manuscript's Abstract,
Results, and Tables 3 through 7 exactly.
