Name | hbsir JSON |
Version |
0.6.1
JSON |
| download |
home_page | None |
Summary | An intuitive platform designed to simplify the analysis of Iran household budget survey data. |
upload_time | 2025-09-04 23:38:39 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
iran
survey
data
socioeconomic
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# HBSIR - Household Budget Survey of Iran in Python
## Overview
HBSIR is a Python package for working with microdata from the Household Budget
Survey of Iran (HBSIR). It provides a high-level API for easily loading,
exploring and analyzing this nationally representative household survey.
The key capabilities of HBSIR include:
- Loading survey tables for multiple years in raw, cleaned or normalized form
- Enriching data by adding geographical attributes and classification systems
- Performing correct weighted statistical analysis with integrated sampling weights
- Calculating metrics like weighted averages and distributional statistics
- Accessing pre-processed tables and visualizations stored in a Knowledge Base
- Handling all necessary data processing and configuration behind the scenes
HBSIR aims to make analysis of the Household Budget Survey straightforward for
researchers, analysts and policymakers even without programming expertise.
The simple verb-based API provides a smooth on-ramp while harnessing the full
power of Pandas and Python under the hood.
## Motivation
The HBSIR Data Python Package addresses the historical challenges in analyzing
Household Budget Survey data from Iran. The complex nature of the data, with
its ever-changing codings, inconsistent table schemas, and lack of
standardization, has made analysis a daunting task. This package aims to
simplify the entire process—from data extraction to analysis—allowing
researchers to focus on deriving meaningful insights rather than wrestling
with data complexities.
Recognizing the difficulties posed by the original MS Access format and the
lack of standardization across different years, the HBSIR Data Python Package
offers a solution. By providing a uniform API, streamlining data loading, and
introducing a customizable schema system, we aim to make HBSIR data more
accessible and usable for all researchers. This package empowers users to
overcome the challenges associated with HBSIR data, enabling them to
contribute to a deeper understanding of household budget dynamics in Iran.
## Getting Started
Getting started with HBSIR is quick and easy.
First, install the package using pip:
```sh
pip install hbsir
```
Then import the library and load a table:
```python
import hbsir
table = hbsir.load_table("Expenditures", years=[1390, 1400])
```
The load_table function, by default, retrieves normalized, analysis-ready data.
Just specify the table name and year(s).
Further data enrichment occurs through HBSIR's verb-based API:
```python
table = hbsir.add_attribute(table, name="Province")
```
This adds a province name column for geographical analysis.
For more examples of data loading, transformation and analysis refer to the
[complete documentation](https://iran-open-data.github.io/HBSIR/).
## Contributing
HBSIR warmly welcomes contributions from the community!
As an open source project aimed at accessibility, we highly encourage
submissions and improvements from all users.
In particular, assistance with updating and expanding the documentation is
invaluable. As the capabilities of HBSIR grow, keeping the docs updated is
an ongoing effort. All contributions to the documentation are appreciated.
More broadly, please open issues or pull requests for:
- Reporting bugs
- Suggesting new features
- Improving existing code
The HBSIR contributors will do their best to respond promptly and incorporate
changes that align with the project's overall vision and aims.
As an open dataset and software project, transparency and community
participation are vital to the success and impact of HBSIR. We welcome you
to get involved!
## Related Packages
HBSIR is built on top of the [BSSIR](https://github.com/Iran-Open-Data/BSSIR)
(Basic Survey Structure of Iran) library
which provides shared data loading and transformation functionality across
multiple socioeconomic surveys from Iran.
Specifically, HBSIR utilizes capabilities from BSSIR to:
- Read complex raw survey data files
- Standardize schemas across years
- Integrate metadata like regional attributes
- Manage data configurations
This enables HBSIR to focus specifically on provisions for analyzing the
Household Budget Survey without having to reimplement common data handling
mechanisms.
The modular design centered around BSSIR also allows the HBSIR data access
API to be reused easily. Two other survey-specific libraries that inherit
directly from HBSIR are:
- [LFSIR](https://github.com/Iran-Open-Data/LFSIR): For the Iran Labor Force Survey
- CNSIR: For the Iran Census and Sample Survey
So in summary, BSSIR provides base survey data infrastructure, while HBSIR,
LFSIR and CNSIR build on top of it with added provisions for analyzing their
respective datasets. This hierarchy of packages allows collaborative
development and maintenance.
``` mermaid
flowchart TD
BSSIR --> HBSIR
BSSIR --> LFSIR
BSSIR --> CNSIR
click BSSIR "https://github.com/Iran-Open-Data/BSSIR"
click HBSIR "https://github.com/Iran-Open-Data/HBSIR"
click LFSIR "https://github.com/Iran-Open-Data/LFSIR"
click CNSIR "https://github.com/Iran-Open-Data/CNSIR"
```
Raw data
{
"_id": null,
"home_page": null,
"name": "hbsir",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "iran, survey, data, socioeconomic",
"author": null,
"author_email": "Mohammad Amin Alavian <m.amin.alavian@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/54/75/168f4d21c0726017ff7e19680a1a7a0991996289e641d66e8943998e739a/hbsir-0.6.1.tar.gz",
"platform": null,
"description": "# HBSIR - Household Budget Survey of Iran in Python\r\n\r\n## Overview\r\n\r\nHBSIR is a Python package for working with microdata from the Household Budget \r\nSurvey of Iran (HBSIR). It provides a high-level API for easily loading, \r\nexploring and analyzing this nationally representative household survey.\r\n\r\nThe key capabilities of HBSIR include:\r\n\r\n- Loading survey tables for multiple years in raw, cleaned or normalized form\r\n- Enriching data by adding geographical attributes and classification systems \r\n- Performing correct weighted statistical analysis with integrated sampling weights \r\n- Calculating metrics like weighted averages and distributional statistics\r\n- Accessing pre-processed tables and visualizations stored in a Knowledge Base\r\n- Handling all necessary data processing and configuration behind the scenes\r\n\r\nHBSIR aims to make analysis of the Household Budget Survey straightforward for \r\nresearchers, analysts and policymakers even without programming expertise. \r\nThe simple verb-based API provides a smooth on-ramp while harnessing the full \r\npower of Pandas and Python under the hood.\r\n\r\n## Motivation\r\n\r\nThe HBSIR Data Python Package addresses the historical challenges in analyzing \r\nHousehold Budget Survey data from Iran. The complex nature of the data, with \r\nits ever-changing codings, inconsistent table schemas, and lack of \r\nstandardization, has made analysis a daunting task. This package aims to \r\nsimplify the entire process\u2014from data extraction to analysis\u2014allowing \r\nresearchers to focus on deriving meaningful insights rather than wrestling \r\nwith data complexities.\r\n\r\nRecognizing the difficulties posed by the original MS Access format and the \r\nlack of standardization across different years, the HBSIR Data Python Package \r\noffers a solution. By providing a uniform API, streamlining data loading, and \r\nintroducing a customizable schema system, we aim to make HBSIR data more \r\naccessible and usable for all researchers. This package empowers users to \r\novercome the challenges associated with HBSIR data, enabling them to \r\ncontribute to a deeper understanding of household budget dynamics in Iran.\r\n\r\n## Getting Started\r\n\r\nGetting started with HBSIR is quick and easy. \r\n\r\nFirst, install the package using pip:\r\n\r\n```sh\r\npip install hbsir\r\n```\r\n\r\nThen import the library and load a table:\r\n\r\n```python\r\nimport hbsir\r\n\r\ntable = hbsir.load_table(\"Expenditures\", years=[1390, 1400])\r\n```\r\n\r\nThe load_table function, by default, retrieves normalized, analysis-ready data. \r\nJust specify the table name and year(s).\r\n\r\nFurther data enrichment occurs through HBSIR's verb-based API:\r\n\r\n```python\r\ntable = hbsir.add_attribute(table, name=\"Province\")\r\n```\r\n\r\nThis adds a province name column for geographical analysis.\r\n\r\nFor more examples of data loading, transformation and analysis refer to the \r\n[complete documentation](https://iran-open-data.github.io/HBSIR/). \r\n\r\n## Contributing\r\n\r\nHBSIR warmly welcomes contributions from the community!\r\n\r\nAs an open source project aimed at accessibility, we highly encourage \r\nsubmissions and improvements from all users.\r\n\r\nIn particular, assistance with updating and expanding the documentation is \r\ninvaluable. As the capabilities of HBSIR grow, keeping the docs updated is \r\nan ongoing effort. All contributions to the documentation are appreciated.\r\n\r\nMore broadly, please open issues or pull requests for:\r\n\r\n- Reporting bugs\r\n- Suggesting new features\r\n- Improving existing code\r\n\r\nThe HBSIR contributors will do their best to respond promptly and incorporate \r\nchanges that align with the project's overall vision and aims.\r\n\r\nAs an open dataset and software project, transparency and community \r\nparticipation are vital to the success and impact of HBSIR. We welcome you \r\nto get involved!\r\n\r\n## Related Packages\r\n\r\nHBSIR is built on top of the [BSSIR](https://github.com/Iran-Open-Data/BSSIR) \r\n(Basic Survey Structure of Iran) library \r\nwhich provides shared data loading and transformation functionality across \r\nmultiple socioeconomic surveys from Iran.\r\n\r\nSpecifically, HBSIR utilizes capabilities from BSSIR to:\r\n\r\n- Read complex raw survey data files\r\n- Standardize schemas across years\r\n- Integrate metadata like regional attributes\r\n- Manage data configurations\r\n\r\nThis enables HBSIR to focus specifically on provisions for analyzing the \r\nHousehold Budget Survey without having to reimplement common data handling \r\nmechanisms.\r\n\r\nThe modular design centered around BSSIR also allows the HBSIR data access \r\nAPI to be reused easily. Two other survey-specific libraries that inherit \r\ndirectly from HBSIR are:\r\n\r\n- [LFSIR](https://github.com/Iran-Open-Data/LFSIR): For the Iran Labor Force Survey\r\n- CNSIR: For the Iran Census and Sample Survey\r\n\r\nSo in summary, BSSIR provides base survey data infrastructure, while HBSIR, \r\nLFSIR and CNSIR build on top of it with added provisions for analyzing their \r\nrespective datasets. This hierarchy of packages allows collaborative \r\ndevelopment and maintenance.\r\n\r\n``` mermaid\r\nflowchart TD\r\n BSSIR --> HBSIR\r\n BSSIR --> LFSIR\r\n BSSIR --> CNSIR\r\n\r\n click BSSIR \"https://github.com/Iran-Open-Data/BSSIR\"\r\n click HBSIR \"https://github.com/Iran-Open-Data/HBSIR\"\r\n click LFSIR \"https://github.com/Iran-Open-Data/LFSIR\"\r\n click CNSIR \"https://github.com/Iran-Open-Data/CNSIR\"\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "An intuitive platform designed to simplify the analysis of Iran household budget survey data.",
"version": "0.6.1",
"project_urls": {
"Homepage": "https://github.com/Iran-Open-Data/HBSIR",
"Repository": "https://github.com/Iran-Open-Data/HBSIR"
},
"split_keywords": [
"iran",
" survey",
" data",
" socioeconomic"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4deee6fd45caf2a7a4d14d1d02d10c2d08dedc89f99b13d523b7d9d1e39ad365",
"md5": "9eeffaf1b01fc9ffe69622c70bb0a7b3",
"sha256": "074f4c3fad842c747807a801418e6195c8f3387dcf117c18063ebd516d021102"
},
"downloads": -1,
"filename": "hbsir-0.6.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9eeffaf1b01fc9ffe69622c70bb0a7b3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 101585,
"upload_time": "2025-09-04T23:38:37",
"upload_time_iso_8601": "2025-09-04T23:38:37.667011Z",
"url": "https://files.pythonhosted.org/packages/4d/ee/e6fd45caf2a7a4d14d1d02d10c2d08dedc89f99b13d523b7d9d1e39ad365/hbsir-0.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5475168f4d21c0726017ff7e19680a1a7a0991996289e641d66e8943998e739a",
"md5": "483fe20da677ffc7d4b8be2efe8e670d",
"sha256": "bac506ee832a55fca61e6f88ce51576b8c87dcfaed61a279c7ada9b5275a16f1"
},
"downloads": -1,
"filename": "hbsir-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "483fe20da677ffc7d4b8be2efe8e670d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 94204,
"upload_time": "2025-09-04T23:38:39",
"upload_time_iso_8601": "2025-09-04T23:38:39.122840Z",
"url": "https://files.pythonhosted.org/packages/54/75/168f4d21c0726017ff7e19680a1a7a0991996289e641d66e8943998e739a/hbsir-0.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-04 23:38:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Iran-Open-Data",
"github_project": "HBSIR",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "hbsir"
}