{"id":15062293,"url":"https://github.com/abeusher/timehash","last_synced_at":"2025-08-19T11:10:42.278Z","repository":{"id":15280980,"uuid":"18010412","full_name":"abeusher/timehash","owner":"abeusher","description":"An algorithm for creating user configurable, variable-precision sliding windows of time.  Useful for binning time values in large collections of data.","archived":false,"fork":false,"pushed_at":"2022-11-03T13:29:01.000Z","size":1285,"stargazers_count":42,"open_issues_count":1,"forks_count":14,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-08T11:39:04.447Z","etag":null,"topics":["bigdata","binning","c","geohash","golang","hashing","hashing-algorithm","java","perl","python","time-series","timehash"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"AdamBrodzinski/meteor-react-boilerplate","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abeusher.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.md","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":"2014-03-22T13:52:22.000Z","updated_at":"2025-03-27T12:44:50.000Z","dependencies_parsed_at":"2023-01-13T18:20:51.896Z","dependency_job_id":null,"html_url":"https://github.com/abeusher/timehash","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeusher%2Ftimehash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeusher%2Ftimehash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeusher%2Ftimehash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeusher%2Ftimehash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abeusher","download_url":"https://codeload.github.com/abeusher/timehash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248233935,"owners_count":21069493,"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":["bigdata","binning","c","geohash","golang","hashing","hashing-algorithm","java","perl","python","time-series","timehash"],"created_at":"2024-09-24T23:33:49.429Z","updated_at":"2025-04-10T14:22:22.807Z","avatar_url":"https://github.com/abeusher.png","language":"C#","readme":"timehash\n========\n\nAbout\n-----\n\ntimehash is an algorithm (with multiple reference implementations) for\ncalculating variable precision sliding windows of time. When performing\naggregations and correlations on large-scale data sets, the ability to\nconvert precise time values into 'malleable intervals' allows for many\nnovel analytics.\n\nUsing `sliding windows of\ntime \u003chttp://stackoverflow.com/questions/19386576/sliding-window-over-time-data-structure-and-garbage-collection\u003e`__\nis a common practice in data analysis but prior to the timehash\nalgorithm it was more of an art than a science.\n\n.. image:: timehash-shaded-partial.png\n\nFeatures\n--------\n\n-  convert epoch miliseconds into an interval of time, depicted by an\n   ASCII character 'hash' (a 'timehash')\n-  timehash values are well suited to referencing time intervals in\n   key-value stores (e.g. Hbase, Acculumo, Redis)\n-  The creation of a compound key of space and time (e.g.\n   geohash\\_timehash) is a powerful primitive for understanding\n   geotemporal patterns\n\nImplementations\n---------------\n\n-  `python\n   timehash \u003chttps://github.com/abeusher/timehash/blob/master/timehash/__init__.py\u003e`__\n   - a reference implementation in pure python\n-  `perl\n   timehash \u003chttps://github.com/abeusher/timehash/blob/master/timehash.pl\u003e`__\n   - a reference implementation in perl\n-  `java\n   timehash \u003chttps://github.com/abeusher/timehash/blob/master/TimeHash.java\u003e`__\n   - a reference implementation in java\n-  `javascript\n   time-hash \u003chttps://github.com/disarticulate/time-hash\u003e`__\n   - port of reference implements\n-  `golang\n   timehash \u003chttps://github.com/abeusher/timehash/blob/master/timehash.go\u003e`__\n   - a reference implementation in Go\n\nUsage\n-----\n\nExample of calculating a timehash value in python:\n\n.. code:: python\n\n    import timehash\n    import time\n\n    rightnow = time.time()\n    rightnow60 = rightnow + 60.0\n\n    rightnow_hash = timehash.encode(rightnow, precision=10)\n    rightnow60_hash = timehash.encode(rightnow60, precision=10)\n\n    print 'timehash of right now: %s' % rightnow_hash\n    print 'timehash of now +60s: %s'% rightnow60_hash\n     \n    % timehash of right now: ae0f0ba1fc\n    % timehash of now +60s: ae0f0baa1c\n\nLicense\n-------\n\n`Modified BSD\nLicense \u003chttp://en.wikipedia.org/wiki/BSD_licenses#3-clause_license_.28.22Revised_BSD_License.22.2C_.22New_BSD_License.22.2C_or_.22Modified_BSD_License.22.29\u003e`__\n\nContact\n-------\n\n- TimeHash Guru: `AbeUsher \u003chttp://www.linkedin.com/in/socialnetworkanalysis\u003e`__\n- Python Packager: `Kevin Dwyer / @pheared \u003chttps://twitter.com/pheared\u003e`__\n- Golang implementation: `Justin Shelton / @kwonstant \u003chttps://twitter.com/kwonstant\u003e`__\n- Javascript implementation: `Eric Xanderson  \u003chttps://github.com/disarticulate\u003e`__\n- Rust implementation: `Kevin Dwyer / @pheared \u003chttps://github.com/dwyerk/timeharsh\u003e`_\n- C implementation `Sam Mason \u003chttps://github.com/ukitake\u003e`_\n- C# implementation `Sam Mason \u003chttps://github.com/ukitake\u003e`_\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeusher%2Ftimehash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabeusher%2Ftimehash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeusher%2Ftimehash/lists"}