Skip to main content

A quantitative framework for detecting budgetary distortion.

Project description

Standard Block Comparison Method

PyPI version License: MIT DOI DOI

A quantitative auditing framework to break free from "number magic" and measure the true effectiveness of administrative measures.


📖 Overview

Huge figures announced by governments and corporations, such as "cumulative total of X people" or "budget of Y billion yen," are often used to obscure the reality (ROI). This project provides the "Standard Block Comparison Method (SBCM)," a technique to mathematically determine whether a measure functions as social infrastructure or is merely a statistical "error" by breaking these numbers down to the smallest unit: the "Standard Block" (Basic Municipality).

This repository contains the SBCM calculation tools and a Python library for detecting "budgetary distortion" in financial data.

🚀 Installation

This tool is available as a Python package. You can install it using pip:

pip install standard-block-auditor

(Note: If you registered it under a different name, please replace the package name accordingly.)

⚡ Quick Start

After installation, you can use the following commands directly from your terminal.

1. Verify a Single Metric (sbcm-calc)

Calculate the impact of a number (users or budget) announced by the government on a national scale.

# Example: "3,000 users" (Target: Total population)
sbcm-calc --value 3000 --target_ratio 1.0

# Example: "10 Billion JPY Budget"
sbcm-calc --value 10000000000

2. Audit Financial Statements (sbcm-audit)

Load financial data and automatically detect projects that are "High Cost but Low Reach" (Quadrant 4).

  1. Prepare a CSV file like example_data.csv (can be generated via AI prompts).
  2. Run the command:
# Specify city population (e.g., Kashiwa City: 435,000)
sbcm-audit example_data.csv --pop 435000

This outputs an analysis file (distortion_analysis_result.csv) and a visualization graph (distortion_matrix.png).

3. Statistical Verification (sbcm-verify)

Verify the robustness of the results using Monte Carlo simulations to counter arguments about estimation errors.

# Example: 3,000 users, Target ratio 15% (±3% uncertainty)
sbcm-verify --value 3000 --target_ratio 0.15 --ratio_sd 0.03

📐 Methodology

Effectiveness Impact ($I$)

The index measuring the reach of a policy.

$$ I = \frac{V}{B} $$

The Standard Block ($B$) is defined based on Japan's demographics and administrative structure:

$$ B = \frac{P \times R}{N} $$

  • $P$: Total Population of Japan (124 Million)
  • $N$: Total Municipalities (1,718)
  • $R$: Target Attribute Ratio
  • $B \approx 72,176 \times R$ (people)

The Verdict Criteria

Impact ($I$) Verdict Benchmark
$I < 1.0$ Error Level Out of scope. Cannot even cover one standard municipality.
$1.0 \le I < 17$ Localized Experimental phase. Not even reaching early adopters.
$172 \le I < 859$ Infrastructure Becoming a foundational public service (e.g., Water, Electricity).
$I \ge 859$ Social OS Majority adoption. A prerequisite for modern society.

📊 Budget Portfolio Analysis

An extension of SBCM that visualizes the balance between "Invested Tax (Budget)" and "Achieved Outcome (Coverage)."

Budget Distortion Index ($D_{index}$)

$$ D_{index} = \frac{I_{budget}}{I_{coverage}} $$

Based on this index, projects are classified into four quadrants:

Quadrant Status Verdict
Q1 (High Cost / High Reach) Infrastructure Appropriate. Expensive but used by everyone (Roads, Waste collection).
Q2 (Low Cost / High Reach) Innovation Excellent. Low budget, high impact (Digital transformation).
Q4 (High Cost / Low Reach) 【Distortion】 Audit Required. Huge taxes vanishing into the pockets of a few.

📂 Directory Structure

Standard-Block-Comparison-Method/
├── sbcm/                  # Python Package Source Code
│   ├── __init__.py
│   ├── block_calculator.py
│   ├── budget_distortion_analyzer.py
│   ├── sensitivity_analysis.py
│   ├── config.py          # Shared Constants
│   └── visualizer.py      # Graph Plotting Module
│
├── prompts/               # AI Auditor Prompts
├── reports/               # Case Studies & Reports
├── example_data.csv       # Sample Data
├── google_sheets_script.js # Google Apps Script
├── pyproject.toml         # Package Configuration
└── README_EN.md           # This Document

📝 License

This project is released under the MIT License. Feel free to use it for administrative verification and auditing.


Author

Melnus (GitHub: Melnus)

📝 Citation

If you use SBCM in your research or auditing, please cite the following paper:

Koyama, H. (2025). Proposal for the Standard Block Comparison Method (SBCM) in the Quantitative Evaluation of Administrative Measures. Zenodo. https://doi.org/10.5281/zenodo.17762960

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

standard_block_auditor-0.1.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

standard_block_auditor-0.1.3-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file standard_block_auditor-0.1.3.tar.gz.

File metadata

  • Download URL: standard_block_auditor-0.1.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for standard_block_auditor-0.1.3.tar.gz
Algorithm Hash digest
SHA256 708b7ba66ad6c86342a216402d8a9d71a0d93340025f936be0aeee4b20e2e2f0
MD5 c9fcea989dee3a79d71710b6d709bc1a
BLAKE2b-256 ce69eacb72250413f3293108f3e8660292515f6a4bf7b64ab54d6960a5864831

See more details on using hashes here.

File details

Details for the file standard_block_auditor-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for standard_block_auditor-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd9f6699bef01840b472fc9e84ba0d217a583b190c931dff031f5ae2b41db7f
MD5 6fa8af3c465c5b2ea902de982b29876c
BLAKE2b-256 f494975b491561f5f592e95c7dd33751ee7dc2f50510c9705c4486096e8a5e7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page