Yet another diversion to keep me from focusing on actually using Anki to learn Russian. I stumbled on the R programming language, a language that focuses on statistical analysis.
Here’s a couple snippets that begin to scratch the surface of what’s possible. Important caveat: I’m an R novice at best. There are probably much better ways of doing some of this…
Counting notes with a particular model type
Here we’ll use R to do what we did previously with Python.
First load some of the libraries we’ll need:
Next we’ll connect to the database and extract the model information:
# connect to the Anki database
Since the model information is stored as JSON, we’ll need to parse the JSON to build a data frame that we can use to extract the model ID that we’ll need.
names <- c()
Next we’ll extract the model ID (
mid) from this data frame so that we can find all of the notes with that model ID:
verbmid <- as.numeric(as.character(models[models$names=="Русский - глагол","mid"]))
And of course, close the connection to the Anki SQLite database:
As of this writing,
res tells me I have 702 notes with the verb model types (named “Русский - глагол” in my collection.)
Counting hours per month in Anki
Ever wonder how many hours per month you spend reviewing in Anki? Here’s an R program that will grab review time information from the database and plot it for you. I ran across the original idea in this blog post by Gene Dan, but did a little work on the x-axis scale to get it to display correctly.
You should get a plot like this the one at the top of the post.
I’m anxious to learn more about R and apply it to understanding my performance in Anki.