Extracting intervals/statistics to comemorate 1000 day streak

This is a crosspost from r/Anki

I’m due to reach my 1000 day streak this year and want to comemorate this feat with some nice graphs that I’m going to print out and frame.

My first idea is to have a nice big graph that shows the interval of individual cards as time progresses, so I could follow each individual card on the graph. I’d add some simple graphics like daily load/time spent.
In principle that’s pretty simple to do, but I don’t know of a way to export this sort of statistical data from anki into a usable form.

Any ideas?

Thanks!

EDIT:
I managed to access the relevant information using an SQL Broweser, now I just need to learn to export the relevant data and display it in a way :slight_smile:

1 Like

Your review data exist in the revlog table. Here are some notes about the database structure: Database Structure · ankidroid/Anki-Android Wiki · GitHub

SQL browser probably allows you to export to .csv which you can then import in Excel for analysis.

Alternatively since the db is simply a sqlite database you can access it directly via Python using the sqlite package. Then you have all tools in Python (eg. matplotlib, numpy, pandas) at disposal for analysing the data which may be more flexible, but also more complicated. Something like this:

import sqlite3

con = sqlite3.connect("collection.anki2")
cur = con.cursor()

cur.execute("""SELECT * FROM revlog""")

revlog = cur.fetchall()

print(revlog)
1 Like

There are also some docs here: Statistics - Anki Manual

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.