WaniKani API + Google Docs Awesomeness

Amejanai said... If I'm away from the internet for the weekend, or something (camping, for example), will this update, anyway?  Or do I have to be logged into the appropriate google account?  Thanks!
not to worry, the google docs trigger will happily tick away in the cloud whilst you are away doing your thing...

I can’t seem to figure out how to rescale the vertical axis. Anyone know how to do this?

Perfect, thanks :3

If anyone is interested in getting some more information about your progress I have taken Raywes88’s original spreadsheet and modified it to get even more wanikani stats as well as adding a few more pretty graphs to track my progress. Also changed the date format to my liking.

Here is the link if you want to take a closer look:

https://docs.google.com/spreadsheets/d/1rnJ35LOJ1r4Iuz9pTITzpl4L6BBdsDLSgEM76vhrGYw/edit?usp=sharing 

To use it for your own wanikani data follow Raywes88’s original instructions to save and enter your own API key and to add a daily trigger to pull the data in, and then delete my data so it will start adding your own to the sheet and graphs.

Thanks to Raywes88 for the original post as i am not clever enough in these programming arts to have gotten that far alone.

2 Likes
marcsan said... If anyone is interested in getting some more information about your progress I have taken Raywes88's original spreadsheet and modified it to get even more wanikani stats as well as adding a few more pretty graphs to track my progress. Also changed the date format to my liking.

Here is the link if you want to take a closer look:

https://docs.google.com/spreadsheets/d/1rnJ35LOJ1r4Iuz9pTITzpl4L6BBdsDLSgEM76vhrGYw/edit?usp=sharing 

To use it for your own wanikani data follow Raywes88's original instructions to save and enter your own API key and to add a daily trigger to pull the data in, and then delete my data so it will start adding your own to the sheet and graphs.

Thanks to Raywes88 for the original post as i am not clever enough in these programming arts to have gotten that far alone.
 That's a nice update. Thanks.
marcsan said...[such nice stuff]
 Didn't see this till now, but awesome additions :)

Been playing with the Google Chart apis recently to have more control over the output

http://paultraylor.net/charts/wk-reviews.html

[Edit] Should I make a new topic instead?

I have been using this script for almost a year now and I love it.
I recently added some stats:

  • Level changes are on the graphs
  • Study Graphs (for lessons available, reviews available and reviews available next day)
  • Forum Graphs (with posts and topics count)
  • Items left this level graphs
  • Added a second graph of every one of them that only shows the 20 last days (because after almost a year, you can only get the big picture out of the original graph)
Problems:
  • You have to manually add the levels in the P column
  • You have to reorder the data from “Z -> A” in column A (through the little arrow in the column header) every time you want to look at your graphs
I tried to resolve those two problems but was unsuccessful. If someone finds a solution, please let me know!







Follow the instructions from @Raywess88 but with this google sheet instead https://docs.google.com/spreadsheets/d/1kFU8osyRyLn7lmc3LCsfA_Ek_G8QSQzD02t623CNQaM/edit?usp=sharing

Please note that you must enter your API key at the four places indicated in the script (image outdated) : 



*** For those of you that already use this script. You can copy this sheet to your drive, then copy your data from your old sheet into this one.

1 Like

On my old script I didn’t have to reorder from Z->A.
When I pasted my data in, the graphs zoomed to the same levels so I have two sets of graphics that display the same data.

I get file error when I try to click on your link, and the screen always freezes white when I try and create a new spreadsheet. Maybe some of my scripts mess with google docs or something, but that seems unlikely.

I just tried opening my link on 2 different browsers and on 2 different computers. It works fine.
I also tried the original poster’s link and it works too, in case it was his link you were talking about.
:confused:

JacobW said... I get file error when I try to click on your link, and the screen always freezes white when I try and create a new spreadsheet. Maybe some of my scripts mess with google docs or something, but that seems unlikely.
 I get issues trying to open it w/ tapermonkey running. maybe that is it?

Oh, I didn’t know you could do these kind of things (scripting and pulling data from external sources) with google spreadsheets. I should have known about this 2-3 years ago, then I would definitely had done an approach like this instead of doing a python script that I run manually once per week to get a graph like this:



YAY! This is so cool!

@Sirvorn: Thanks for linking this in another thread!
@RayWes88: Thanks for creating/sharing!!!

I am starting as of today, at level 8. Can’t wait to see my progress as the chart builds. :) There should be a nod to this kind of progress tracker in the newbie info so people can start right away. (Apologies if there is… I might have just skimmed and/or not actually read the newbie info). I would have loved to do this from the very beginning!  But, I’m happy I found it pretty early.  XD 

Been meaning to try this for a while. 
Made a couple modifications to capture level and post counts (just for shits and giggles) on script run. Will look to chart separately from Google Docs when I’ve got a moment…

Thanks to original poster who doesn’t seem to be with us anymore.

eninny said... Been meaning to try this for a while. 
Made a couple modifications to capture level and post counts (just for shits and giggles) on script run. Will look to chart separately from Google Docs when I've got a moment...

Thanks to original poster who doesn't seem to be with us anymore.
 That is actually really nice, even if its just for shits and giggles :P
I'd really like to know how i could add that to the script. 
Please enlighten us, as i's sure there are more that would like to add this...
Thanks in advance xD

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.