Code Monkey home page Code Monkey logo

sum-columns's Introduction

Sum columns - Quickly sum all values in column

This is a small javascript tool that only does one simple thing: sum values in a given column of data.

There are an infinite number of ways to do this, of course, but I got tired of firing up calculators, command-lines, or spreadsheet software when I already have a browser window open.

Supported features

  • Live search (results update as you type)
  • Works offline (just clone or download this repository and open index.html in any browser)
  • Online demo available
  • Display total number of values summed (useful for calculating averages)
  • Advanced options: specify field separator and field to sum

Usage

Enter data in the Input box. All non-numeric data is stripped and the values to be summed are shown in the Sum values column on the right.

screenshot

Click the Calculate sum button to update the result field at the bottom of the page.

Advanced options

The advanced options are revealed by clicking the corresponding checkbox below the result field.

Two options can be specified: Field separator and Field to sum.

Entering a character or string in the Field separator box identifies it as a delimiter, and the text in the Input box will be split into columns wherever this delimiter occurs. For example, the Field separator is initially set to \t by default, which means that columns will be separated by tabs. Setting the Field separator to , would split the input text at commas.

The value in the Field to sum box should specify the number of the column to summed after the input data has been split by the string in the Field separator box. So, for example, the initial value of 2 means that the values in the second column would be used. This can be useful if you have several columns of data and only want to sum one of them (as in a spreadsheet program).

See also

"Sum columns" is part of the tiny tools series.

Other small tools for working with columns of data that might also be of interest:

Credits

License

MIT.

sum-columns's People

Contributors

dohliam avatar

Watchers

 avatar  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.