$ show zengin-code/source-data
This repository is the canonical source data for the ZenginCode ecosystem, providing a curated, machine-readable dataset of Japanese bank codes and branch codes. It contains structured branch information (code, name, kana, hira, roma) for thousands of financial institutions across Japan, stored in both JSON and YAML formats under data/branches/. The data is automatically updated daily via a GitHub Actions workflow that downloads the official Zengin bank branch list from an external source, converts it from Shift_JIS CSV to UTF-8, and generates per-bank branch files. The repository also includes a Ruby CLI tool (bin/zengin) that orchestrates the download, conversion, and commit process, making the pipeline reproducible. While primarily a data repository, it includes a well-structured ETL pipeline that can serve as a template for similar data curation projects. The dataset is consumed by language-specific packages (Ruby, JavaScript, Python) to provide bank branch lookup functionality in financial applications.
The LLM identified 3 files worth highlighting for reuse:
A Thor-based Ruby CLI that implements the full ETL pipeline: downloading a ZIP archive from the official Zengin source, extracting a Shift_JIS CSV, converting to UTF-8, parsing bank and branch records, generating per-bank JSON and YAML files, computing checksums, and committing changes with git tags. It is self-contained, parameterized via command-line options, and could be extracted and adapted for other periodic data curation tasks.
Example of the consistent branch data schema used across all institution files. Each file maps branch codes to objects containing code, name (kanji), kana (katakana), hira (hiragana), and roma (romanization). This schema is reusable for any multilingual location or entity dataset and is the core deliverable of the repository.
A GitHub Actions workflow that runs daily at 11:30 JST to refresh the dataset. It restores a cached archive using the MD5 checksum, runs the bin/zengin update command, and automatically commits any changes to the master branch with a date tag. This pattern is reusable for maintaining any periodically updated data repository.