# \[Unsupported\] Progress Chart Script

**URL:** <https://community.wanikani.com/t/unsupported-progress-chart-script/20735>\
**Category:** API And Third-Party Apps\
**Created:** [October 23, 2017, 7:21am UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735 "2017-10-23T07:21:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hitechbunny](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/hitechbunny/32/70848_2.png) [@hitechbunny](https://community.wanikani.com/u/hitechbunny)\
**Post date:** [October 23, 2017, 7:21am UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/1 "2017-10-23T07:21:03Z")

</div>

I’ve published this script as “Progress Chart” which you can install via the [https://community.wanikani.com/t/app-store-script/20709[.](https://greasyfork.org/en/scripts/35929-wanikani-progress-chart)](https://community.wanikani.com/t/app-store-script/20709%5B.%5D(https://greasyfork.org/en/scripts/35929-wanikani-progress-chart))

 ![animation](https://global.discourse-cdn.com/wanikanicommunity/original/3X/3/6/366a472d2783a9b982d04cf07b96c1dbc2c3d63b.gif)

Some things to note:

- You’ll only have data in this chart if you’re also using the “SRS Level Progress” script.
- There’s a blip in the data from around 11/18 which I haven’t yet scrubbed.
- Every time the “SRS Level Progress” script updates the page an entry will be recorded in the history for the chart. This means it’s pretty fine grained data and also means that if you stop using the “SRS Level Progress” script then there will be holes in the history.
- In the future I might be able to somewhat backfill the data.
- Due to the order in which the dashboard page is rendered (and because I haven’t put any smarts in it to compensate) you’ll often find that the chart is one step behind. You can work-around this by refreshing the page.
- I haven’t tested the no-historic-data scenario. Hopefully it’s well behaved.

If you want to get your hands on the raw data visit [https://wanikanitools-golang.curiousattemptbunny.com/srs/status/history.csv?api\_key=YOUR\_V2\_API\_KEY](https://wanikanitools-golang.curiousattemptbunny.com/srs/status/history.csv?api_key=YOUR_V2_API_KEY).

As always, any and all feedback welcome! Enjoy!

* * *

original post preserved:

I intend to start collecting historic data for users of the SRS Level Progress script. My thinking is that each time a user calls wanikanitools/srs/status, that I’ll append a new line to their personal csv server-side, and at any time the user (or a script running for the user) would be able to download the csv by visiting wanikanitools/srs/status/history.csv.

The format I’m thinking of is:

`UTCDateTime,EpochSeconds,UserLevel,Total,LeechTotal,Apprentice1,Apprentice2,Apprentice3,Apprentice4,Guru1,Guru2,Master,Enlightened,Burned,LeechApprentice1,LeechApprentice2,LeechApprentice3,LeechApprentice4,LeechGuru1,LeechGuru2,LeechMaster,LeechEnlightened,LeechBurned`  
`2017-10-23 07:09:45,1508742585,6,671,27,0,0,1,6,35,106,200,323,0,0,0,1,4,8,11,3,0,0`

i.e. the same information as is displayed here, but also over time:

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/3X/9/f/9f192f1c8f4d210fa74b1a91e14bec4591320b78.jpg)

Got any suggestions for what else to include in the csv?

Are you interested in building a script to chart this data (or some other use that I haven’t thought of)? 🙂

---

<div class="post-metadata">

**Author:** ![finnra](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/finnra/32/602_2.png) [@finnra](https://community.wanikani.com/u/finnra)\
**Post date:** [October 23, 2017, 7:38am UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/2 "2017-10-23T07:38:09Z")

</div>

I actually have one (very shitty one) that I use just personally. I made it as a part of my [Anti-burnout](https://community.wanikani.com/t/userscript-wk-anti-burnout/19298) script, but my code is so bad I didn’t really want to share.

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/3X/1/3/13b60210d57cab8c5c09923f265920a76c4fede1.png)

(The chart on the left is amount of items, the chart on the right is how much of the current dangerscore is occupied by the different categories. Both charts could be built on the data you’ve included.)

---

<div class="post-metadata">

**Author:** ![hitechbunny](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/hitechbunny/32/70848_2.png) [@hitechbunny](https://community.wanikani.com/u/hitechbunny)\
**Post date:** [October 23, 2017, 2:02pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/3 "2017-10-23T14:02:00Z")

</div>

Interesting, @finnra. What’s the logic for the chart on the right? No need to be shy about code, BTW.

---

<div class="post-metadata">

**Author:** ![finnra](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/finnra/32/602_2.png) [@finnra](https://community.wanikani.com/u/finnra)\
**Post date:** [October 23, 2017, 6:29pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/4 "2017-10-23T18:29:07Z")

</div>

Basically, I assign points per item per level. Lower levels are worth more points. Here’s my list of points (from my personal notes):

// Level 0: Paused / 0T- Lessons  
// Level 1: 4h / 6T- Apprentice  
// Level 2: 8h / 3T - Apprentice  
// Level 3: 23h / 1.04T - Apprentice  
// Level 4: 47h / 0.51T - Apprentice → Guru  
// Level 5: 167h / 0.14T - Guru  
// Level 6: 335h / 0.07T - Guru → Master  
// Level 7: 719h / 0.03T - Master → Enlightened  
// Level 8: 2879h / 0.01T - Enlightened → Burned  
// Level 9: Paused / 0T -Burned

The ratios are what’s important, not what exactly the points is. But essentially the points tell you how much time you will be spending on the item, on average, during the next let’s say day, compared to other items. So if I have ten apprentice one items, they are worth 60 points. Ten enlightened items are worth 0.1 points. You can read a bit more about the algorithm on my script page. It is possible to use these numbers to gauge how burdened your WK day is, and to adjust your learning speed with real numbers.

The actual logic (pseudocode but copied sloppily) for printing the numbers is:

```auto
for (var i = 13; i < tlength+11; i++) {
    cell.offset(1,i).setValue((total_srs[i-12]*danger[i-12])/2);
 } // This basically prints a value for each of the levels in fields along the row.

where:
var tlength = total_srs.length; // this finds out how many items are in the array iirc.
var total_srs[] = wkDataIterate() // this builds an array of numbers of items per level from apprentice to enlightened.
var danger = [0, 6, 3, 1.04, 0.51, 0.14, 0.07, 0.03, 0.01, 0]

```

The chart is a 100% stacked area chart, which shows the ratios day by day. I found it interesting to see if my main burden is apprentice items, or guru items, or even enlightened items. It will depend on how many items you add per day.

I’m sorry if anything is unclear. I tried to explain as well as I could.

The actual actual code is:

> **Summary**
>
> ```auto
> // Level 0: Paused / 0 GGE - Lessons
> // Level 1: 4h / 6 GGR - Apprentice
> // Level 2: 8h / 3 GGR - Apprentice
> // Level 3: 23h / 1.04 GGR - Apprentice
> // Level 4: 47h / 0.51 GGR - Apprentice --> Guru
> // Level 5: 167h / 0.14 GGR - Guru
> // Level 6: 335h / 0.07 GGR - Guru --> Master
> // Level 7: 719h / 0.03 GGE - Master --> Enlightened
> // Level 8: 2879h / 0.01 GGE - Enlightened --> Burned
> // Level 9: Paused / 0 GGE -Burned
> 
> var apikey = '4185e81b-c0f5-4e69-ac5b-5fe4420cf1c8';
> var danger = [0, 6, 3, 1.04, 0.51, 0.14, 0.07, 0.03, 0.01, 0]
> var sheet = SpreadsheetApp.getActiveSheet();
> 
> function statisticsPrint() {
> var cell = sheet.getRange(sheet.getLastRow(),1);
> var total_srs = wkDataIterate();
> var tlength = total_srs.length;
> cell.offset(1,0).setValue(new Date());
> for (var i = 1; i < tlength; i++) {
> cell.offset(1,i).setValue(total_srs[i]);
> }
> for (var i = 13; i < tlength+11; i++) {
> cell.offset(1,i).setValue((total_srs[i-12]*danger[i-12])/2);
> }
>   
> }
> 
> function dangerPrint() {
> var basecell = sheet.getRange(2,1);
> var total_srs = wkDataIterate();
> var tlength = total_srs.length
> var calc_danger = 0
>   
> for (i = 0; i < tlength; i++) {
> basecell.offset(0,i).setValue(total_srs[i]);
> calc_danger += total_srs[i] * danger[i]
> }
> basecell.offset(0,10).setValue(calc_danger / 2);
> }
> 
> function wkDataIterate() {
> var total_srs = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
> tlength = total_srs.length
> 
> for (i = 0; i < tlength; i++) {
> total_srs[i] = wkDataGet(i).total_count
> 
> if (total_srs[i] == null) {
> total_srs[i] = 0
> } 
> }
> return total_srs
> }
> 
> function wkDataGet(srsLevel) {
> var headers = {
> 'Authorization': 'Token token={' + apikey + '}'
> };
> 
> var options = {
> 'headers': headers,
> 'Cache-Control': 'max-age=0, must-revalidate',
> 'muteHttpExceptions': true,
> };
> var wkData = UrlFetchApp.fetch("https://www.wanikani.com/api/v2/assignments?srs_stages=" + srsLevel, options).getContentText();
> var wkDataSerialized = JSON.parse(wkData);
>   
> return wkDataSerialized;
> }
> 
> ```

(I have since changed my api key.)

---

<div class="post-metadata">

**Author:** ![seanblue](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/seanblue/32/579844_2.png) [@seanblue](https://community.wanikani.com/u/seanblue)\
**Post date:** [October 23, 2017, 11:48pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/5 "2017-10-23T23:48:03Z")

</div>

Doesn’t this basically do what you want? Just with not as much data.

> [@WaniKani API + Google Docs Awesomeness](https://community.wanikani.com/t/wanikani-api-google-docs-awesomeness/8068):
>
> I was inspired by BreadStickNinja’s chart in a recent thread and wanted to do something similar to keep track of my own progress. Behold:&nbsp;[https://docs.google.com/spreadsheets/d/1ksaH\_F\_58xCtp-coCAUC8MVx9O9VqWcBEt65p11y0uY/edit?usp=sharing](https://docs.google.com/spreadsheets/d/1ksaH_F_58xCtp-coCAUC8MVx9O9VqWcBEt65p11y0uY/edit?usp=sharing) This is updated automatically every day at 5 am thanks to a short script that performs an API call and parses the data I want into the columns you see in the sheet. This is super easy (well slightly easier than dealing with EVE’s xml nonsense with their API)&nbsp;s…

---

<div class="post-metadata">

**Author:** ![finnra](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/finnra/32/602_2.png) [@finnra](https://community.wanikani.com/u/finnra)\
**Post date:** [October 24, 2017, 6:08am UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/6 "2017-10-24T06:08:33Z")

</div>

Part of the reason I rolled my own is that the chart you linked uses API v1. This API is supposed to be [sunset](https://community.wanikani.com/t/api-v2-alpha-documentation/18987) (whatever that means), and I’m not sure if I would want any long term projects running on it.

I stole the charting idea from it though!

---

<div class="post-metadata">

**Author:** ![seanblue](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/seanblue/32/579844_2.png) [@seanblue](https://community.wanikani.com/u/seanblue)\
**Post date:** [October 24, 2017, 10:54am UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/7 "2017-10-24T10:54:16Z")

</div>

Ah, I forgot about that. ☹ Maybe someone will generously update the script to v2 for everyone.

---

<div class="post-metadata">

**Author:** ![finnra](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/finnra/32/602_2.png) [@finnra](https://community.wanikani.com/u/finnra)\
**Post date:** [October 24, 2017, 1:32pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/8 "2017-10-24T13:32:21Z")

</div>

It feels like that’s kind of what hitechbunny wants to do in this thread!

---

<div class="post-metadata">

**Author:** ![hitechbunny](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/hitechbunny/32/70848_2.png) [@hitechbunny](https://community.wanikani.com/u/hitechbunny)\
**Post date:** [October 24, 2017, 3:57pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/9 "2017-10-24T15:57:45Z")

</div>

Okay! Anyone can now use the CORS-friendly URL here to download their history of SRS level counts (and leech counts)  
by visiting [https://wanikanitools-golang.curiousattemptbunny.com/srs/status/history.csv?api\_key=YOUR\_V2\_API\_KEY](https://wanikanitools-golang.curiousattemptbunny.com/srs/status/history.csv?api_key=YOUR_V2_API_KEY). Of course this is only populated with data if you use [[Unsupported] Dashboard Userscript: Leech, Apprentice, and Guru detail (aka SRS level progress)](https://community.wanikani.com/t/userscript-srs-level-progress/19353).

I only just started recording this information, so it will be historic data from now onwards. What to see what this looks like? If you visit the URL without an api\_key parameter then it will show you data for my user, hitechbunny:

[https://wanikanitools-golang.curiousattemptbunny.com/srs/status/history.csv](https://wanikanitools-golang.curiousattemptbunny.com/srs/status/history.csv)

The content of the file looks like this:

`UTCDateTime,EpochSeconds,UserLevel,Total,LeechTotal,Apprentice1,Apprentice2,Apprentice3,Apprentice4,Guru1,Guru2,Master,Enlightened,Burned,LeechApprentice1,LeechApprentice2,LeechApprentice3,LeechApprentice4,LeechGuru1,LeechGuru2,LeechMaster,LeechEnlightened,LeechBurned`  
`2017-10-24 15:51:38,1508860298,6,671,24,0,1,1,3,35,102,206,323,0,0,1,1,3,6,10,3,0,0`

You can see where those numbers are in the corresponding dashboard view:

![image](https://global.discourse-cdn.com/wanikanicommunity/original/3X/c/5/c5deb9f99656ac5ca785f2f0d0e98f71b4b31e2d.jpg)

To further illustrate, I just did a review:

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/3X/9/3/9379dada31f80224c94859e7bd3560bdc83f0d72.png)

So my updated dashboard looks like this:

![image](https://global.discourse-cdn.com/wanikanicommunity/original/3X/c/4/c47f5cc9983fe96fc20c4969d7200972526aad5a.jpg)

And likewise my history csv is:

`UTCDateTime,EpochSeconds,UserLevel,Total,LeechTotal,Apprentice1,Apprentice2,Apprentice3,Apprentice4,Guru1,Guru2,Master,Enlightened,Burned,LeechApprentice1,LeechApprentice2,LeechApprentice3,LeechApprentice4,LeechGuru1,LeechGuru2,LeechMaster,LeechEnlightened,LeechBurned`  
`2017-10-24 15:51:38,1508860298,6,671,24,0,1,1,3,35,102,206,323,0,0,1,1,3,6,10,3,0,0`  
`2017-10-24 15:57:36,1508860656,6,671,24,0,1,1,3,35,102,206,323,0,0,1,1,3,6,10,3,0,0`  
`2017-10-24 15:57:38,1508860658,6,671,24,0,1,1,3,35,102,206,323,0,0,1,1,3,6,10,3,0,0`  
`2017-10-24 15:59:12,1508860752,6,671,24,0,1,1,3,34,103,205,324,0,0,1,1,3,6,10,3,0,0`

I’m not doing anything to eliminate duplicate lines yet. You get the idea, I hope.

Let me know if you have questions. I’d love for someone to do something with this in some way. 😃

---

<div class="post-metadata">

**Author:** ![hitechbunny](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/hitechbunny/32/70848_2.png) [@hitechbunny](https://community.wanikani.com/u/hitechbunny)\
**Post date:** [October 29, 2017, 10:38pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/10 "2017-10-29T22:38:15Z")

</div>

I’ve put something together. What do you all think? See animated gif:

 ![animation](https://global.discourse-cdn.com/wanikanicommunity/original/3X/d/9/d9956994c6b6f97ecd8065fd7c4e88022439445c.gif)

I have more information to show (leech total, and leech totals by SRS stage). I’m not sure how to show it. Thoughts welcome.

---

<div class="post-metadata">

**Author:** ![Richard-Degenne](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/richard-degenne/32/62177_2.png) [@Richard-Degenne](https://community.wanikani.com/u/Richard-Degenne)\
**Post date:** [November 2, 2017, 5:13pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/11 "2017-11-02T17:13:16Z")

</div>

Genuinely impressed.

This would be an instant installation for me.

---

<div class="post-metadata">

**Author:** ![ArnaudD](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/arnaudd/32/72452_2.png) [@ArnaudD](https://community.wanikani.com/u/ArnaudD)\
**Post date:** [November 11, 2017, 1:30pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/12 "2017-11-11T13:30:03Z")

</div>

Seems to be motivating !

---

<div class="post-metadata">

**Author:** ![hitechbunny](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/hitechbunny/32/70848_2.png) [@hitechbunny](https://community.wanikani.com/u/hitechbunny)\
**Post date:** [December 2, 2017, 8:57pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/13 "2017-12-02T20:57:57Z")

</div>

I’ve published this script and updated the OP with details. You can get the “Progress Chart” script from the [[Unsupported] App Store script](https://community.wanikani.com/t/app-store-script/20709).

---

<div class="post-metadata">

**Author:** ![jjatria](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/jjatria/32/33436_2.png) [@jjatria](https://community.wanikani.com/u/jjatria)\
**Post date:** [December 4, 2017, 3:15am UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/14 "2017-12-04T03:15:33Z")

</div>

Looking good!

A data import, for those of us that have some data but arrived late to the party, would be **great**.

Otherwise, I’ll have to wait until I have some data to show before I can see how it looks.

---

<div class="post-metadata">

**Author:** ![Amenophyckxs](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/amenophyckxs/32/6031_2.png) [@Amenophyckxs](https://community.wanikani.com/u/Amenophyckxs)\
**Post date:** [May 15, 2018, 11:50pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/15 "2018-05-15T23:50:47Z")

</div>

> [@hitechbunny](#):
>
> In the future I might be able to somewhat backfill the data

Any update on this?  
I just found out about this and it would be nice if i could show the data from level 1 to current.  
Nice script either way!

---

<div class="post-metadata">

**Author:** ![Amenophyckxs](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/amenophyckxs/32/6031_2.png) [@Amenophyckxs](https://community.wanikani.com/u/Amenophyckxs)\
**Post date:** [June 13, 2018, 9:02pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/16 "2018-06-13T21:02:41Z")

</div>

Suddenly stopped working today for me.  
I didn’t change any settings/installed new scripts.

The space where the progress chart is supposed to go is just an empty space now.  
It seems the dev isn’t around anymore, so I hope someone else will start maintaining this in the future, I really like having this.

EDIT: the website linked in OP’s post is no longer working, so I assume that has something to do with it. Seems it was taken offline ☹  
more info here [GitHub - curious-attempt-bunny/wanikanitools: Tools for users of Wanikani.com (a japanese study website)](https://github.com/curious-attempt-bunny/wanikanitools)

---

<div class="post-metadata">

**Author:** ![irrelephant](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/irrelephant/32/69530_2.png) [@irrelephant](https://community.wanikani.com/u/irrelephant)\
**Post date:** [June 13, 2018, 9:21pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/17 "2018-06-13T21:21:19Z")

</div>

Yeah, I see what you mean, it is empty for me too 😢

I like this script a lot. I was expecting this to happen eventually since @hitechbunny is not around anymore but I would hoping it would just “magically” continue to work. Maybe we are lucky and the server goes back up at some point.

It will be difficult to maintain this one without his server doing all the work in the background.

---

<div class="post-metadata">

**Author:** ![Amenophyckxs](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/amenophyckxs/32/6031_2.png) [@Amenophyckxs](https://community.wanikani.com/u/Amenophyckxs)\
**Post date:** [June 13, 2018, 9:22pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/18 "2018-06-13T21:22:15Z")

</div>

I just opened an issue on his github page asking if its permanent or a temporary hiccup. fingers crossed

---

<div class="post-metadata">

**Author:** ![jprspereira](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/jprspereira/32/389740_2.png) [@jprspereira](https://community.wanikani.com/u/jprspereira)\
**Post date:** [June 13, 2018, 9:39pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/19 "2018-06-13T21:39:48Z")

</div>

I think that all the scripts by @hitechbunny stopped working ☹

Both the review leech script and the SRS level progress script aren’t working D:

---

<div class="post-metadata">

**Author:** ![Amenophyckxs](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/amenophyckxs/32/6031_2.png) [@Amenophyckxs](https://community.wanikani.com/u/Amenophyckxs)\
**Post date:** [June 13, 2018, 9:46pm UTC](https://community.wanikani.com/t/unsupported-progress-chart-script/20735/20 "2018-06-13T21:46:37Z")

</div>

They all worked fine until yesterday for me. I guess it might have to do with them not getting any data from the wanikanitools site.  
I already messaged some friends that might be able to maintain this. will see how it goes i guess.

[Next page](https://community.wanikani.com/t/unsupported-progress-chart-script/20735.md?page=2)
