Git Product home page Git Product logo

corella's Introduction

corella

Correlation plots on the terminal, for quick and simple insights. Powered by pandas.

Dataset source: FIFA World Cup 2018 Match Stats

Quickstart

Requires Python3. Currently, only CSV files are supported.
The dataset parsing and correlation calculation is all done via pandas.

pip install corella

Usage

Command Line

corella accepts CSV data either through STDIN or as an input file.

cat file.csv | corella or corella --input file.csv

Supported CLI options

--pos-color

Set the color to use for positive correlation. Defaults to light_red
Supported colors include black, red, green, yellow, blue, magenta, cyan, white and light_gray, dark_gray, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan.
Full list of all 256 supported colors can be found at the colored project page.

--neg-color

Set the color to use for negative correlation. Defaults to light_blue

--input

Optional input CSV file. If specified, STDIN is ignored.

--delimiter

The delimiter for the CSV file. Defaults to ,.

--method

The method to use for calculating the correlation coefficient. Defaults to pearson.
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.corr.html

--padding

The character padding to use on the left of the plot. Defaults to 20. If the length of a column name exceeds the specified padding, it is ignored.

--no-header

A flag to specify if the provided input does not have a header. Defaults to False. If specified, column numbers are used as names instead.

Usage within Python

from corella import Corella
C = Corella()
C.draw(pandas_df)

Sample datasets

Two datasets are provided within ./datasets/

  1. The Iris dataset
  2. FIFA World Cup 2018 Match Stats from Kaggle.

Try corella --input datasets/iris.csv --pos-color light_magenta --neg-color blue --padding 30

License

MIT

Thanks

colored

corella's People

Contributors

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