{"id":15756822,"url":"https://github.com/garnertb/fiver","last_synced_at":"2025-03-31T08:25:31.712Z","repository":{"id":147289836,"uuid":"112670078","full_name":"garnertb/fiver","owner":"garnertb","description":"How many units are available during a response system's busiest 5 minute period?","archived":false,"fork":false,"pushed_at":"2017-11-30T23:42:21.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T12:48:18.468Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garnertb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-11-30T22:58:19.000Z","updated_at":"2017-11-30T23:01:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"c25dde59-5cb0-42f4-9f32-85ee68d24548","html_url":"https://github.com/garnertb/fiver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Ffiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Ffiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Ffiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Ffiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garnertb","download_url":"https://codeload.github.com/garnertb/fiver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246438199,"owners_count":20777379,"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","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":"2024-10-04T09:02:24.054Z","updated_at":"2025-03-31T08:25:31.680Z","avatar_url":"https://github.com/garnertb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fiver\n\nA utility that answers one question: How many units are available during a response system's busiest 5 minute period?\n\n## Installation\n\nUsing [pip](https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip):\n```\npip install git+https://github.com/garnertb/fiver.git\n```\n\n## Getting Started\n\nIn order to use fiver, you'll need to have a CSV with three columns:\n\n* unit_id: The unit's id (ie E525)\n* dispatched: The timestamp* when the unit was dispatched.\n* available: The timestamp* when the unit cleared the incident.\n\n\n\\* Timestamps should be [ISO-8601  compliant](https://en.wikipedia.org/wiki/ISO_8601).\n\nAfter installation, you can run `fiver -h` from a terminal to learn more about the tool:\n\n```\nUsage: fiver [OPTIONS] INPUT START END\n\n  Calculates the 5 minute time frame with the most units out of service.\n\nOptions:\n  --pool INTEGER      Number of processes to use.\n  --units INTEGER     Total number of units available.\n  --count INTEGER     Number of results to return.\n  --timezone TEXT     Timezone of data.\n  --save / --no-save  Save the file as a csv.\n  --help              Show this message and exit.\n  ```\n\nFiver needs three elements in order to run:\n   1. The input CSV file.\n   2. The start date (YYYY-MM-DD).\n   3. The end date (YYYY-MM-DD).\n\n\n**Note:** The default timezone for fiver is `US/Eastern`.  Make sure to specify the `--timezone` flag with your actual timezone.\n\nBasic execution:\n```\nfiver rfd-vehicles.csv 2017-01-01 2017-1-02\n\n# Results\ndate_time_bin  counts                           units\n1  2017-01-01T20:45:00-05:00       8  E5,E16,E23,T22,BC1,BC2,E21,E11\n2  2017-01-01T00:15:00-05:00       6             E14,E23,E10,BC3,E16\n3  2017-01-01T14:10:00-05:00       5               E5,E15,E11,E22,E6\n4  2017-01-01T02:20:00-05:00       5              E21,E1,E11,E16,E18\n5  2017-01-01T00:30:00-05:00       5                 E20,E14,E23,E16\n```\n\nHere you can see that at 2017-01-01T20:45:00-05:00 8 units were out of service within a 5 minute timeframe.\n\nIf you specify the `--units` parameter, the tool will tell you what percentage of units are being utilized:\n\n```\nfiver rfd-vehicles.csv 2017-01-01 2017-1-02 --units 8\n\ndate_time_bin  counts                           units  \\\n1  2017-01-01T20:45:00-05:00       8  E5,E16,E23,T22,BC1,BC2,E21,E11   \n2  2017-01-01T00:15:00-05:00       6             E14,E23,E10,BC3,E16   \n3  2017-01-01T14:10:00-05:00       5               E5,E15,E11,E22,E6   \n4  2017-01-01T02:20:00-05:00       5              E21,E1,E11,E16,E18   \n5  2017-01-01T00:30:00-05:00       5                 E20,E14,E23,E16   \n\nunits_available  utilization  \n                0        100.0  \n                2         75.0  \n                3         62.5  \n                3         62.5  \n                3         62.5\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarnertb%2Ffiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarnertb%2Ffiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarnertb%2Ffiver/lists"}