# DriveCAT+ - Drive Cycle Analysis Tool Plus
DriveCAT+ is a drivecycle analysis python package that takes in vehicle time, speed, and elevation profiles, processes them, and outputs several useful statistical metrics that help quantify a drivecycle.
## Overview
DriveCAT+ contains a class `Cycle` used for taking a drivecycle as an input. The `DriveStats` class initializes various categories of drivestats like `DistanceStats`, `TotalSpeedStats`, `TimeStats`, etc as subclasses and facilitates the calculation of relevant statical metrics within their constructor methods.
## Installation
First, clone the repository from GitHub:
git clone https://github.com/NREL/drivecatplus.git drivecatplus
DriveCAT+ depends on python versions >=3.8 and <=3.11. One way to satisfy this is to use conda:
conda create -n dcp python=3.10
conda activate dcp
After creating the environment, navigate to the parent directory containing the DriveCAT+ repository e.g. `cd github/drivecatplus/` and run:
pip install -e .
from within the dcp python 3.10 environment you created.
This will install DriveCAT+ with minimal dependencies such that the code files can be edited. Developers will find the `-e` option handy since DriveCAT+ will be installed in place from the installation location, and any updates will be propagated each time DriveCAT+ is freshly imported.
## Demo
This repo is provided with a sample [drivecycle input file](https://github.com/NREL/drivecatplus/blob/4b69af23fbf9099293ebd1e37b9785eab1d9e460/src/resources/demo_cycle_without_elevation.csv) to test out in a basic demo. From the parent directory:
```bash
cd src/demos/
python demo_drivestats_basic.py
```
or, use VS Code's Interactive Window to run the demo code blocks.
## Run DriveCAT+ for multiple drivecycles
The run_dcp.py module can be used to analyze multiple drivecycles and export the results as a single CSV. --input-path accepts path of a single CSV file input or the path to a directory. When a directory path is provided, the module searches all subdirectories for .CSV files and runs DriveCAT+ for each of them.
```bash
cd src/drivecatplus/
python run_dcp.py --input-path=/path/to/file-or-folder
```
Raw data
{
"_id": null,
"home_page": null,
"name": "drivecatplus",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Harish Panneer Selvam <harish.panneerselvam@nrel.gov>",
"keywords": "drivecat, drivecycle, drivecycle-metrics, drivestats, speed-profile, time-speed-trace",
"author": null,
"author_email": "Harish Panneer Selvam <Harish.PanneerSelvam@nrel.gov>",
"download_url": "https://files.pythonhosted.org/packages/65/f4/b9f118d2a877b418bcc41b5a1999b7ebd5575b96b6b7a77839014fb4e36a/drivecatplus-0.2.0.tar.gz",
"platform": null,
"description": "# DriveCAT+ - Drive Cycle Analysis Tool Plus\n\nDriveCAT+ is a drivecycle analysis python package that takes in vehicle time, speed, and elevation profiles, processes them, and outputs several useful statistical metrics that help quantify a drivecycle.\n\n## Overview\nDriveCAT+ contains a class `Cycle` used for taking a drivecycle as an input. The `DriveStats` class initializes various categories of drivestats like `DistanceStats`, `TotalSpeedStats`, `TimeStats`, etc as subclasses and facilitates the calculation of relevant statical metrics within their constructor methods.\n\n## Installation\n\nFirst, clone the repository from GitHub:\n\n git clone https://github.com/NREL/drivecatplus.git drivecatplus\n\nDriveCAT+ depends on python versions >=3.8 and <=3.11. One way to satisfy this is to use conda:\n\n conda create -n dcp python=3.10\n conda activate dcp\n\nAfter creating the environment, navigate to the parent directory containing the DriveCAT+ repository e.g. `cd github/drivecatplus/` and run:\n\n pip install -e .\n\nfrom within the dcp python 3.10 environment you created.\n\nThis will install DriveCAT+ with minimal dependencies such that the code files can be edited. Developers will find the `-e` option handy since DriveCAT+ will be installed in place from the installation location, and any updates will be propagated each time DriveCAT+ is freshly imported.\n\n## Demo\n\nThis repo is provided with a sample [drivecycle input file](https://github.com/NREL/drivecatplus/blob/4b69af23fbf9099293ebd1e37b9785eab1d9e460/src/resources/demo_cycle_without_elevation.csv) to test out in a basic demo. From the parent directory:\n\n```bash\ncd src/demos/\npython demo_drivestats_basic.py\n```\n\nor, use VS Code's Interactive Window to run the demo code blocks.\n\n## Run DriveCAT+ for multiple drivecycles\n\nThe run_dcp.py module can be used to analyze multiple drivecycles and export the results as a single CSV. --input-path accepts path of a single CSV file input or the path to a directory. When a directory path is provided, the module searches all subdirectories for .CSV files and runs DriveCAT+ for each of them.\n\n```bash\ncd src/drivecatplus/\npython run_dcp.py --input-path=/path/to/file-or-folder\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "NREL's Drive Cycle Analysis Tool Plus",
"version": "0.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/NREL/drivecatplus/issues",
"Documentation": "https://nrel.github.io/drivecatplus/",
"Repository": "https://github.com/NREL/drivecatplus"
},
"split_keywords": [
"drivecat",
" drivecycle",
" drivecycle-metrics",
" drivestats",
" speed-profile",
" time-speed-trace"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c6da249d30555bcbdaae55a860f65e3dbab138dea516e7ee18c29bc7d760c1f3",
"md5": "8bd930e028a04a280025bb63b0da336d",
"sha256": "f0b95ce5086236f01bc7fe4fc093ef31b0f6e9eeeffca372daa23abb84b17df0"
},
"downloads": -1,
"filename": "drivecatplus-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8bd930e028a04a280025bb63b0da336d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 17976,
"upload_time": "2024-10-23T03:22:13",
"upload_time_iso_8601": "2024-10-23T03:22:13.128273Z",
"url": "https://files.pythonhosted.org/packages/c6/da/249d30555bcbdaae55a860f65e3dbab138dea516e7ee18c29bc7d760c1f3/drivecatplus-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "65f4b9f118d2a877b418bcc41b5a1999b7ebd5575b96b6b7a77839014fb4e36a",
"md5": "ace7c3ab30253f94956b1e67678bec82",
"sha256": "d153fcba3bb60ce99edec9fdf1c12c64e0212cfd39bcd241e27d22eb3d17fa03"
},
"downloads": -1,
"filename": "drivecatplus-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "ace7c3ab30253f94956b1e67678bec82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 24774,
"upload_time": "2024-10-23T03:22:14",
"upload_time_iso_8601": "2024-10-23T03:22:14.325532Z",
"url": "https://files.pythonhosted.org/packages/65/f4/b9f118d2a877b418bcc41b5a1999b7ebd5575b96b6b7a77839014fb4e36a/drivecatplus-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-23 03:22:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NREL",
"github_project": "drivecatplus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pandas",
"specs": [
[
"==",
"2.2.2"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "typing_extensions",
"specs": []
}
],
"lcname": "drivecatplus"
}