{"id":34109202,"url":"https://github.com/dwervin/pyhampel","last_synced_at":"2026-04-01T19:18:35.166Z","repository":{"id":62580833,"uuid":"344349233","full_name":"dwervin/pyhampel","owner":"dwervin","description":"Implementation of Hampel filter in Python, including multiprocessor support, and interactive plotting with plotly and IPywidgets.","archived":false,"fork":false,"pushed_at":"2021-03-22T04:51:12.000Z","size":306,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T01:58:43.536Z","etag":null,"topics":["filtering","hampel","interactive-plots","mad","median-absolute-deviation","median-filter","multiprocessor-programming","outlier","rolling-median"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dwervin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-04T04:28:01.000Z","updated_at":"2025-05-20T07:52:41.000Z","dependencies_parsed_at":"2022-11-03T20:50:06.002Z","dependency_job_id":null,"html_url":"https://github.com/dwervin/pyhampel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dwervin/pyhampel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwervin%2Fpyhampel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwervin%2Fpyhampel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwervin%2Fpyhampel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwervin%2Fpyhampel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwervin","download_url":"https://codeload.github.com/dwervin/pyhampel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwervin%2Fpyhampel/sbom","scorecard":{"id":361295,"data":{"date":"2025-08-11","repo":{"name":"github.com/dwervin/pyhampel","commit":"84c3617d5f6f7ee518b45d7bd4856235d7b87617"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"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":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2020-73","Warn: Project is vulnerable to: PYSEC-2013-22 / GHSA-27x4-j476-jp5f","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579"],"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-18T10:54:30.903Z","repository_id":62580833,"created_at":"2025-08-18T10:54:30.903Z","updated_at":"2025-08-18T10:54:30.903Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31036731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T07:48:52.080Z","status":"ssl_error","status_checked_at":"2026-03-27T07:48:19.562Z","response_time":164,"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":["filtering","hampel","interactive-plots","mad","median-absolute-deviation","median-filter","multiprocessor-programming","outlier","rolling-median"],"created_at":"2025-12-14T18:28:06.751Z","updated_at":"2026-04-01T19:18:35.157Z","avatar_url":"https://github.com/dwervin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyhampel\n\nThis package implements Hampel filter for time series data.  \n\u003cbr\u003e\n\n\n### What is a Hampel Filter?\nThe Hampel filter is an algorithm that uses median absolute deviation (MAD) and a sliding window to detect outliers and replace them with rolling median values. \n\n### What Are Uses For Hampel Filters?\n-   Detecting outliers.\n-   Filter noisy data by replacing outliers with median.\n\n\n### How Does it Work?\nFor each point, a median and standard deviation are calculated using all neighboring values within a window of size, w.  If the point of interest lies outside of a specified number of standard deviations from the median it is flagged as an outlier. \n\n\u003cbr\u003e\n\n#### Hampel Filter With Window Centered\n![HampelFilterWindowCentered](img/Slide3a.PNG)\n\n-   For each time step, the median of the points in the window is calculated, resulting in a rolling median set of points.\n-   Also, for each time step, the median absolute deviation is calculated, resulting in a rolling median absolute deviation set of points.\n-   Using a scaling factor to estimate standard deviation based on MAD, we calculate a number of deviations from the rolling median.  If the original point falls outside of the range of the median +/- deviation, then it is an outlier and the filtered value is the rolling median value calculated earlier.\n-   In this particular case, the rolling window is centered on the point being evaluated with points to the left and right of center used in the calculation.\n\n\n\u003cbr\u003e\n\n#### Hampel Filter With Point on Leading Edge\nThis option is more sensitive to changes in value from one period to the next.\n\n![HampelFilterWindowCentered](img/Slide4a.PNG)\n\n-   For each time step, the median of the points in the window is calculated, resulting in a rolling median set of points.\n-   Also, for each time step, the median absolute deviation is calculated, resulting in a rolling median absolute deviation set of points.\n-   Using a scaling factor to estimate standard deviation based on MAD, we calculate a number of deviations from the rolling median.  If the original point falls outside of the range of the median +/- deviation, then it is an outlier and the filtered value is the rolling median value calculated earlier.\n-   In this particular case, the leading edge of the rolling window is on the point being evaluated with points to the left used in the calculation.\n\n\n\n### Window Size and Standard Devation?\nThere is no universal window size or threshold to use.  The window size and threshold will need to be determined based on the characteristics of the data and the application of the Hampel filter.\n\n\n### How do I use it?\n\nInput a dataframe with time series data and pyhampel will generate a new dataframe that adds columns for filtered data, outlier values, and a boolean flag indicating if a data point is an outlier.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwervin%2Fpyhampel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwervin%2Fpyhampel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwervin%2Fpyhampel/lists"}