{"id":24283992,"url":"https://github.com/robbiejaeger/running-hills-factor","last_synced_at":"2026-05-05T00:34:15.668Z","repository":{"id":53098708,"uuid":"352368542","full_name":"robbiejaeger/running-hills-factor","owner":"robbiejaeger","description":"Calculate how much running time is expected to be gained or lost based on a route elevation map compared to a flat course.","archived":false,"fork":false,"pushed_at":"2021-04-22T03:12:40.000Z","size":281,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T03:42:54.214Z","etag":null,"topics":["nodejs","npm","running"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/running-hills-factor","language":"JavaScript","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/robbiejaeger.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}},"created_at":"2021-03-28T15:40:24.000Z","updated_at":"2024-07-09T10:36:07.000Z","dependencies_parsed_at":"2022-08-27T03:16:45.091Z","dependency_job_id":null,"html_url":"https://github.com/robbiejaeger/running-hills-factor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robbiejaeger/running-hills-factor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiejaeger%2Frunning-hills-factor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiejaeger%2Frunning-hills-factor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiejaeger%2Frunning-hills-factor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiejaeger%2Frunning-hills-factor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbiejaeger","download_url":"https://codeload.github.com/robbiejaeger/running-hills-factor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiejaeger%2Frunning-hills-factor/sbom","scorecard":{"id":779837,"data":{"date":"2025-08-18","repo":{"name":"github.com/robbiejaeger/running-hills-factor","commit":"08f1cd75b1374ceee226b9ad28b6d0f8b7918f1a"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":2.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/robbiejaeger/running-hills-factor/node.js.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/robbiejaeger/running-hills-factor/node.js.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T04:38:49.105Z","repository_id":53098708,"created_at":"2025-08-23T04:38:49.106Z","updated_at":"2025-08-23T04:38:49.106Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32631058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nodejs","npm","running"],"created_at":"2025-01-16T04:48:43.237Z","updated_at":"2026-05-05T00:34:15.619Z","avatar_url":"https://github.com/robbiejaeger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Running Hills Factor\n\n[![Node.js CI](https://github.com/robbiejaeger/running-hills-factor/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/robbiejaeger/running-hills-factor/actions/workflows/node.js.yml)\n\nHow much should a runner factor in the hills for a particular route to alter an expected finish time? Running Hills Factor calculates how much time could be expected to be gained or lost while running due to hills.\n\n### Methodology\n\nFor every percent grade value in a running route, there is a corresponding difference in expected pace per percent grade. For instance, if the route has a 3% incline, then it can be expected that a runner's pace would slow down ~15 seconds per mile per percent grade (45 seconds per mile slower). Similarly, if there is a 2% decline in the route, then it can be expected that a runner's pace would speed up ~8 seconds per mile per percent grade (16 seconds per mile faster).\n\n* Uphill: every % grade incline slows down pace 15 seconds per mile by default (pacing done in minutes per mile)\n* Downhill: every % grade decline increases pace 8 seconds per mile by default (pacing done in minutes per mile)\n\nRunning Hills Factor uses the percent grade to calculate the time gained or lost from each segment of the route provided and sums over the whole distance of the route.\n\n## Getting Started\n\nTo install Running Hills Factor, use the command:\n\n```bash\nnpm install running-hills-factor\n```\n\nExample usage using ES modules:\n\n```js\nimport RunningHillsFactor from 'running-hills-factor';\n\nconst runningHillsFactor = new RunningHillsFactor();\n\nrunningHillsFactor.calculateHillsFactor('./example.gpx')\n  .then(timeDifference =\u003e console.log('Total gained or lost time:', timeDifference))\n  .catch(err =\u003e console.error('Error calculating hills factor:', err));\n```\n\nIf you're using CommonJS modules, then you can bring in the class with:\n\n```js\nconst RunningHillsFactor = require('running-hills-factor');\n\nconst runningHillsFactor = new RunningHillsFactor();\n```\n\nNote: Currently, this package runs with NodeJS versions **14** or greater.\n\n## API Documentation\n\nRunning Hills Factor is designed with a class to be able to create multiple instances of the calculator with different configuration options.\n\nFor example, one instance can be configured for a runner where for every % grade incline, they slow down 12 seconds per mile. Where another instance can represent another runner where for every % grade incline, they slow down 20 seconds per mile.\n\n### class: RunningHillsFactor(options)\n\n* `options` \u003c[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e\n  - `inclineFactor` \u003c[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type)\u003e the number of seconds per mile each % grade incline slows down. _This number should be positive._ Defaults to `15` (seconds).\n  - `declineFactor` \u003c[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type)\u003e the number of seconds per mile each % grade decline speeds up. _This number should be positive._ Defaults to `8` (seconds).\n\nExample `options` usage:\n\n```js\nconst runningHillsFactor = new RunningHillsFactor({inclineFactor: 13, declineFactor: 7});\n```\n\n**RunningHillsFactor.calculateHillsFactor(filepath)**\n\n* `filepath`\u003c[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type)\u003e Filepath to the running course route. Current support is for the [GPX file format](https://en.wikipedia.org/wiki/GPS_Exchange_Format) from [https://onthegomap.com/](https://onthegomap.com/).\n* returns: \u003c[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u003e where the resolved value is the total time gained or lost in seconds, and the rejected value is an error. Time is gained if the resolved value is positive. Time is lost if the resolved value is negative.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbiejaeger%2Frunning-hills-factor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbiejaeger%2Frunning-hills-factor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbiejaeger%2Frunning-hills-factor/lists"}