{"id":30663355,"url":"https://github.com/policyengine/policyengine-sg","last_synced_at":"2025-08-31T17:10:29.612Z","repository":{"id":311759228,"uuid":"1044881130","full_name":"PolicyEngine/policyengine-sg","owner":"PolicyEngine","description":"Singapore tax and benefit microsimulation model","archived":false,"fork":false,"pushed_at":"2025-08-26T11:55:34.000Z","size":229,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T14:20:07.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PolicyEngine.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.yaml","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-26T10:42:19.000Z","updated_at":"2025-08-26T10:42:59.000Z","dependencies_parsed_at":"2025-08-26T14:21:25.960Z","dependency_job_id":"49a62a93-2807-4d0e-9262-26aeefe83010","html_url":"https://github.com/PolicyEngine/policyengine-sg","commit_stats":null,"previous_names":["policyengine/policyengine-sg"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/PolicyEngine/policyengine-sg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolicyEngine%2Fpolicyengine-sg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolicyEngine%2Fpolicyengine-sg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolicyEngine%2Fpolicyengine-sg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolicyEngine%2Fpolicyengine-sg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolicyEngine","download_url":"https://codeload.github.com/PolicyEngine/policyengine-sg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolicyEngine%2Fpolicyengine-sg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273010994,"owners_count":25030369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-31T17:10:22.808Z","updated_at":"2025-08-31T17:10:29.602Z","avatar_url":"https://github.com/PolicyEngine.png","language":"Python","readme":"# PolicyEngine Singapore\n\n[![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://www.python.org/)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nPolicyEngine Singapore is a free, open-source microsimulation model of Singapore's tax and benefit system. It enables users to calculate taxes and benefits for individual households and analyze the distributional impacts of policy reforms.\n\n## Features\n\n### Comprehensive Tax Modeling\n- Personal income tax with progressive brackets\n- Central Provident Fund (CPF) contributions\n- Goods and Services Tax (GST)\n- Foreign Worker Levy (coming soon)\n- Property tax (coming soon)\n- Motor vehicle taxes (coming soon)\n\n### Social Benefits and Programs\n- ComCare social assistance programs\n- WorkFare Income Supplement (WIS)\n- CPF schemes (Healthcare, Housing, etc.)\n- Senior citizen benefits (coming soon)\n- Education subsidies (coming soon)\n\n### Key Capabilities\n- **Up-to-date parameters**: Latest tax rates and benefit amounts\n- **Government sources**: All parameters referenced to official Singapore sources\n- **Test-driven development**: Comprehensive test coverage\n- **Reform analysis**: Model policy changes and impacts\n- **Open source**: Transparent and auditable\n\n## Installation\n\n### Requirements\n- Python 3.10 or higher (3.13 recommended)\n- pip or uv package manager\n\n### Install from source\n\n```bash\n# Clone the repository\ngit clone https://github.com/PolicyEngine/policyengine-sg.git\ncd policyengine-sg\n\n# Install with uv (recommended)\nuv pip install --system -e .\n\n# Or with pip\npip install -e .\n```\n\n### Install from PyPI (coming soon)\n\n```bash\npip install policyengine-sg\n```\n\n## Quick Start\n\n```python\nfrom policyengine_sg import SingaporeTaxBenefitSystem\nfrom policyengine_core.simulations import Simulation\n\n# Create the tax-benefit system\nsystem = SingaporeTaxBenefitSystem()\n\n# Define a household\nsituation = {\n    \"people\": {\n        \"person1\": {\n            \"age\": {\"2024\": 35},\n            \"employment_income\": {\"2024\": 60000}\n        }\n    },\n    \"households\": {\n        \"household\": {\n            \"members\": [\"person1\"]\n        }\n    }\n}\n\n# Run simulation\nsimulation = Simulation(\n    tax_benefit_system=system,\n    situation=situation\n)\n\n# Calculate values\nincome_tax = simulation.calculate(\"income_tax\", \"2024\")\ncpf_contributions = simulation.calculate(\"cpf_contributions\", \"2024\")\n\nprint(f\"Income tax: S${income_tax[0]:,.2f}\")\nprint(f\"CPF contributions: S${cpf_contributions[0]:,.2f}\")\n```\n\n## Documentation\n\nFull documentation is available at: [https://policyengine.github.io/policyengine-sg](https://policyengine.github.io/policyengine-sg)\n\n- [Tax Programs](docs/tax-programs.md) - Detailed tax calculations\n- [Benefit Programs](docs/benefit-programs.md) - Social assistance programs\n- [Developer Guide](docs/developer-guide.md) - Contributing guide\n- [API Reference](docs/api-reference.md) - Technical documentation\n\n## Development\n\n### Setting up development environment\n\n```bash\n# Install development dependencies\nuv pip install --system -e .[dev]\n\n# Run tests\nuv run pytest\n\n# Format code\nmake format\n\n# Build documentation\nmyst build docs\n```\n\n### Running tests\n\n```bash\n# Run all tests with coverage\nuv run pytest --cov=policyengine_sg\n\n# Run specific test file\nuv run pytest policyengine_sg/tests/policy/baseline/test_income_tax.yaml\n\n# Run only unit tests\nuv run pytest policyengine_sg/tests -k \"not yaml\"\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Developer Guide](docs/developer-guide.md) for:\n- Setting up your development environment\n- Adding new parameters and variables\n- Writing tests\n- Submitting pull requests\n\n### Key principles\n1. **Test-driven development**: Write tests first\n2. **Government sources**: Reference all parameters to official sources\n3. **Code quality**: Format with Black (79 chars)\n4. **Documentation**: Update docs with changes\n\n## Data and Validation\n\nPolicyEngine Singapore is validated against:\n- IRAS tax calculators\n- CPF contribution calculators\n- MSF benefit calculators\n- Published government rate tables\n- Official Singapore statistics\n\n## License\n\nPolicyEngine Singapore is licensed under the [GNU Affero General Public License v3.0](LICENSE).\n\n## Citation\n\nIf you use PolicyEngine Singapore in your research, please cite:\n\n```bibtex\n@software{policyengine_singapore,\n  title = {PolicyEngine Singapore},\n  author = {PolicyEngine},\n  year = {2024},\n  url = {https://github.com/PolicyEngine/policyengine-sg}\n}\n```\n\n## Support\n\n- **Issues**: [GitHub Issues](https://github.com/PolicyEngine/policyengine-sg/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/PolicyEngine/policyengine-sg/discussions)\n- **Email**: hello@policyengine.org\n- **Website**: [policyengine.org](https://policyengine.org)\n\n## Acknowledgments\n\nPolicyEngine Singapore builds on:\n- [OpenFisca](https://openfisca.org/) framework via PolicyEngine Core\n- Singapore government data and documentation\n- Open source tax-benefit modeling community\n\n## Roadmap\n\n### Near-term (Q1 2025)\n- Complete personal income tax implementation\n- Add CPF contribution calculations\n- Implement GST framework\n- Add ComCare social assistance\n\n### Medium-term (Q2-Q3 2025)\n- WorkFare Income Supplement\n- CPF housing and healthcare schemes\n- Foreign Worker Levy\n- Property tax calculations\n\n### Long-term\n- Full integration with PolicyEngine web app\n- Motor vehicle taxes and COE system\n- Education subsidies and schemes\n- Behavioral responses and dynamic scoring\n\n---\n\n**Note**: This model is under active development. Parameters are updated regularly to reflect policy changes. Always verify calculations against official IRAS, CPF, and MSF sources for critical applications.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolicyengine%2Fpolicyengine-sg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolicyengine%2Fpolicyengine-sg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolicyengine%2Fpolicyengine-sg/lists"}