[Userscript] Wanikani Heatmap

Hmm, yes that makes sense. I think with that fix you should be missing some data from the edges of the interval, but I’m not sure. I’ll look into it when I get the time.

Edit: nah, that should work, since I’m just rewriting the hour of the timestamp

1 Like

Could you change the border radius to 5px?

1 Like

Is that what WK’s radius is now?

1 Like

Yeah it’s changed since the redesign. Also the padding has changed.

2 Likes

I was looking at your Review Cache script and found that when I disabled the rounding (which you are using for compression) and called reload(), the space usage didn’t change. I think maybe this is because WKOF uses IndexedDB to store stuff and IndexedDB doesn’t use JSON. So maybe the storage space for a number is just 64 bits regardless of how many decimal digits it has?

If there is indeed no harm, would you consider removing the rounding so the data is more accurate?

3 Likes

I assume numbers are just 64-bit IEEE 754 floating point numbers, so those are always a fixed size. They don’t have infinite precision, a number like 2.1 is actually stored as the number 2.0999999046325684, but it’s close enough for most applications. :grin: They’re actually represented as something similar to the formula a*b^e, where a and e are variable and b is a fixed constant. Due to this, they tend to become less accurate the further your exponent strays from 0 (so very high numbers or very small numbers are usually rounded away). So I’ll doubt you’ll see too much of an increase in accuracy if the numbers get really high, you’ll just notice that the digits behind the decimal will suddenly look “wrong” due to the type not being able to represent them. It depends a bit on the range of numbers you’re dealing with, if they’re low enough you should be able to represent a few extra places behind the decimal :grin:

3 Likes

Oh neat. I assumed (without looking into it) that it would store it as plain text. If that is indeed the case I will change it

2 years. :thinking:

11 Likes

That is super impressive!

2 Likes

Thanks! I just realized this is the wrong thread. I meant to post this in the Heatmap stories thread, sry. :sweat_smile:

2 Likes

It’s on topic here too

1 Like

In a few days, I believe I’m going to reset to level 22 in order for my Japanese studies to get back on track.

Is there any way you could add a feature so we could archive our old lesson data before we reset so that accuracy isn’t lost in the heatmap?

3 Likes

I think that the data is automatically saved until you tell it to reload the review data (or you clear your cache)

edit: nvm, I read review instead of lesson
I don’t think it’s something that I want to implement, however, if you feel like adding the feature I could incorporate it

1 Like

If not that, is there any chance of somehow detecting the reset and not incorporating those days into the averages? I know things like Days Studied on my heatmap is pretty off without lesson records.

For me, it’s not a big deal now that I’ve progressed a lot since the reset (back in Jan), so it’s not a big deal if you can’t. But it’d be nice to have accurate stats. :wink:

1 Like

Hmm. That would be a bit complicated since I don’t automatically clear review data on reset, however, I could settle for adding a “days studied offset” or something, so you could just pick a number yourself

1 Like

Yeah, I figured it was probably harder than it seemed. No worries.

1 Like

I’m most likely being an idiot, but I thought Per Day/Days Studied shoud be the average number of reviews one has studied over the total number of days one has studied since the beginning/reset. I ave studied for 80 days, so I don’t know why my Per Day/Days Studied is 112/112…

It means “Items per day” as in “every day ever since your first review” and “Items per days studied”. So if you studied every day, those two numbers are the same.

Here is mine for comparison:

5 Likes

How does the timer work when it comes to lessons? Does it only count time when a session exceeds 1 minute? :thinking:

Screenshot:
The 10 lessons in Aug 2020 took 4 min.
All the lessons each time after that took 0 min. Total for all of those (66 lessons) show 0 min on the summary popup. Which can’t be right :durtle_durtverted_lvl1:

1 Like

Clearly, you found a bug :wink:

1 Like