{"id":20337330,"url":"https://github.com/expediadotcom/stl-jni","last_synced_at":"2026-02-04T01:02:37.391Z","repository":{"id":87471570,"uuid":"81144191","full_name":"ExpediaDotCom/stl-jni","owner":"ExpediaDotCom","description":"JNI wrapper for the Seasonal-Trend Decomposition Using Loess algorithm.","archived":false,"fork":false,"pushed_at":"2018-02-20T12:16:58.000Z","size":78,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-04T13:47:20.988Z","etag":null,"topics":["anomaly-detection","stl","time-series"],"latest_commit_sha":null,"homepage":null,"language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ExpediaDotCom.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-06T23:24:44.000Z","updated_at":"2018-10-14T02:58:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e906f8f4-6b5d-489b-90dc-f6d6b9cc8ebf","html_url":"https://github.com/ExpediaDotCom/stl-jni","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ExpediaDotCom/stl-jni","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpediaDotCom%2Fstl-jni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpediaDotCom%2Fstl-jni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpediaDotCom%2Fstl-jni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpediaDotCom%2Fstl-jni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExpediaDotCom","download_url":"https://codeload.github.com/ExpediaDotCom/stl-jni/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpediaDotCom%2Fstl-jni/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262936652,"owners_count":23387420,"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":["anomaly-detection","stl","time-series"],"created_at":"2024-11-14T21:08:40.638Z","updated_at":"2026-02-04T01:02:32.364Z","avatar_url":"https://github.com/ExpediaDotCom.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **ServiceNow recently released a [pure-Java STL implementation](https://github.com/ServiceNow/stl-decomp-4j). I haven't tried it out yet, but I'd recommend giving it a shot first. - Willie**\n\n# stl-jni\n\nJava wrapper around the Fortran STL implementation. Uses JNI (Java -\u003e C -\u003e Fortran).\n\n## Building\n\n    $ ./gradlew build\n\nThis builds the Fortran, C and Java code. Note that the build is platform-specific, and currently runs only on a Mac.\nI don't have any current plans to create builds for other platforms (the plan is to implement a pure Java version of\nthe library).\n\n## Uploading to Nexus\n\nFirst, create a `gradle.properties` file (see `gradle.properties.sample`). You'll need to put your Nexus URL and AD\ncredentials in there.\n\nThen\n\n    $ ./gradlew uploadArchives\n\nAfter that I typically remove my password so it's not sitting around in a properties file.\n\n## Making the dynamic lib available to other apps\n\nOn a Mac, put the library here:\n\n    /Library/Java/Extensions/libstl_driver.jnilib\n\n## Running the samples\n\nFirst, make sure you've installed the R [ggplot2](http://ggplot2.org/) package.\n\nThen you can run any of the `run-xxx` scripts in the `samples` directory.\n\n## Run STL from R\n\nIf you want to look at the sample data entirely from R, you can do that too. Here's an example. (Do this from the\n`samples/data` directory.)\n\n~~~ R\nrequests \u003c- read.table(\"eqs-requestper10mins.dat\", head=FALSE)[,1]\nrequests.ts \u003c- ts(requests, frequency=144)\nfit \u003c- stl(requests.ts, \"periodic\")\nplot(fit)\n\nseasonal.ts \u003c- fit$time.series[, \"seasonal\"]\ntrend.ts \u003c- fit$time.series[, \"trend\"]\nfit.ts \u003c- seasonal.ts + trend.ts\n\nlibrary(ggplot2)\ndf \u003c- data.frame(x=seq(1, 3024), y=requests.ts)\nband \u003c- data.frame(x=df$x, ymin=fit.ts-5000, ymax=fit.ts+5000)\nall.data \u003c- merge(df, band, by.x='x')\nggplot(all.data, aes(x=x, y=y)) +\n  theme_bw() +\n  geom_ribbon(aes(x=x, ymin=ymin, ymax=ymax), fill=\"gray\", alpha=0.5) +\n  geom_line(linetype=\"solid\")\n~~~\n\n## Notes\n\nThe log transform fails if there are zeroes in the dataset, for obvious reasons.\n\n## License\n\nSee LICENSE in this directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpediadotcom%2Fstl-jni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpediadotcom%2Fstl-jni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpediadotcom%2Fstl-jni/lists"}