These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Steve Ronuken's code broken?

First post
Author
FrenchSubstitute
Tradors'R'us
IChooseYou Alliance
#1 - 2016-01-04 22:17:45 UTC
Recently, Steve Ronuken kindly made a history grabber, showing total daily volume. https://github.com/fuzzysteve/eve-googledocs-script/blob/master/HistoryGrabber.gs

The loadAllVolumes function seems to return a "data is not defined" error. And the loadVolume function returns a reference error (however, it was working for me before).

Is this just me?

Also, does anyone know how I could change the code so that I get an average jita volume over the last 30 days, instead of just the volume from the previous day? Sorry, I am very bad with coding.
Dunamis55
State War Academy
Caldari State
#2 - 2016-01-06 08:38:56 UTC
This is exactly what I was looking for, but I'm having the same error as yourself.
It seems that the script is looking for a variable that is undefined in the editor, but I don't know enough about scripting to be able to fix it either. Ugh

Director, NER Industries

Now Recruiting!

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#3 - 2016-01-06 13:33:12 UTC
bah.

Turns out I pasted in an earlier version of the code, which didn't quite work right. two issues with it.

first: It didn't parse the data before trying to use it.

Second: it didn't zero pad numbers, for dates.

The version that's up now does both.

As for the last 30 days, that's a wee bit harder than it sounds. Mostly because the order of the data is undetermined.


I've added a new function called loadThirtyDayVolume(), which you can hand to average() to get the average for it.

=average(loadThirtyDayVolume(36))


The new function converts the date to the number of milliseconds since 1/1/1970 (Common way to represent dates), then subtracts 2.592e+9 from it (That's 30 days in milliseconds). When it runs through the data set, it converts each date to the same representation, then sees if it's equal or greater than today-2.592e+9, if so, it returns it.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Dunamis55
State War Academy
Caldari State
#4 - 2016-01-06 14:02:12 UTC
Thanks Steve! That works absolutely flawlessly for the 30 days average.
Definitely owe you one, big time! :D

Director, NER Industries

Now Recruiting!

FrenchSubstitute
Tradors'R'us
IChooseYou Alliance
#5 - 2016-01-06 14:32:02 UTC
Amazing.