EyeWire Stats - another TamperMonkey script


#181

Yay for opposite expectations! lol :smiley:
I was actually trying to use scrollbars, but had some problems with them, so I went for making the chart a little bit smaller.
However, since I've realized most major things from my todo list (I have some more ideas, by they have to clarify a little bit), I will fiddle a little with the code and see, what I can do. Maybe it will be possible to make both small window with scrollbars on smaller screens and large window with large chart on larger. Can't promise anything, though.


#182

So I tried making the scrollbar on my own and... it sorta worked???

I wanted the top buttons to stay at the top while the rest still scrolls, but I can't seem to find a solution at the moment. There were also some weird side effects, like the profile just sticking to the left when resizing the browser instead of passing through the monitor, and the achievements looked all weird, as shown in the gif.


#183

ver. 2.1.1

FIXED missing usernames on the map for a custom period of time (some names for older periods are blank, because I didn't collect their names and haven't found a way to collected them rectoactively)
FIXED (again) missing gaps between buttons in the top menu
HID the link in at the bottom of the Profile dialog and was able to made the window a little lower
FIXED missing centering of the map, when the Stats window was resized (thanks @randompersonjci for the CSS!)
FIXED the sc-info in the SC History panel

I think, I won't be adding any scrollbars or making the Profile window larger on larger screens, because I had many problems with the scrollbars and the best I could do, was what @randompersonjci has achieved (scrolling with the tabs). I hope current version wil be a one fits all solution, lol.


#184

Love the new features ! Especially Completed cells removing buttons :smiley:

Thanks man !


#185

ver. 2.1.2

Small FIX to correct the behaviour of the popup shown, when a user hovers cursor over the weight stripe in the Accuracy Chart (my version of Activity Tracker). Now it disappears right after leaving the stripe.

ver. 2.1.3

FIX in calculating days for the chart in the Profile


#186

ver. 2.1.4

FIXED months not being displayed in the Profile, when the month is January
FIXED jumping labels in the Stats for some settings
FIXED month displayed by defult in the Stats in the Custom category


#187

Wow, great improvements @KrzysztofKruk!

In the SC History Window cells that are active and completed both show up?

What does "check" sc-info do? How is is different than "Cubes you can SC"? What does Status mean? I assume you click to jump to cell?

Admins don't have this box so we're not able to click around this awesome feature.


#188

If you like, we could get you past stats so the map could be extended to the dawn of Eyewire. @KrzysztofKruk


#189

Thanks! :slight_smile:

In the SC History window are displayed all cells, in which you've done at least one SC during last 30 days (unless you've deleted some of them. But even the deleted ones can be brought back to the table, when you SC/unSC a cube in it).

The sc-info column contains buttons named Check. Clicking a button, will perform an action analogous to that of the /sc-info command from the @crazyman4865's EW DLC script.
After the result of clicking the button is ready, it's displayed in the next column named "Cubes you can SC".
So, if you (being a Scythe) want to check, if you can still SC some cubes in a given cell, you have to click the Check button in appropriate row, wait a moment and will see a number of cubes, you can still SC, in the next column.

Status column shows, if a cell has been admin completed or not. The check isn't done automatically, so you have to click the "Search for completed cells" button at the top of the window. Every cell from the list will be then checked and if any is completed, there will be a text "Completed" in the Status column. The color of the text depends on the Admin Complete color set by user (usually violet).
After checking for completing, you can also click the second button at the top of the window - Remove completed cells. This button doesn't perform the check itself. It only deletes the cells, which have status Completed in the Status column.
So, if you want to delete all completed cells, you first have to click the "Search for completed cells" button, then "Remove completed cells". It's done that way, so anyone, who wants to remove completed cells, will know, which ones will be removed.

Here's an example:

I have clicked the Check button in some rows and I can see the number od cubes I can still SC in that cells.
Also, I have clicked the Search for completed cells and the Status column shows the result of it - only one cell is Admin Completed (well, actually, I hadn't any completed cells on the list, so have to add the text manually, but it looks exactly, as it would look, if that cell was completed).

To jump to a cell, you have to click on the cell's name in the table.

Sorry, that it's not available for admins. I'm trying to make everything working for anybody, but it's hard to check, if anything works for an admin without being one :wink: I'll take a look at this and see, if I can make some improvements.

Having all the past stats would be awesome. It would be even better, if there were some API calls directly to the EW database, so I wouldn't have to scrap, convert, store and retrieve the data from an external server and the data would be up to date (currently I'm always missing last minute of each day, because I have to call a cron job a minute before midnight HQ time).
So, it would marvelous, if I could e.g. type something like:
eyewire.org/1.0/stats/from/yyyy-mm-dd/to/yyyy-mm-dd
(or in any other format)
and get all the data for the given period of time. And, by "all the data", I mean: user_id, username, country, points, cubes, trailblazes, scythes and completes.
That would be also less error prone.
However, I understand, that the devs have much to do without adding anything to the todo list :wink:


#190

lol stats script guru level: Grandmaster :stuck_out_tongue:


#191

I finally figured out how to add the scrollbar without all of the problems! (Thanks @galarun for suggesting what CSS to edit and @crazyman4865 for suggesting the actual code!)

$('head').append(`<style>
@media (max-height: 700px) {
    div#profileContainer {height: auto !important; width: 880px;} 
    .profPane:not(#profBadges), #badgeCategories {overflow-y: auto; height: 450px !important;} 
    #profBadges {overflow-y: hidden; height: 450px;}
}
</style>`);

Basically, this checks your viewport size, and if it's lower than 700px, the profile window will change accordingly. Also, it's dynamic, so the profile size actually changes as you resize your browser window. :smiley:


#192

Thank you for the detailed description. We will share this to the team at Princeton in the next lab meeting. They will be impressed.

You're hooked up with a bunch of new API calls!


#193

ver. 2.1.5

FIXED stats don't working in Firefox

Thanks again @randompersonjci for the code! I will add it, when I will be working on the Profile History soon.

@amy You're welcome :slight_smile:
Yeah, the new API call is awesome! I'm planning to rewrite a large chunk of the script for it.
And, since I was already thinking about spliting the script for a bunch of smaller ones, it is a good occasion to do it.
The first one, which will go to its separate repository, will be the Stats itself. I'm planning to left the EW Stats name for the Stats itself and name the rest something like EW Expansion Pack or similar.
With time, more scripts will go from the Expansion Pack to their separate repositories.
There will be a separate script for: Accuracy History, SC History, Profile History and Custom Highlighting. Auto-ShowMeMe and Submit-by-space will be left in the Expansion Pack with some other small stuff, if there will be something to add there.
The separation will be good for many reasons:
- the code will be easier to maintain,
- probably quicker releases of bug fixes,
- users will have the possibility to install only the features they want (so, a little less code for the browser to process)
- users will be able to turn on or off features from the TamperMonkey dashboard - less options in already crowded Settings panel
- more customizable installation also through the future in-game addon panel (again, users will be able to select only the features then want)
- longer list of addons for EW, lol


#194

I'd ask it from Crazy but he's not as active lol, so I'd like an option where if I enable/select it it shows me dataset end boundries in overview.

very poorly made example, lol:

As there are times I find myself wondering "how far is this cell/branch from touching/reaching dataset end?" maybe in marathons or moustache cells lol so I'd be lovely if I could click a button/option and it shows me the ends of the dataset (as it would by selecting a cube that has touched it) but in overview, cell wide.

Dunno how easy it is to make lol buti it'd be brilliant.

thanks in advance, lol.


#195

Hmm, don't know, if it would be easy or possible at all, but definitely that would be a great thing to have. I will definitely investigate.it.
Thanks for the idea :slight_smile:


#196

yeah it'd be great to have lol, and yw :slight_smile:


#197

As I said in on of the earlier posts, I'm splitting the EW Stats script to smaller scripts. It will be done case-by-case.
For now, I've separated the first part, which is the Stats available through the Stats button.
From now on that part will be named just Statistics and will be available via this link:

https://raw.githubusercontent.com/ChrisRaven/EyeWire-Statistics/master/statistics.user.js

Just click it and it will install the script through TamperMonkey.
To make it work, you have to also update the original script (EW Stats) to remove the Stats part from there (the updated version of EW Stats is 2.2).

Thanks to @Kelv, I was able to made an upgrade to the Statistics. Now you can see not only points, cubes and players, but also trailblazes, flags, scythes and completes.
Another major upgrade is that now the available data is not since the moment, the script was released, but since the beginning of the EyeWire itself :slight_smile: So now you can even check how much points, cubes, etc. we have done from the start od the project. Little warning here: it's quite large amount of data, so fetching results may take a couple of seconds.

Also, we will soon probably have an EyeWire feature to install scripts through the page itself, without need to install the TamperMonkey or GreaseMonkey addons.
It's not ready yet, but when it will be, here's a link to use to install the Statistics script via this feature:

https://cdn.rawgit.com/ChrisRaven/EyeWire-Statistics/master/statistics.user.js

It's actually the same script. The difference is that GitHub serves all files as a text, while RawGit serves them with proper MIME type, which is application/javascript in this case.

P.S. The label inside the donut chart is slightly shifted for large numbers (like points from the beginning). I'm aware of it and maybe add some fix in the future.

P.P.S. Number of players for all the time range is different than that given by HQ, because HQ counts all players, while my Statistics counts only those, who have earned at least 1 point (so, ofc, have passed the Tutorial).


#198

MOVED Accuracy History to a separate script. (the bars in the top right corner)

link: https://github.com/ChrisRaven/EyeWire-Accuracy-History/raw/master/accuracy_history.user.js

rawgit link: https://cdn.rawgit.com/ChrisRaven/EyeWire-Accuracy-History/490f49a7/accuracy_history.user.js

To install it through TamperMonkey, just click the first link and then click Install (if you have TamperMonkey already installed, ofc).
The second link, as before, is for the future in-game script installing feature.

You should also update the original EWStats script (to ver. 2.3) to remove the Accuracy History part from it.

The new Accuracy History script doesn't change anything. It will work exactly the same as before with all the data already collected. The update only moves the code to a separate script, removes some legacy (back-compatibility) code and removes the option from the Settings menu.
To switch between the native Activity Tracker and my Accuracy History just use the TamperMonkey dashboard or the popup menu.


#199

Could be something on my end, but i updated scripts from tamper, installed bars from link above, and the enable/disable in gear cog doesn't work, had to disable it from tamper icon to get HQ's activity tracker back.

Dunno if it's intended or bug, thought to mention it.


#200

Yeah, that was a bug. Thx for reporting. I've fixed it and now, in ver. 2.4 it should work fine.
Also in the same version of the EWStats SC History (the thing visible when right-clicked on the username) is removed and moved to a separate script.

The script is available here:
https://github.com/ChrisRaven/Eyewire-SC-History/raw/master/sc_history.user.js

rawgit: https://cdn.rawgit.com/ChrisRaven/Eyewire-SC-History/cd66e838/sc_history.user.js