# transport-cba
A Python module for cost-benefit analysis of infrastructure projects.
Provides a consistent way to evaluate economic efficiency
of road projects with well-defined inputs and parameters.
Main benefits compared to traiditional Excel-based approach:
- several orders of magnitude faster and cheaper
- wider options for analysis of alternative scenarios
- significantly lower margin for error
## Installation
From pip:
```
pip install transport-cba
```
Or directly from git:
```
pip install git+https://github.com/transport-cba/transport-cba.git
```
## Inputs
Load project inputs as an Excel file with following sheet names:
`road_params, capex, intensities_0, intensities_1, velocities_0, velocities_1`
Meaning of required inputs:
* capital expenditures (CAPEX) with pre-defined items
* parameters of road sections (length, width, number of lanes etc)
* vehicle intensities in variant 0 and 1 (without and with the project) by road segment
* vehicle velocities in variant 0 and 1 by segment
For illustration, please download the sample input (see below).
## Outputs
* Dataframe of costs and benefits
* Economic indicators:
- economic net present value (ENPV)
- economic internal rate of return (ERR)
- benefit to cost ratio (BCR)
- dataframes with breakdown of relevant benefits by years
## Example
NB: Values might differ slightly.
```python
>>> from transport_cba import RoadCBA
>>> from transport_cba.sample_projects import load_sample_bypass
>>> bypass = load_sample_bypass()
>>> cba = RoadCBA(2020, "svk")
>>> cba.read_project_inputs(
... bypass["road_params"],
... bypass["capex"],
... bypass["intensities_0"],
... bypass["intensities_1"],
... bypass["velocities_0"],
... bypass["velocities_1"]
... )
>>> cba.economic_analysis()
>>> cba.economic_indicators
```
| | Quantity | Unit | Value |
|---:|:-----------|:-------|--------:|
| 0 | ENPV | M EUR | 3.336 |
| 1 | ERR | % | 5.62 |
| 2 | BCR | | 1.076 |
```
Raw data
{
"_id": null,
"home_page": "https://github.com/transport-cba/transport-cba",
"name": "transport-cba",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "cost benefit analysis",
"author": "Peter Vanya",
"author_email": "peter.vanya@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/42/ab/326afc7adfbe411c0ccb6103c003ae52198a7789bd63792e550fe69a8a5f/transport-cba-0.1.2.tar.gz",
"platform": null,
"description": "# transport-cba\n\nA Python module for cost-benefit analysis of infrastructure projects.\n\nProvides a consistent way to evaluate economic efficiency\nof road projects with well-defined inputs and parameters.\n\nMain benefits compared to traiditional Excel-based approach:\n- several orders of magnitude faster and cheaper\n- wider options for analysis of alternative scenarios\n- significantly lower margin for error\n\n\n## Installation\nFrom pip:\n```\npip install transport-cba\n```\nOr directly from git:\n```\npip install git+https://github.com/transport-cba/transport-cba.git\n```\n\n## Inputs\nLoad project inputs as an Excel file with following sheet names:\n `road_params, capex, intensities_0, intensities_1, velocities_0, velocities_1`\n\nMeaning of required inputs:\n* capital expenditures (CAPEX) with pre-defined items\n* parameters of road sections (length, width, number of lanes etc)\n* vehicle intensities in variant 0 and 1 (without and with the project) by road segment\n* vehicle velocities in variant 0 and 1 by segment\n\nFor illustration, please download the sample input (see below).\n\n\n## Outputs\n* Dataframe of costs and benefits\n* Economic indicators:\n - economic net present value (ENPV)\n - economic internal rate of return (ERR)\n - benefit to cost ratio (BCR)\n - dataframes with breakdown of relevant benefits by years\n\n\n## Example\nNB: Values might differ slightly.\n\n```python\n>>> from transport_cba import RoadCBA\n>>> from transport_cba.sample_projects import load_sample_bypass\n\n>>> bypass = load_sample_bypass()\n\n>>> cba = RoadCBA(2020, \"svk\")\n>>> cba.read_project_inputs(\n... bypass[\"road_params\"],\n... bypass[\"capex\"],\n... bypass[\"intensities_0\"],\n... bypass[\"intensities_1\"],\n... bypass[\"velocities_0\"],\n... bypass[\"velocities_1\"]\n... )\n>>> cba.economic_analysis()\n>>> cba.economic_indicators\n```\n| | Quantity | Unit | Value |\n|---:|:-----------|:-------|--------:|\n| 0 | ENPV | M EUR | 3.336 |\n| 1 | ERR | % | 5.62 |\n| 2 | BCR | | 1.076 |\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "A Python package for cost-benefit analysis of infrastructure projects",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/transport-cba/transport-cba"
},
"split_keywords": [
"cost",
"benefit",
"analysis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "54abb3c50be86e7ada9b33b8c6dd3c4ad431eef7d091b8c60fce368241e8914f",
"md5": "ff45156e284e2f12db964caaa8a40b8e",
"sha256": "06c1fdc7d1aa01ff71209ed3f635a07a3ee51e561173ebb23996919cc415275d"
},
"downloads": -1,
"filename": "transport_cba-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff45156e284e2f12db964caaa8a40b8e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 47349,
"upload_time": "2023-08-22T16:15:08",
"upload_time_iso_8601": "2023-08-22T16:15:08.377920Z",
"url": "https://files.pythonhosted.org/packages/54/ab/b3c50be86e7ada9b33b8c6dd3c4ad431eef7d091b8c60fce368241e8914f/transport_cba-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42ab326afc7adfbe411c0ccb6103c003ae52198a7789bd63792e550fe69a8a5f",
"md5": "ea31fae59bf2e6e2234fc9215d126201",
"sha256": "4bd5a31421682fca3d6bbc98a76b93fc88df2feb29937ce5f617b64b0b048268"
},
"downloads": -1,
"filename": "transport-cba-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "ea31fae59bf2e6e2234fc9215d126201",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 43299,
"upload_time": "2023-08-22T16:15:10",
"upload_time_iso_8601": "2023-08-22T16:15:10.430462Z",
"url": "https://files.pythonhosted.org/packages/42/ab/326afc7adfbe411c0ccb6103c003ae52198a7789bd63792e550fe69a8a5f/transport-cba-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-22 16:15:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "transport-cba",
"github_project": "transport-cba",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": [
[
"~=",
"1.19.5"
]
]
},
{
"name": "pandas",
"specs": [
[
"~=",
"0.25.3"
]
]
},
{
"name": "numpy-financial",
"specs": [
[
"~=",
"1.0.0"
]
]
},
{
"name": "xlrd",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "openpyxl",
"specs": [
[
"==",
"3.0.10"
]
]
}
],
"lcname": "transport-cba"
}