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.
 

Weird values returned from eve-central

First post
Author
Sati Saraki
Science and Trade Institute
Caldari State
#1 - 2015-12-10 03:00:01 UTC  |  Edited by: Sati Saraki
Hello!

I'm mucking about with some spreadsheeting in Google Calc. To make a long story short I'm getting some weird values.

For Isogen I'm getting a value of 133.31.00, while the value of Pyerite was 12.53, so no problem there.

When I try to change the format, the value changes to 5,56.

I use this call

=importXML("http://api.eve-central.com/api/marketstat?typeid=37&usesystem=30000142";"//evec_api/marketstat/type/sell/avg")

And also, how do I get an overview over all the Xpath arguments available on eve-central.com? I've almost used up all of Googles search ability with no luck.

Thank you

Edit:
Actually the problems go a bit further; the numbers returned use. as decimal separator whereas my version of google uses , (as I'm Danish). Can't even use them for multiplication...
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2015-12-10 13:04:04 UTC
importxml is somewhat flaky

Which is why I wrote the following script.
https://github.com/fuzzysteve/eve-googledocs-script/blob/master/EveCentralPrices.gs


it takes a list of typeids, and returns all the information for them

Which you can then use vlookup to get the bit you actually want. More efficient, and less prone to issues.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Sati Saraki
Science and Trade Institute
Caldari State
#3 - 2015-12-10 13:31:01 UTC  |  Edited by: Sati Saraki
Ah yes I actually had a look at that afterwards, and yes it seems to a lot easier to play with. One thing though, if I want to return a single typeid I get an error in line 38 - is it possible to import 1 typeid at a time rather than eg A2:A20?

And how do i get it to grab only the values i need, say, instead of all 15 marketstats maybe just 2 or 3?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#4 - 2015-12-10 16:00:57 UTC
It's designed, mostly, for use with the prices going onto a separate sheet, and then being used with vlookup. more efficient. (you have to get all the data anyway. so might as well store it). And there aren't many sheets which require only one price.

If you _really_ want to cut down how much gets pulled, you could just remove them from the array build.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Sati Saraki
Science and Trade Institute
Caldari State
#5 - 2015-12-10 16:27:25 UTC
Thank you, I will have a play around. Do you have a website with more information?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#6 - 2015-12-10 19:37:17 UTC
Well, there's the site in my bio Smile

Doesn't talk a great deal about the google docs stuff though. Mostly because by the time you understand vaguely what it does, it's close to self explanatory, if that makes sense? The way it loops through is pretty simple.

There's https://www.youtube.com/watch?v=wNIfpPOOo0M too, which I think is kinda flawed, but the best I have yet.

If you ever have any specific questions, feel free to lob them my way, here, or evemail, or in #devfleet on the tweetfleet slack

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Sati Saraki
Science and Trade Institute
Caldari State
#7 - 2015-12-10 19:58:20 UTC
Thank you, very much appreciated. I'm slowly starting to do the ground work, but once I get properly going I will no doubt have questions! Smile