Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abeusher/timehash
An algorithm for creating user configurable, variable-precision sliding windows of time. Useful for binning time values in large collections of data.
https://github.com/abeusher/timehash
bigdata binning c geohash golang hashing hashing-algorithm java perl python time-series timehash
Last synced: 26 days ago
JSON representation
An algorithm for creating user configurable, variable-precision sliding windows of time. Useful for binning time values in large collections of data.
- Host: GitHub
- URL: https://github.com/abeusher/timehash
- Owner: abeusher
- License: other
- Created: 2014-03-22T13:52:22.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2022-11-03T13:29:01.000Z (about 2 years ago)
- Last Synced: 2024-09-30T12:01:19.421Z (about 1 month ago)
- Topics: bigdata, binning, c, geohash, golang, hashing, hashing-algorithm, java, perl, python, time-series, timehash
- Language: C#
- Homepage:
- Size: 1.23 MB
- Stars: 39
- Watchers: 6
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
timehash
========About
-----timehash is an algorithm (with multiple reference implementations) for
calculating variable precision sliding windows of time. When performing
aggregations and correlations on large-scale data sets, the ability to
convert precise time values into 'malleable intervals' allows for many
novel analytics.Using `sliding windows of
time `__
is a common practice in data analysis but prior to the timehash
algorithm it was more of an art than a science... image:: timehash-shaded-partial.png
Features
--------- convert epoch miliseconds into an interval of time, depicted by an
ASCII character 'hash' (a 'timehash')
- timehash values are well suited to referencing time intervals in
key-value stores (e.g. Hbase, Acculumo, Redis)
- The creation of a compound key of space and time (e.g.
geohash\_timehash) is a powerful primitive for understanding
geotemporal patternsImplementations
---------------- `python
timehash `__
- a reference implementation in pure python
- `perl
timehash `__
- a reference implementation in perl
- `java
timehash `__
- a reference implementation in java
- `javascript
time-hash `__
- port of reference implements
- `golang
timehash `__
- a reference implementation in GoUsage
-----Example of calculating a timehash value in python:
.. code:: python
import timehash
import timerightnow = time.time()
rightnow60 = rightnow + 60.0rightnow_hash = timehash.encode(rightnow, precision=10)
rightnow60_hash = timehash.encode(rightnow60, precision=10)print 'timehash of right now: %s' % rightnow_hash
print 'timehash of now +60s: %s'% rightnow60_hash
% timehash of right now: ae0f0ba1fc
% timehash of now +60s: ae0f0baa1cLicense
-------`Modified BSD
License `__Contact
-------- TimeHash Guru: `AbeUsher `__
- Python Packager: `Kevin Dwyer / @pheared `__
- Golang implementation: `Justin Shelton / @kwonstant `__
- Javascript implementation: `Eric Xanderson `__
- Rust implementation: `Kevin Dwyer / @pheared `_
- C implementation `Sam Mason `_
- C# implementation `Sam Mason `_