{"type":"script","doc_desc":{"producers":[{"name":"Reproducibility WBG","abbr":"DECDI","affiliation":"World Bank - Development Impact Department","role":"Verification and preparation of metadata"}],"prod_date":"2026-09-24","version":"1"},"project_desc":{"authoring_entity":[{"name":"Sydney Gourlay","affiliation":"World Bank","email":"sgourlay@worldbank.org"},{"name":"Karan S. Shakya","affiliation":"Kenyon College","email":"shakya1@kenyon.edu"},{"name":"Leah E. M. Bevis","affiliation":"The Ohio State University","email":"bevis.16@osu.edu"}],"title_statement":{"title":"Reproducibility package for Scanning For Soil Health: Assessing The Accuracy And Scalability Of Innovations For In-Situ Soil Measurement","idno":"RR_UGA_2026_753"},"data_statement":"Some data is restricted and has not been included in the reproducibility package. For more details, please refer to the README file. Intermediate data is included in the reproducibility package and can be used to fully reproduce the results in the paper","software":[{"name":"R","version":"4.5.1"},{"name":"Stata","version":"19.0 MP"}],"scripts":[{"title":"Reproducibility package for Scanning For Soil Health: Assessing The Accuracy And Scalability Of Innovations For In-Situ Soil Measurement","date":"2026-09","notes":"Computational reproducibility verified by Development Impact (DECDI) Analytics team, World Bank.","instructions":"See README in reproducibility package.","file_name":"RR_UGA_2026_753","zip_package":"RR_UGA_2026_753.zip","dependencies":"R dependencies are listed in the file renv.lock. Stata dependencies are listed in the ado folder."}],"repository_uri":[{"name":"Reproducible Research Repository (World Bank)","uri":"https:\/\/reproducibility.worldbank.org"}],"production_date":"2026-09-24","abstract":"Cost-effective and scalable soil testing tools can play an instrumental role in guiding agricultural decisions and policies, particularly in Sub-Saharan Africa, where declining soil fertility poses a serious threat to productivity. Laboratory tests of soil samples, which provide the most accurate measures of soil properties, remain costly and challenging to scale in the context of national surveys or programs. To test and validate alternative approaches to soil measurement, the World Bank launched the Uganda CLASS study. This paper evaluates the accuracy and scalability of three soil testing tools (the AgroCares Scanner, the Palintest kit, and the Sonkir pH meter) as well as two publicly available soil maps (iSDA and SoilGrids), against laboratory-based soil measurements conducted by CIFOR-ICRAF. While differences in soil parameter estimates may be expected to vary across testing methods, understanding the nature and magnitude of the divergence in estimates from those measured using established laboratory approaches is critical for practitioners and analysts seeking to leverage soil analyses to inform policy and program design. We find that the soil tools \u2013 except for the Sonkir pH meter, which performs poorly \u2013 provide only moderately adequate predictions of soil properties, and that both soil maps fail to capture sample variation. These findings highlight key trade-offs in accuracy, cost, and scalability, and offer practical guidance for scaling soil monitoring strategies in Uganda and similar contexts.","geographic_units":[{"name":"Uganda","code":"UGA"}],"keywords":[{"name":"Soil Fertility"},{"name":"Soil Tests"},{"name":"Spectroscopy"},{"name":"Soil Maps"},{"name":"Uganda"}],"output":[{"type":"Working Paper","description":"Policy Research Working Paper (PRWP)","title":"Scanning For Soil Health: Assessing The Accuracy And Scalability Of Innovations For In-Situ Soil Measurement"}],"language":[{"name":"English","code":"EN"}],"technology_requirements":"Run time: ~15 minutes","disclaimer":"The materials in the reproducibility packages are distributed as they were prepared by the staff of the International Bank for Reconstruction and Development\/The World Bank. The findings, interpretations, and conclusions expressed in this event do not necessarily reflect the views of the World Bank, the Executive Directors of the World Bank, or the governments they represent. The World Bank does not guarantee the accuracy of the materials included in the reproducibility package.","license":[{"name":"MIT License","uri":"https:\/\/opensource.org\/license\/mit"},{"name":"World Bank IGO Rider","uri":"https:\/\/github.com\/worldbank\/metadata-editor\/blob\/main\/WB-IGO-RIDER.md"}],"contacts":[{"name":"Sydney Gourlay","affiliation":"World Bank","email":"sgourlay@worldbank.org"},{"name":"Reproducibility WBG","affiliation":"World Bank","email":"reproducibility@worldbank.org"}],"reproduction_instructions":"To reproduce the findings in this paper, a replicator must:\n1. **Run the Package:** Open the R project \"Replication.Rproj\" and restore the environment by running renv::restore(). Run `0_packages.R` and then set the working directory on line 6 of `3-analysis.R` to your local path and run the script. \n\n**Note**: The reproducibility package begins with intermediate data as some of the raw data is restricted. Reviewers virtually verified the construction of this intermediate data from the raw data. Some of the raw data is  forthcoming on the World Bank Microdata Library following an embargo period.\n","technology_environment":"Paper exhibits were reproduced on a computer with the following specifications:\n\u2022 OS: Windows 11 Enterprise\n\u2022 Processor: INTEL(R) XEON(R) PLATINUM 8562Y+ 2.80 GHz (2 processors)\n\u2022 Memory available: 32.0 GB","datasets":[{"name":"Uganda Climate, Land Area, and Soil Study (CLASS)","citation":"World Bank. 2024. \"Uganda Climate, Land Area, and Soil Study (CLASS)\" [dataset]. Forthcoming at https:\/\/microdata.worldbank.org\/.","note":"Raw input files (excluding confidential GPS coordinates) are forthcoming in the World Bank Microdata Library following an embargo period. Intermediate datasets (soil-complete_merge.dta, self-ranked.dta) are included in the reproducibility package.","access_type":"Data is forthcoming in the World Bank Microdata Library. ","uri":"Forthcoming at https:\/\/microdata.worldbank.org\/"},{"name":"SoilGrids 2.0 product","citation":"ISRIC - World Soil Information. \"SoilGrids 2.0 product\" [dataset]. https:\/\/soilgrids.org\/. Accessed March 2025. ","access_type":"Data is publicly available and included in the reproducibility package in a processed form. ","uri":"https:\/\/soilgrids.org\/","license_uri":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/","license":"Creative Commons Attribution 4.0 (CC BY 4.0)","note":"Filename: soil-complete_merge.dta. The authors extracted values for relevant variables from the SoilGrids 2.0 product based on the plot-level coordinates captured in the Uganda CLASS study. Given the confidentiality of the GPS coordinates in the Uganda CLASS study, these extracted variables are included in the reproducibility package rather than including the coordinates directly. The extracted variables are included in the soil-complete_merge.dta data file, with the suffix \u201c_soilgrid\u201d. Additional citation: Poggio, L., L.M. de Sousa, N.H. Batjes, G.B.M. Heuvelink, B. Kempen, E. Ribeiro, and D. Rossiter. 2021. \u201cSoilGrids 2.0: producing soil information for the globe with quantified spatial uncertainty.\u201d SOIL 7:217\u2013240."},{"name":"iSDAsoil","citation":"Innovative Solutions for Decision Agriculture (iSDA). \"iSDAsoil\" [dataset]. https:\/\/www.isda-africa.com\/isdasoil\/. Accessed May 2025.","uri":"https:\/\/www.isda-africa.com\/isdasoil\/","note":"Filename: soil-complete_merge.dta. The authors extracted values for relevant variables from the SoilGrids 2.0 product based on the plot-level coordinates captured in the Uganda CLASS study. Given the confidentiality of the GPS coordinates in the Uganda CLASS study, these extracted variables are included in the reproducibility package rather than including the coordinates directly. The extracted variables are included in the soil-complete_merge.dta data file, with the suffix \u201c_isda\u201d.","license":"Creative Commons Attribution 4.0 (CC BY 4.0)","license_uri":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/","access_type":"Data is publicly available and included in the reproducibility package in a processed form. "},{"uri":"https:\/\/data.humdata.org\/dataset\/cod-ab-uga","note":"Filename: uga_admbnda_adm2_ubos_20200824.shp.  ","access_type":"Data is publicly available and included in the reproducibility package.","citation":"Uganda Bureau of Statistics with support from WHO. 2020. \"Uganda - Subnational Administrative Boundaries, Admin Level 2 (Districts)\n\" [dataset]. https:\/\/data.humdata.org\/dataset\/cod-ab-uga. Accessed April 2025. ","name":"Uganda - Subnational Administrative Boundaries, Admin Level 2 (Districts)","license":"Creative Commons Attribution for Intergovernmental Organisations (CC BY-IGO)","license_uri":"https:\/\/creativecommons.org\/licenses\/by\/3.0\/igo\/"},{"note":"Filename: Uganda_lakes_rivers2005.shp.","access_type":"Data is publicly available and included in the reproducibility package.","citation":"Uganda Bureau of Statistics. 2012. \"Lakes and Rivers: Uganda, 2005-2006\" [dataset]. https:\/\/earthworks.stanford.edu\/catalog\/stanford-fh022bz4757. Accessed April 2025. ","uri":"https:\/\/earthworks.stanford.edu\/catalog\/stanford-fh022bz4757","name":"Lakes and Rivers: Uganda, 2005-2006","license":"Stanford Digital Repository Access Conditions","license_uri":"https:\/\/purl.stanford.edu\/fh022bz4757"}]},"datacite":{"creators":[{"givenName":"Sydney","familyName":"Gourlay","nameType":"Personal","affiliation":[{"name":"World Bank","affiliationIdentifier":"https:\/\/ror.org\/00ae7jd04","affiliationIdentifierScheme":"ROR","schemeUri":"https:\/\/ror.org"}]},{"givenName":"Karan S.","familyName":"Shakya","nameType":"Personal","affiliation":[{"name":"Kenyon College","affiliationIdentifier":"https:\/\/ror.org\/04ckqgs57","affiliationIdentifierScheme":"ROR","schemeUri":"https:\/\/ror.org"}]},{"givenName":"Leah E. M.","familyName":"Bevis","nameType":"Personal","affiliation":[{"name":"The Ohio State University","affiliationIdentifier":"https:\/\/ror.org\/00rs6vg23","affiliationIdentifierScheme":"ROR","schemeUri":"https:\/\/ror.org"}]}],"titles":[{"lang":"en","title":"Reproducibility package for Scanning For Soil Health: Assessing The Accuracy And Scalability Of Innovations For In-Situ Soil Measurement"},{"title":"RR_UGA_2026_753","titleType":"Other"}],"publisher":"World Bank","publicationYear":"2026","types":{"resourceType":"Reproducibility package","resourceTypeGeneral":"Other"},"url":"https:\/\/reproducibility.worldbank.org\/index.php\/catalog\/study\/RR_UGA_2026_753","language":"en"},"tags":[{"tag":"DOI"},{"tag":"Open Code"},{"tag":"Restricted Data"}],"schematype":"script"}