Git Product home page Git Product logo

timehash's Introduction

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.

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 patterns

Implementations

Usage

Example of calculating a timehash value in python:

import timehash
import time

rightnow = time.time()
rightnow60 = rightnow + 60.0

rightnow_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: ae0f0baa1c

License

Modified BSD License

Contact

timehash's People

Contributors

abeusher avatar disarticulate avatar dwyerk avatar eahlberg avatar mdwulit avatar oxhacks avatar ukitake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

timehash's Issues

Distribution/ release files

I w'd like to bring timehash to the Anaconda community under the conda-forge channel.
Is there any plan to release a tarball file any time soon?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.