{"id":13468550,"url":"https://github.com/google/temporian","last_synced_at":"2025-10-03T12:02:38.676Z","repository":{"id":65513317,"uuid":"590126294","full_name":"google/temporian","owner":"google","description":"Temporian is an open-source Python library for preprocessing ⚡ and feature engineering 🛠 temporal data 📈 for machine learning applications 🤖","archived":false,"fork":false,"pushed_at":"2024-07-25T07:55:34.000Z","size":60816,"stargazers_count":691,"open_issues_count":35,"forks_count":45,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-08T20:07:48.107Z","etag":null,"topics":["cpp","feature-engineering","python","temporal-data","time-series"],"latest_commit_sha":null,"homepage":"https://temporian.readthedocs.io","language":"Python","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/google.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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}},"created_at":"2023-01-17T18:00:40.000Z","updated_at":"2025-04-01T14:16:47.000Z","dependencies_parsed_at":"2023-10-11T18:16:01.312Z","dependency_job_id":"19c3e6b3-9ad4-4449-b01a-de5c8439f1bf","html_url":"https://github.com/google/temporian","commit_stats":{"total_commits":297,"total_committers":8,"mean_commits":37.125,"dds":0.6060606060606061,"last_synced_commit":"d867f2fa1b2d3f877dfece4b00818bd4fae80abb"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Ftemporian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Ftemporian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Ftemporian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Ftemporian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/temporian/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247921725,"owners_count":21018651,"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":["cpp","feature-engineering","python","temporal-data","time-series"],"created_at":"2024-07-31T15:01:13.327Z","updated_at":"2025-10-03T12:02:31.627Z","avatar_url":"https://github.com/google.png","language":"Python","funding_links":[],"categories":["Python","Time Series","📦 Packages"],"sub_categories":["Python"],"readme":"\u003cimg src=\"https://github.com/google/temporian/raw/main/docs/src/assets/banner.png\" width=\"100%\" alt=\"Temporian logo\"\u003e\n\n[![pypi](https://img.shields.io/pypi/v/temporian?color=blue)](https://pypi.org/project/temporian/)\n[![docs](https://readthedocs.org/projects/temporian/badge/?version=stable)](https://temporian.readthedocs.io/en/stable/?badge=stable)\n![tests](https://github.com/google/temporian/actions/workflows/test.yaml/badge.svg)\n![formatting](https://github.com/google/temporian/actions/workflows/formatting.yaml/badge.svg)\n![publish](https://github.com/google/temporian/actions/workflows/publish.yaml/badge.svg)\n\n**Temporian** is a library for **safe**, **simple** and **efficient** preprocessing and feature engineering of temporal data in Python. Temporian supports multivariate time-series, multivariate time-sequences, event logs, and cross-source event streams.\n\nTemporian is to [temporal data](https://temporian.readthedocs.io/en/stable/user_guide/#what-is-temporal-data) what Pandas is to tabular data.\n\n## Key features\n\n- **Supports most types of temporal data** 📈: Handles both uniformly sampled and\n  non-uniformly sampled data, both single-variate and multivariate data, both flat\n  and multi-index data, and both mono-source and multi-source non-synchronized\n  events.\n\n- **Optimized for Temporal data** 🔥: Temporian's core computation is\n  implemented in C++ and optimized for temporal data. Temporian can be more than\n  1,000x faster than off-the-shelf data processing libraries when operating on\n  temporal data.\n\n- **Easy to integrate into an existing ML ecosystem**: Temporian does not perform any ML model training - instead it integrates seamlessly with any ML library, such as PyTorch, Scikit-Learn, Jax, TensorFlow, XGBoost, or Yggdrasil Decision Forests.\n\n- **Prevents unwanted future leakage** 😰: Unless explicitly specified with\n  `tp.leak`, feature computation cannot depend on future data, thereby preventing\n  unwanted, hard-to-debug, and potentially costly future leakage.\n\n\u003c!--\n- **Iterative and interactive development** 📊: Users can easily analyze\n  temporal data and visualize results in real-time with iterative tools like\n  notebooks. When prototyping, users can iteratively preprocess, analyze, and\n  visualize temporal data in real-time with notebooks. In production, users\n  can easily reuse, apply, and scale these implementations to larger datasets.\n\n- **Flexible runtime** ☁️: Temporian programs can run seamlessly in-process in\n  Python, on large datasets using [Apache Beam](https://beam.apache.org/).\n--\u003e\n\n## Quickstart\n\n### Installation\n\nInstall Temporian from [PyPI](https://pypi.org/project/temporian/) with `pip`:\n\n```shell\npip install temporian -U\n```\n\nTemporian is currently available for Linux and MacOS (ARM and Intel). Windows support is under development.\n\n### Minimal example\n\nConsider sale records that contain contain the `timestamp`, `store`, and `revenue` of individual sales.\n\n```shell\n$ cat sales.csv\ntimestamp,store,revenue\n2023-12-04 21:21:05,STORE_31,5071\n2023-11-08 17:14:38,STORE_4,1571\n2023-11-29 21:44:46,STORE_49,6101\n2023-12-20 18:17:14,STORE_18,4499\n2023-12-15 10:55:09,STORE_2,6666\n...\n```\n\nOur goal is to compute the sum of revenue for each store at 11 pm every weekday (excluding weekends).\n\nFirst, we load the data and list the workdays.\n\n```python\nimport temporian as tp\n\n# Load sale transactions\nsales = tp.from_csv(\"sales.csv\")\n\n# Index sales per store\nsales_per_store = sales.add_index(\"store\")\n\n# List work days\ndays = sales_per_store.tick_calendar(hour=22)\nwork_days = (days.calendar_day_of_week() \u003c= 5).filter()\n\nwork_days.plot(max_num_plots=1)\n```\n\n![](https://github.com/google/temporian/raw/main/docs/src/assets/frontpage_workdays.png)\n\nThen, we sum the daily revenue for each workday and each store.\n\n```python\n# Aggregate revenue per store and per work day\ndaily_revenue = sales_per_store[\"revenue\"].moving_sum(tp.duration.days(1), sampling=work_days).rename(\"daily_revenue\")\n\n# Plot the results\ndaily_revenue.plot(max_num_plots=3)\n```\n\n![](https://github.com/google/temporian/raw/main/docs/src/assets/frontpage_aggregated_revenue.png)\n\nFinally, we can export the result as a Pandas DataFrame for further processing or for consumption by other libraries.\n\n```python\ntp.to_pandas(daily_revenue)\n```\n\n![](https://github.com/google/temporian/raw/main/docs/src/assets/frontpage_pandas.png)\n\nCheck the [Getting Started tutorial](https://temporian.readthedocs.io/en/stable/tutorials/getting_started/) to find out more!\n\n## Next steps\n\nNew users should refer to the [Getting Started](https://temporian.readthedocs.io/en/stable/getting_started/) guide, which provides a\nquick overview of the key concepts and operations of Temporian.\n\nAfter that, visit the [User Guide](https://temporian.readthedocs.io/en/stable/user_guide/) for a deep dive into\nthe major concepts, operators, conventions, and practices of Temporian. For a\nhands-on learning experience, work through the [Tutorials](https://temporian.readthedocs.io/en/stable/tutorials/) or refer to the [API\nreference](https://temporian.readthedocs.io/en/stable/reference/).\n\nIf you need help, have a question, want to contribute, or just want to be a part of the Temporian community, we encourage you to join our [Discord](https://discord.gg/nT54yATCTy) server! 🤝🏼\n\n## Documentation\n\nThe documentation 📚 is available at [temporian.readthedocs.io](https://temporian.readthedocs.io/en/stable/). The [Getting Started guide](https://temporian.readthedocs.io/en/stable/getting_started/) is the best way to start.\n\n## Contributing\n\nContributions to Temporian are welcome! Check out the [Contributing guide](https://temporian.readthedocs.io/en/stable/contributing/) to get started.\n\n## Credits\n\nTemporian is developed in collaboration between Google and [Tryolabs](https://tryolabs.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Ftemporian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Ftemporian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Ftemporian/lists"}