cslarsen / wpm

Typeracer-like console app for measuring your WPM
GNU Affero General Public License v3.0
322 stars 48 forks source link

Add option to graph results #19

Closed slipperypenguin closed 6 years ago

slipperypenguin commented 6 years ago

This is a PR that's not fully complete -- I had a little trouble getting the script to run from the commandline.py file.

What This Does

I wanted to make an option to graph your wpm results in the terminal using command: $ wpm --graph Currently, the graph.py file imports the default wpm data from ~/.wpm.csv, labels the columns, creates a dataframe for the WPM column, and then creates a simple line graph from that data. In the line graph, the x-axis is the index and the y-axis is the WPM. I tried adding colors, but was unable to get it working with the terminal output.

Tools

I looked into a few tools to graph directly in terminal and ended up getting a simple display working with gnuplotlib and pandas libraries.

To-Do

Notes

There definitely can be more features added, but wanted to submit a PR to get the initial setup going (along with some help on getting it to work within wpm 😄) Thoughts, comments, and help are greatly appreciated!

Screenshot

Screenshot of the script in action. The WPM results column is being printed before the graph is generated. screen shot 2018-02-27 at 11 24 59 am

cslarsen commented 6 years ago

Thanks. Respectfully, I don't feel the need for plotting in the terminal right now. I'd rather like to look into producing some good stats on the data. Like, figure out which n-grams that most often break the flow when typing (causing mistypings etc). As for plotting, I already have a project on it at https://github.com/cslarsen/typeracer-stats