What do you want now? (Request extensions here)

It actually would be handy to have a script that dumped the whole database to a series of excel tables, so I could do my own PowerQuery/PowerPivot crosstab and graph making magic. I’ve put off learning how to pull all that with the pagination in the API because I just don’t ever have the time.

2 Likes

Alright, sounds great! I will probably, when my current review nightmare is over, look into the API myself, but for the time being I’ll wait and see what you’ve got going on :slight_smile:

Well it looks like I don’t have day of the week, but I do have hour of the day.

wkof.include('Apiv2');
wkof.ready('Apiv2').then(fetch_data).then(process_data);
function fetch_data() {
        return wkof.Apiv2.fetch_endpoint('/reviews');
}
function process_data(json) {
        let stages = ['Lessons', 'Apprentice 1', 'Apprentice 2', 'Apprentice 3', 'Apprentice 4', 'Guru 1', 'Guru 2', 'Master', 'Enlightened'];
        let reviews = json.data;
        let hourCount = new Array(12).fill(0);
        let hourCorrect = new Array(12).fill(0);
        reviews.forEach(review => {
                let hour = new Date(review.data.created_at).getHours();
                let bin = Math.floor(hour/2);
                hourCount[bin]++;
                if (review.data.ending_srs_stage > review.data.starting_srs_stage) {
                        hourCorrect[bin]++;
                }
        });
        let output = ['Accuracy:'];
        for (let i=0; i<12; i++) {
                let time = ('0'+(i*2)).slice(-2)+':00 - '+('0'+((i+1)*2)).slice(-2)+':00';
                if (hourCount[i] > 0) {
                        output.push('  '+time+': '+(hourCorrect[i] / hourCount[i] * 100).toFixed(2)+'%'+' ('+hourCount[i]+')');
                } else {
                        output.push('  '+time+': ---');
                }
        }
        console.log(output.join('\n'));
}

If you cut and paste it into the javascript console you should get something like:

Accuracy:
  00:00 - 02:00: 89.77% (2180)
  02:00 - 04:00: 91.78% (937)
  04:00 - 06:00: 89.24% (474)
  06:00 - 08:00: 84.58% (694)
  08:00 - 10:00: 88.79% (2275)
  10:00 - 12:00: 90.58% (5065)
  12:00 - 14:00: 88.80% (4438)
  14:00 - 16:00: 90.49% (4015)
  16:00 - 18:00: 89.23% (5527)
  18:00 - 20:00: 89.86% (10681)
  20:00 - 22:00: 89.26% (12359)
  22:00 - 24:00: 88.42% (7133)


Credit: originally from user rfindley, I believe, or substantially so and slightly modified.

3 Likes

Wouldn’t be that hard to modify it again to use getDay() instead of getHours(), same concept but you’d have to revise the sorting bins and output too.

First whack at the day of the week grouping,

wkof.include('Apiv2');
wkof.ready('Apiv2').then(fetch_data).then(process_data);
function fetch_data() {
        return wkof.Apiv2.fetch_endpoint('/reviews');
}
function process_data(json) {
        let stages = ['Lessons', 'Apprentice 1', 'Apprentice 2', 'Apprentice 3', 'Apprentice 4', 'Guru 1', 'Guru 2', 'Master', 'Enlightened'];
        let reviews = json.data;
        let dayCount = new Array(7).fill(0);
        let dayCorrect = new Array(7).fill(0);
        reviews.forEach(review => {
                let dayDone = new Date(review.data.created_at).getDay();
                dayCount[dayDone]++;
                if (review.data.ending_srs_stage > review.data.starting_srs_stage) {            
                        dayCorrect[dayDone]++;
                }       
        });     
        let output = ['Accuracy:'];
        let weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
        for (let i=0; i<7; i++) {
                let dayName  = weekdays[i];
                if (dayCount[i] > 0) {
                        output.push('  '+dayName+': '+(dayCorrect[i] / dayCount[i] * 100).toFixed(2)+'%'+' ('+dayCount[i]+')');
                } else {
                        output.push('  '+dayName+': ---');
                } 
        }               
        console.log(output.join('\n'));
}       

3 Likes

Nice scripts! These took me quite exactly 2 minutes to complete though with ~90k reviews on my account (fetching of review data).
I find the time of day more interesting actually.

Accuracy:
Sunday: 86.15% (14143)
Monday: 87.88% (15053)
Tuesday: 89.09% (11746)
Wednesday: 88.18% (11333)
Thursday: 89.11% (12391)
Friday: 88.80% (11976)
Saturday: 87.42% (14392)

Guess i’m taking it easy on Sundays (though nothing too significant)

Accuracy:
00:00 - 02:00: 88.99% (14500)
02:00 - 04:00: 86.43% (11713)
04:00 - 06:00: 80.77% (7581)
06:00 - 08:00: 82.95% (4969)
08:00 - 10:00: 91.46% (2365)
10:00 - 12:00: 93.91% (4283)
12:00 - 14:00: 92.05% (6502)
14:00 - 16:00: 89.60% (6786)
16:00 - 18:00: 88.13% (7260)
18:00 - 20:00: 86.97% (8095)
20:00 - 22:00: 89.13% (8322)
22:00 - 24:00: 89.56% (8658)

lesson: don’t do reviews at 4am :wink:

2 Likes

Excellent, thanks so much!

00:00 - 02:00: 84.81% (11963)
02:00 - 04:00: 88.38% (551)
04:00 - 06:00: 96.52% (115)
06:00 - 08:00: 92.59% (783)
08:00 - 10:00: 90.80% (3468)
10:00 - 12:00: 91.45% (4446)
12:00 - 14:00: 88.97% (4024)
14:00 - 16:00: 89.06% (6672)
16:00 - 18:00: 90.04% (2138)
18:00 - 20:00: 86.08% (2004)
20:00 - 22:00: 85.59% (11450)
22:00 - 24:00: 85.28% (44188)

I should get up earlier to do reviews :sweat_smile:

Accuracy:
Sunday: 85.34% (12678)
Monday: 86.49% (13776)
Tuesday: 86.70% (13651)
Wednesday: 86.50% (12832)
Thursday: 85.98% (12800)
Friday: 86.21% (12520)
Saturday: 87.63% (13545)

Hmm, that’s less variation than I thought. But at least it peaks on saturday which was kind of what I was feeling going on as well.

2 Likes

I would like to see all my apprentice items on the dashboard. Similar to the display of radicals and kanji of the current level, but with the possibility add apprentice items (including vocab) from all previous levels.

(Sorry if something like this already exists and I haven’t seen it.)

I don’t know of any scripts that would add them to the dashboard, but if you’d mainly like to see them, you can do so at www.wkstats.com - just give the site a (read-only) API token and then you can arrange the WK items in almost any way you want to :slight_smile:

You can filter to show just apprentice items in Item Inspector.

2 Likes

Thanks for the suggestion. I am already frequently using wkstats. Would just be cool to see the apprentice items each time I open wanikani.

1 Like

This sounds good. Do I need to actively search for the items each time or is the search result always there and updates automatically?

@alucardeck Is there anyway I can do some of these extensions with you? I have written some scripts to fetch and manipulate data from wanikani API according to what I need but I would like to expand my knowledge to web apps. Since you’re doing this as a hobby I thought I can chime in and help out as well and learn in the process.

Please let me know! :clap:t3:

Edit: I failed to see that this is a very old thread. Well, if you are still doing web apps I would still like to help.

Or if anyone else would like to let me know :slight_smile:

4 Likes

Item Inspector remembers the last search criteria and post the most recent results for these criteria. But the update occurs only when the browser is refreshed. This happens automatically after you do your reviews or lessons.

You can configure Item Inspector to be somewhat similar to dashboard apprentice but it can never be identical because Item Inspector has more functionality and the UI needs to accommodate this. If you just want the apprentice items and don’t care about what else Item Inspector can do dashboard apprentice is simpler.

1 Like

Thanks! This is it! Might also check the Item Inspector at some point in future when I have more time, but Dashboard Apprentice has everything I need now :slight_smile:

1 Like

Has anyone maybe made a new version of, or otherwise updated, the lesson cap script? Based on the old anti-burnout script? Mine looks like this, and I miss the nice bar. I’m also not sure if it would actually stop me clicking on start session if I just wasn’t paying attention.

1 Like

I don’t have what you are looking for, but I do have something similar. My “Lesson Lock” script makes it look like you don’t have any lessons if you have too much on your plate already (customizable, but ex more than 100 apprentice items). However, there is no bar, and you can still start a lesson session if you really want to

2 Likes

I would love a built in reverse quiz, like “Here is the English word, what is the Japanese vocabulary.”

Or an audio quiz. “Here is the audio
Pronunciation, what is the Japanese/English vocabulary?”

Lastly, it would be nice to see the conjugations of the verbs and adjectives. Maybe, even a quiz on this.

I know that there are other similar apps, but it would be nice to have it integrated.

Alison

1 Like

KaniWani and KameSame are a lot better for this, but I believe Self-Study Quiz might be able to do it as well, and it’s available as a WK dashboard addon

1 Like