Giter VIP home page Giter VIP logo

gann-square's Introduction

Gann Square

Tool to build date-based Gann square.

example.svg

Features

  • Large sizes

  • Despite of regular usage in economic sphere, this program could also provide the date sequence instead of numbers. It allows to analyze the distribution of important dates.

  • Visualization support (basic Gann visualization and cells highlighting)

How to use

To build classic Gann square:

python gann.py -o <output file name> -s <square size>

<square size> is a number of cells on each axis

To build Gann square based on date:

python gann.py -o <output file name> -a <base date> -b <final date> -m <path to list of dates to mark>

Input date format: "dd/MM/yyyy"
To highlight cells provide .json file with structure:

[
    {
        "description": "<description>",
        "color": "<color>",
        "data_path": "<path to dates>"
    },
    {
        "description": "<description>",
        "color": "<color>",
        "data_path": "<path to dates>"
    }
]

<path to dates> should be replaced with a path to .txt file with dates to highlight.
Format:

<date1>  
<date2>  
...

To avoid performance issues it is recommended to build large square by chunks.
Each cell can be determined only by its position and previous cells are not required.

To build Gann sub square based on date:

python gann.py -o <output file name> -a <base date> -b <final date> -m <path to list of dates to mark> -r "<left>;<bottom>;<right>;<up>"

Gann square has the following coordinate system inside the program:

 ____ ____ ____
|-1 1|0  1|1  1|
|-1 0|0  0|1  0|
|-1-1|0 -1|1 -1|

So when you specify -r "-5;-5;5;5", that will cut the center square with size: 11x11.

Example

Run cmd:

$ python gann.py -o "example/proton-m-launches.svg" -a "07/04/2001" -b "19/03/2015" -m "example/data.json"

proton-m-launches.html will show you successful and unsuccessful launches of 'Proton-M' for the last 14 years.

Requirements

  • Python 3

LICENSE

This project is licensed under the terms of the MIT license. (see LICENSE.txt in the root)

gann-square's People

Contributors

galarius avatar

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.