WaniKani API + Google Docs Awesomeness

Sorry, didn’t notice your post… 

To capture these, you need to add two lines to the script, starting at row 30 of the original version:

  cell.offset(1,8).setValue(doc.user_information.level);
  cell.offset(1,9).setValue(doc.user_information.posts_count);
Don’t forget to add the columns on the actual spreadsheet!
At the moment, I’m not doing anything with that information, not even incorporating it into the graphs or anything, but at some point in the future, with a chunk of daily data, this could add some fun vizualization opportunities.

By the way, and I’m not proud of this, I just checked my spreadsheet and realized I forgot to add the time trigger! So I had my original entry on the 15th and nothing until this very minute. Make sure to do that, otherwise the whole thing is pointless…

eninny said... Sorry, didn't notice your post... 

To capture these, you need to add two lines to the script, starting at row 30 of the original version:
  cell.offset(1,8).setValue(doc.user_information.level);
  cell.offset(1,9).setValue(doc.user_information.posts_count);
Don't forget to add the columns on the actual spreadsheet!
At the moment, I'm not doing anything with that information, not even incorporating it into the graphs or anything, but at some point in the future, with a chunk of daily data, this could add some fun vizualization opportunities.

By the way, and I'm not proud of this, I just checked my spreadsheet and realized I forgot to add the time trigger! So I had my original entry on the 15th and nothing until this very minute. Make sure to do that, otherwise the whole thing is pointless...

 thanks :D

I added a few lines to the script so that it logs your level:

//writes Level to Collumn I
cell.offset(1,8).setValue(level);
//Writes the level to Collumn J for when the level has changed
if(cell.offset(0,8).getValue() - cell.offset(1,8).getValue() ==0){
    cell.offset(1,9).setValue(“”);
  }
  else{
    cell.offset(1,9).setValue(doc.user_information.level);
  }
I then Plotted the apprentice items and the levels on this graph


Because I didn’t have a value for J2 (the 11.9216 value above) I made it the intercept of the trendline with this (rounded to 4 digits):
=round(intercept(J3:J, arrayformula(row(J3:J)-2)), 4)

I know that this topic was dead for over a year now, but I can’t seem to figure out how to do this.

How did you put vertical bars by the level markers. I can’t find any option in the chart settings that enables this feature, some help please :pray:
I’m not asking how to add level data (I have that already), rather I want to know how to add those vertical lines by each level like in the pic I’m replying to.

You need to add it yourself at the end of the data sheet under Notes, and it’ll be added by itself.

Thank you so much!!

Wow this really took off haha. 見てくれてありがとうございます。

I customised it some (added a lot of other api data), but I never would’ve been able to think/do it without your template. Thank you!

This is what happens when you don’t use WK for four months, then come back to find you’ve forgotten a whole bunch :neutral_face:

Hi! I just wanted to say THANK YOU VERY MUCH FOR THIS! I just started, and I love data. So I’m so happy that I can easily track my progress every day. Thank you very much for sharing!

I really like what you’ve done here, only problem is I have no idea about what API’s are or where to get them! Any quick pointers would be appreciated!

You can find your API key on your settings page: https://www.wanikani.com/settings/account

For this script, you’ll want your API v1 key.

Then just follow the instructions in OP

Jeeze looking at this code now… Cell offsets with hardcoded values… I should rewrite it lol

It works! Thanks!

I don’t understand this, I follow exactly the same steps shown in the screenshots, but it still shows the original user’s statistics from 2015, when I started using Wanikani in early August, 2017. Please help, I wanna see my statistics as well, what wrong am I doing :frowning:

If you’re still interested, it still works, but you have to delete the original author’s data first.

1 Like

The time shows up 4 hours ahead, how do I change this? :frowning:

Edit: I went to File > Spreadsheet settings, but the time zone was the right one. Just to try it out, I changed the time zone to a random one, but it didn’t seem to affect the sheet at all.

Everyone is talking about how easy this is, but I somehow managed to do it wrong. Tech illiterate over here.

I’m gonna try again when I’m home lol

I just tried this but when I go to the script editor I get the error “Sorry, unable to open the file at this time.”

Is there a better way to get all my data into a google doc? Thanks!

1 Like

This script is broken. If you faced the issue below, please move to the latest script in the link below:

"Request failed for https://www.wanikani.com returned code 410. Truncated server response: {"code":410,"message":"This endpoint has been removed. Please use our latest API."