Helpful People: Ryan Petroff

It’s rare you get help from someone who asks for little in return. Ryan Petroff is one of those people.

I express my gratitude for the many times he has assisted me with my projects.

More than just a person to bounce ideas off of (though great at that), he was instrumental in my earliest days of programming.

Before I had even known that I wanted to pursue data science & automation, the gears had already been set in motion thanks to his help.

I was in university when I found myself in a pickle. I was doing an elective for a 3rd year Geography class, and had asked the professor the easiest way to make a Cartogram.

I am a fan of geographic visualizations, and this was one I wanted to create. The professor said that as a non-geography major, I shouldn’t worry about such difficult tasks. That this was above what I was capable of.

So naturally, I had to create one.

I knew I had the potential to pull off this project, but was without the basic technological literacy to get started.

That professor did not expect someone like Ryan Petroff. An educator who will not only help someone out of generosity, but also inspire them while doing so.

Ryan helped me from the ground up with this project. He helped point me in the right direction at every turn. He found the project amusing. A challenge, but one that could be tackled in a single night. I won’t lie, it was a long night. But one that left a lasting impression. For the first time, I had manipulated data with my own hands.

Fast forward a couple of years. I spoke with Ryan about my interest in ‘data science’. He answered my questions and helped provide me the level of knowledge required to secure a job teaching JavaScript and Python.

As I improved, Ryan would still help me with my projects. When facing an issue, he would often have a fix. But more importantly, he taught self-sufficiency. Each time Ryan helped resolve any issue, he’d walk me through the process used to find the answer from the beginning. During this process of dense skill acquisition, he taught me to think like a programmer, and how to think about code development.

His help in these matters inspired part of my philosophy of automation. Well-designed code frees people from unnecessary work. I have since developed several tools to make tedious tasks in my life disappear. I always consult Ryan when starting a new project.

Even now, as I teach students at the University of Toronto the ins-and-outs of data science, I still remember Ryan’s lessons. I do my best to teach my students the way that Ryan taught me.

So thank you, Ryan Petroff. Your contributions have not gone unnoticed.

Manuscript Wordcounter/Grapher

I’m always looking at ways to make my life easier with code.

Sometimes, it’s through automating a process for myself. Other times, it’s about presenting information that informs my decisions.

This project- a word-counter/visualizer, is a bit of both.

The manuscript writing software I use (Scrivener) is an excellent tool, but the windows edition lacked certain features regarding tracking wordcounts over time.

NanoWriMo, a writing event I had previously participated in, has a wonderful bar graph to track your word-count from day to day.
(This is actually from Camp NanoWriMo, but I don't have a screenshot from the November one)

I wanted a similar tool for my own writing- outside of just November, and outside of just NanoWriMo.

Thus, I wanted my own wordcounter.

Scrivener works by having all of your projects contained in a file-tree environment- where individual files can be grouped into folders, and those folders ultimately into the manuscript at large.

They give you the raw numbers for an individual document, but I wanted to see my progress on a day-by-day basis, so I can track how much I am writing over a course of days, weeks, and months.

There are already existent tools which graph wordcounts- but none that seemed to word between multiple files. Rather than tallying how much word I had done across several documents, I wanted a tool which automatically interprets my wordcount for me, rather than adding it up every time I wanted to record my daily wordcount.

Fortunately, scrivener has a feature that allows you to ‘sync’ your project and back it up as text files. As so:

For windows version

The python tools:

I made three python files for this project, each involved with a separate step.

Wordcounter.py reads the contents of your sync folder, counts the number of words, then stores it to a csv file- along with the date.

This gives me a solid set of records of my wordcount per day (if I run it each day).

As for visualizing the records, Wordgrapher.py takes care of this.

Wordgrapher.py simply reads the contents of the CSV, then creates a bar graph visualizing that wordcount.

I can now tell what my wordcounts were for each day.

There are tons of features & design choices that I will likely add to this tool later. Like my DJ tool, this was mostly designed with my workflow in mind, though may be of use to others.

Now that I have a tool to chart my progress, I just need to keep on writing!