EyeWire Stats - another TamperMonkey script

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.

3 Likes

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.

2 Likes

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.

4 Likes

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

Thanks man !

2 Likes

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

1 Like

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

1 Like

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.

1 Like

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

1 Like

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:

2 Likes

lol stats script guru level: Grandmaster :stuck_out_tongue:

2 Likes

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:

https://puu.sh/yToAx/f2f9bfd760.gif

1 Like

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!

1 Like

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
2 Likes

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.

1 Like

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:

2 Likes

yeah itā€™d be great to have lol, and yw :slight_smile:

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).

2 Likes

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.

2 Likes

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.

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

2 Likes