{"id":35830177,"url":"https://github.com/neaps/neaps","last_synced_at":"2026-01-13T20:52:32.720Z","repository":{"id":35614623,"uuid":"211738973","full_name":"neaps/neaps","owner":"neaps","description":"Javascript tide predictor","archived":false,"fork":false,"pushed_at":"2026-01-10T14:27:12.000Z","size":1745,"stargazers_count":23,"open_issues_count":4,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-11T04:06:32.367Z","etag":null,"topics":["oceans","tides"],"latest_commit_sha":null,"homepage":"https://neaps.js.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neaps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-29T23:24:23.000Z","updated_at":"2026-01-10T13:16:37.000Z","dependencies_parsed_at":"2023-02-14T14:01:04.613Z","dependency_job_id":null,"html_url":"https://github.com/neaps/neaps","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/neaps/neaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neaps%2Fneaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neaps%2Fneaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neaps%2Fneaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neaps%2Fneaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neaps","download_url":"https://codeload.github.com/neaps/neaps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neaps%2Fneaps/sbom","scorecard":{"id":677985,"data":{"date":"2025-08-11","repo":{"name":"github.com/neaps/tide-predictor","commit":"d4c87d91bb13dad56cd72a9f875ac50c37007dac"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/neaps/tide-predictor/test.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:13","Warn: npmCommand not pinned by hash: .github/workflows/test.yml:16","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   3 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T22:09:36.533Z","repository_id":35614623,"created_at":"2025-08-21T22:09:36.533Z","updated_at":"2025-08-21T22:09:36.533Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["oceans","tides"],"created_at":"2026-01-07T22:11:04.768Z","updated_at":"2026-01-13T20:52:32.713Z","avatar_url":"https://github.com/neaps.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![example workflow](https://github.com/neaps/neaps/actions/workflows/test.yml/badge.svg) [![codecov](https://codecov.io/gh/neaps/neaps/branch/main/graph/badge.svg?token=KEJK5NQR5H)](https://codecov.io/gh/neaps/neaps)\n\n# Neaps\n\nA tide prediction engine written in TypeScript.\n\n\u003e [!WARNING]\n\u003e **Not for navigational use**\n\u003e\n\u003e Do not use calculations from this project for navigation, or depend on them in any situation where inaccuracies could result in harm to a person or property. Tide predictions are only as good as the harmonics data available, and these can be inconsistent and vary widely based on the accuracy of the source data and local conditions. The tide predictions do not factor events such as storm surge, wind waves, uplift, tsunamis, or sadly, climate change. 😢\n\n## Installation\n\n```sh\nnpm install neaps\n```\n\n## Usage\n\n### Tide Extremes Prediction\n\n```typescript\nimport { getExtremesPrediction } from \"neaps\";\n\nconst prediction = getExtremesPrediction({\n  latitude: 26.7, // or `lat`\n  longitude: -80.05, // or `lng` or `lon`\n  start: new Date(\"2025-12-17\"),\n  end: new Date(\"2025-12-18\"),\n  datum: \"MLLW\", // optional, defaults to MLLW if available\n  units: \"meters\", // optional, defaults to 'meters', can also be 'feet'\n});\n\nconsole.log(prediction);\n// {\n//   datum: 'MLLW',\n//   units: 'meters',\n//   station: {\n//     id: '8723214',\n//     name: 'Fort Lauderdale, FL',\n//     // ...\n//   },\n//   distance: 12.3,\n//   extremes: [\n//     { time: 2019-01-01T03:12:00.000Z, level: 3.2, high: true, low: false, label: 'High' },\n//     { time: 2019-01-01T09:45:00.000Z, level: 0.5, high: false, low: true, label: 'Low' },\n//   ]\n// }\n```\n\n### Get Timeline Prediction\n\n```typescript\nimport { getTimelinePrediction } from \"neaps\";\n\nconst timeline = getTimelinePrediction({\n  lat: 26.77,\n  lon: -80.05,\n  start: new Date(\"2025-12-19T00:00:00-05:00\"),\n  end: new Date(\"2025-12-19T01:00:00-05:00\"),\n  timeFidelity: 5 * 60, // seconds, defaults to `10 * 60`\n  units: \"meters\", // optional, defaults to 'meters', can also be 'feet'\n});\n\nconsole.log(timeline);\n// {\n//   datum: 'MLLW',\n//   units: 'meters',\n//   station: {\n//     id: 'noaa/8722588',\n//     name: 'Port of Palm Beach',\n//     // ...\n//   },\n//   timeline: [\n//     { time: 2025-12-19T05:00:00.000Z, hour: 0, level: 0.7232836255650095 },\n//     { time: 2025-12-19T05:06:00.000Z, hour: 0.1, level: 0.7231644154595303 },\n//     { time: 2025-12-19T05:12:00.000Z, hour: 0.2, level: 0.7221097788490487 },\n//     { time: 2025-12-19T05:18:00.000Z, hour: 0.3, level: 0.7201242512580206 },\n//     // ...\n//   ]\n// }\n```\n\n### Get Water Level at Specific Time\n\n```typescript\nimport { getWaterLevelAtTime } from \"neaps\";\n\nconst prediction = getWaterLevelAtTime({\n  lat: 26.77,\n  lon: -80.05,\n  time: new Date(\"2025-12-19T00:30:00-05:00\"),\n  datum: \"MSL\",\n  units: \"meters\", // optional, defaults to 'meters', can also be 'feet'\n});\n\nconsole.log(prediction);\n// {\n//   datum: 'MSL',\n//   units: 'meters',\n//   station: {\n//     id: 'noaa/8722588',\n//     name: 'Port of Palm Beach',\n//     // ...\n//   },\n//   time: 2025-12-19T05:30:00.000Z,\n//   hour: 0,\n//   level: -0.43840585181640557\n// }\n```\n\n### Finding stations\n\nNeaps uses [@neaps/tide-database](https://github.com/neaps/tide-database) to find station data. You can find stations by location or ID.\n\n#### Nearest Station\n\n```typescript\nimport { nearestStation } from \"neaps\";\n\nconst station = nearestStation({ lat: 26.7, lon: -80.05 });\nconsole.log(`${station.name} (${station.source.id})`); // Fort Lauderdale, FL (8722588)\n```\n\nOnce you've found a station, you can get predictions, timeline, or water level at a specific time for that station:\n\n```typescript\n// Get extremes prediction for the nearest station\nstation.getExtremesPrediction({\n  start: new Date(\"2025-12-17\"),\n  end: new Date(\"2025-12-18\"),\n});\n\n// Get timeline prediction for the nearest station\nstation.getTimelinePrediction({\n  start: new Date(\"2025-12-19\"),\n  end: new Date(\"2025-12-20\"),\n});\n\n// Get timeline prediction for the nearest station\nstation.getWaterLevelAt({ time: new Date(\"2025-12-19T00:30:00-00:00\") });\n```\n\n#### List Nearby Stations\n\n```typescript\nimport { stationsNear } from \"neaps\";\n\nstationsNear({ latitude: 45.6, longitude: -122.7 }, 5).forEach((s) =\u003e {\n  console.log(`${s.name} (${s.source.id}) - ${(s.distance / 1000).toFixed(2)} km away`);\n});\n// Vancouver (9440083) - 3.49 km away\n// Portland Morrison Street Bridge (9439221) - 10.24 km away\n// KNAPP(THORNES)LNDG, WILLOW BAR (9440171) - 16.34 km away\n// Rocky Point (9439189) - 16.93 km away\n// WASHOUGAL, COLUMBIA RIVER (9440047) - 24.89 km away\n```\n\n#### Find station by ID\n\n```typescript\nimport { findStation } from \"neaps\";\n\n// Find station by Neaps ID\nfindStation(\"noaa/8443970\"); // Boston\n\n// Find station by source ID (e.g. NOAA)\nfindStation(\"9440083\"); // Vancouver\n```\n\n## Accuracy \u0026 Validation\n\nNeaps is continuously validated against NOAA tidal predictions, comparing the **time** and **height** of predicted high and low tides for all NOAA tide stations.\n\n### Methodology\n\n- Recent High/low predictions extracted from both NOAA and Neaps for 3300+ NOAA reference and subordinate stations\n- One-to-one event matching using a ±180-minute window\n- Metrics computed per station and aggregated across all stations\n- Evaluated automatically in CI on every change\n\n### Results\n\nAs of Dec 2025:\n\n- **Stations evaluated:** 3,363\n- **High/low events compared:** 36,990\n- **Median |Δt|:** 3.5 minutes\n- **95% of stations** have median |Δt| \u003c **13.5 minutes**\n- **Median MAE:** 1.1 cm\n- **95% of stations** have MAE \u003c 4.5 cm\n\n### Summary\n\nNeaps reproduces high and low tide timing with **minute-level accuracy** and tide heights with **centimeter-level accuracy** compared to NOAA's tide predictions. Validation is automated and enforced in CI to prevent regressions as the model evolves.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneaps%2Fneaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneaps%2Fneaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneaps%2Fneaps/lists"}