Home / Works / Field Template Generator

Field Template Generator

Python Tool
131 Templates · 1 Run Python · pandas · sqlite3

Overview

Generated 131 location-specific mobile data-collection templates (SW Maps) across 14 provinces in one run. Copies a master template per row of a CSV config, renames its layers and pre-sets province, municipality and barangay dropdowns, replacing hand-editing each template in the app.

How it works

The CSV config enters at three steps of a per-row loop.

CSV config(one row per template) Master template Read templatelayer names Per CSV row: copy thetemplate to a new file Rename data layerand its field links Set dropdown choices(province, municipality...) One template per row,filed by province

InputStepDecision / optionData storeOutput

Details

About the code

Built for my department. The code stays with the company, so this page describes the tool only.