{"id":32156595,"url":"https://github.com/holgerteichgraeber/timeseriesclustering.jl","last_synced_at":"2026-02-18T22:01:50.898Z","repository":{"id":49894498,"uuid":"149521692","full_name":"holgerteichgraeber/TimeSeriesClustering.jl","owner":"holgerteichgraeber","description":"Julia implementation of unsupervised learning methods for time series datasets. It provides functionality for clustering and aggregating, detecting motifs, and quantifying similarity between time series datasets.","archived":false,"fork":false,"pushed_at":"2021-01-20T11:21:16.000Z","size":179573,"stargazers_count":85,"open_issues_count":18,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-02-17T13:55:01.197Z","etag":null,"topics":["clustering","energy-systems","hierarchical-clustering","julia","k-means-clustering","k-medoids-clustering","optimization","representative-days","time-series-aggregation"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/holgerteichgraeber.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2018-09-19T22:59:26.000Z","updated_at":"2025-12-13T13:11:39.000Z","dependencies_parsed_at":"2022-08-25T17:11:29.417Z","dependency_job_id":null,"html_url":"https://github.com/holgerteichgraeber/TimeSeriesClustering.jl","commit_stats":null,"previous_names":["holgerteichgraeber/clustforopt.jl"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/holgerteichgraeber/TimeSeriesClustering.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holgerteichgraeber%2FTimeSeriesClustering.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holgerteichgraeber%2FTimeSeriesClustering.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holgerteichgraeber%2FTimeSeriesClustering.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holgerteichgraeber%2FTimeSeriesClustering.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holgerteichgraeber","download_url":"https://codeload.github.com/holgerteichgraeber/TimeSeriesClustering.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holgerteichgraeber%2FTimeSeriesClustering.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["clustering","energy-systems","hierarchical-clustering","julia","k-means-clustering","k-medoids-clustering","optimization","representative-days","time-series-aggregation"],"created_at":"2025-10-21T12:34:39.847Z","updated_at":"2026-02-18T22:01:50.892Z","avatar_url":"https://github.com/holgerteichgraeber.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿![TimeSeriesClustering](docs/src/assets/clust_for_opt_text.svg)\n===\n[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://holgerteichgraeber.github.io/TimeSeriesClustering.jl/stable)\n[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://holgerteichgraeber.github.io/TimeSeriesClustering.jl/dev)\n[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE)\n[![Build Status](https://travis-ci.com/holgerteichgraeber/TimeSeriesClustering.jl.svg?token=HRFemjSxM1NBCsbHGNDG\u0026branch=master)](https://travis-ci.com/holgerteichgraeber/TimeSeriesClustering.jl)\n[![codecov](https://codecov.io/gh/holgerteichgraeber/TimeSeriesClustering.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/holgerteichgraeber/TimeSeriesClustering.jl)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.01573/status.svg)](https://doi.org/10.21105/joss.01573)\n\n[TimeSeriesClustering](https://github.com/holgerteichgraeber/TimeSeriesClustering.jl) is a [Julia](https://julialang.org) implementation of unsupervised learning methods for time series datasets. It provides functionality for clustering and aggregating, detecting motifs, and quantifying similarity between time series datasets.\nThe software provides a type system for temporal data, and provides an implementation of the most commonly used clustering methods and extreme value selection methods for temporal data.\nIt provides simple integration of multi-dimensional time-series data (e.g. multiple attributes such as wind availability, solar availability, and electricity demand) in a single aggregation process.\nThe software is applicable to general time series datasets and lends itself well to a multitude of application areas within the field of time series data mining.\n\nThe TimeSeriesClustering package was originally developed to perform time series aggregation for energy systems optimization problems. By reducing the number of time steps used in the optimization model, using representative periods leads to significant reductions in computational complexity of these problems.\nThe package was previously known as `ClustForOpt.jl`.\n\nThe package has three main purposes:\n1) Provide a simple process of finding representative periods (reducing the number of observations) for time-series input data, with implementations of the most commonly used clustering methods and extreme value selection methods.\n2) Provide an interface between representative period data and application (e.g. optimization problem) by having representative period data stored in a generalized type system.\n3) Provide a generalized import feature for time series, where variable names, attributes, and node names are automatically stored and can then be used later when the reduced time series is used in the application at hand (e.g. in the definition of sets of the optimization problem).\n\nIn the domain of energy systems optimization, an example problem that uses TimeSeriesClustering for its input data is the package [CapacityExpansion](https://github.com/YoungFaithful/CapacityExpansion.jl), which implements a scalable generation and transmission capacity expansion problem.\n\nThe TimeSeriesClustering package follows the clustering framework presented in [Teichgraeber and Brandt, 2019](https://doi.org/10.1016/j.apenergy.2019.02.012).\nThe package is actively developed, and new features are continuously added.\nFor a reproducible version of the methods and data of the original paper by [Teichgraeber and Brandt, 2019](https://doi.org/10.1016/j.apenergy.2019.02.012), please refer to [v0.1](https://github.com/holgerteichgraeber/TimeSeriesClustering.jl/tree/v0.1) (including shape based methods such as `k-shape` and `dynamic time warping barycenter averaging`).\n\nThis package is developed by Holger Teichgraeber [@holgerteichgraeber](https://github.com/holgerteichgraeber) and Elias Kuepper [@YoungFaithful](https://github.com/youngfaithful).\n\n## Installation\nThis package runs under julia v1.0 and higher.\nInstall using:\n\n```julia\nimport Pkg\nPkg.add(\"TimeSeriesClustering\")\n```\n\n## Documentation\n[Documentation (Stable)](https://holgerteichgraeber.github.io/TimeSeriesClustering.jl/stable): Please refer to this documentation for details on how to use TimeSeriesClustering the current version of TimeSeriesClustering. This is the documentation of the default version of the package. The default version is on the `master` branch.\n\n[Documentation (Development)](https://holgerteichgraeber.github.io/TimeSeriesClustering.jl/dev): If you like to try the development version of TimeSeriesClustering, please refer to this documentation. The development version is on the `dev` branch.\n\n**See [NEWS](NEWS.md) for significant breaking changes when updating from one version of TimeSeriesClustering to another.**\n\n## Citing TimeSeriesClustering\nIf you find TimeSeriesClustering useful in your work, we kindly request that you cite the following paper ([link](https://doi.org/10.21105/joss.01573)):\n\n```\n  @article{Teichgraeber2019joss,\n  author = {Teichgraeber, Holger and Kuepper, Lucas Elias and Brandt, Adam R},\n  doi = {https://doi.org/10.21105/joss.01573},\n  journal = {Journal of Open Source Software},\n  number = {41},\n  pages = {1573},\n  title = {TimeSeriesClustering : An extensible framework in Julia},\n  volume = {4},\n  year = {2019}\n  }\n```\n\nIf you find this package useful, our [paper](https://doi.org/10.1016/j.apenergy.2019.02.012) on comparing clustering methods for energy systems optimization problems may additionally be of interest.\n\n## Quick Start Guide\n\nThis quick start guide introduces the main concepts of using TimeSeriesClustering. The examples are taken from problems in the domain of scenario reduction for energy systems optimization. For more detail on the different functionalities that TimeSeriesClustering provides, please refer to the subsequent chapters of the documentation or the examples in the [examples](https://github.com/holgerteichgraeber/TimeSeriesClustering.jl/tree/master/examples) folder, specifically [workflow_introduction.jl](https://github.com/holgerteichgraeber/TimeSeriesClustering.jl/blob/master/examples/workflow_introduction.jl).\n\nGenerally, the workflow consists of three steps:\n- load data\n- find representative periods (clustering + extreme period selection)\n- optimization\n\n## Example Workflow\nAfter TimeSeriesClustering is installed, you can use it by saying:\n```@repl workflow\nusing TimeSeriesClustering\n```\n\nThe first step is to load the data. The following example loads hourly wind, solar, and demand data for Germany (1 region) for one year.\n```@repl workflow\nts_input_data = load_timeseries_data(:CEP_GER1)\n```\nThe output `ts_input_data` is a `ClustData` data struct that contains the data and additional information about the data.\n```@repl workflow\nts_input_data.data # a dictionary with the data.\nts_input_data.data[\"wind-germany\"] # the wind data (choose solar, el_demand as other options in this example)\nts_input_data.K # number of periods\n```\n\nThe second step is to cluster the data into representative periods. Here, we use k-means clustering and get 5 representative periods.\n```@repl workflow\nclust_res = run_clust(ts_input_data;method=\"kmeans\",n_clust=5)\nts_clust_data = clust_res.clust_data\n```\nThe `ts_clust_data` is a `ClustData` data struct, this time with clustered data (i.e. less representative periods).\n```@repl workflow\nts_clust_data.data # the clustered data\nts_clust_data.data[\"wind-germany\"] # the wind data. Note the dimensions compared to ts_input_data\nts_clust_data.K # number of periods\n```\n\nIf this package is used in the domain of energy systems optimization, the clustered input data can be used as input to an [optimization problem](https://www.juliaopt.org).\nThe optimization problem formulated in the package [CapacityExpansion](https://github.com/YoungFaithful/CapacityExpansion.jl) can be used with the data clustered in this example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholgerteichgraeber%2Ftimeseriesclustering.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholgerteichgraeber%2Ftimeseriesclustering.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholgerteichgraeber%2Ftimeseriesclustering.jl/lists"}