income-expense-visualization-pipeline

1.0.1 • Public • Published

income-expense-visualization-pipeline Library

A library that can transforms an array of transactions groups of transactions by period (year-month) and type of transaction and income/expense type.

The transaction array has to have this form:

[
        {
            amount: 1,
            type: 'levy',
            month: 1,
            year: 2019
        }, {
            amount: 2,
            type: 'levy',
            month: 1,
            year: 2019
        },
        {
            amount: 3,
            type: 'levy',
            month: 1,
            year: 2018
        }
]

The resulting

[ {                                                         
    type: 'levy',
    month: 1,
    year: 2018,  
    bucket: '2018-1-revenue',
    expense: 1,
    expensetype: 'expense',
    period: 24217,
    color: '#33FF33',
    total: 3,
    index: 0 }, 
  {
    type: 'levy',
    month: 1,
    year: 2019,
    bucket: '2019-1-revenue',
    expense: 1,
    expensetype: 'expense',
    period: 24229,
    color: '#11FF11',
    total: 3,
    index: 12 } 
]

How to use

npm install income-expense-visualization-pipeline

Readme

Keywords

none

Package Sidebar

Install

npm i income-expense-visualization-pipeline

Repository

gitlab.com/

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

41.7 kB

Total Files

17

Last publish

Collaborators

  • philxceptionale