EDSM-NET / FrontEnd

Issues tracker for EDSM
https://www.edsm.net/
37 stars 0 forks source link

EDSM API Endpoint for record statistics #369

Open Javelias opened 4 years ago

Javelias commented 4 years ago

Use case is EDDI SpeechResponder scripts using EDSM statistics and record information to

Currently EDDI uses static conditions to mark scans as notable, for example, EDDI will say

"Nyeakaa TN-G c12-5 A2a has an extremely high surface temperature of over 917 Kelvin."

... but the distribution used by EDDI to compare towards is not correct. Because it cannot use EDSM information, it uses static values (for example, check the hard-coded distribution values of https://github.com/EDCD/EDDI/blob/develop/DataDefinitions/PlanetClass.cs).

The reality in this example is EDSM shows the hottest HMC is 41.600 Kelvin, it would be nice EDSM can expose statistical record information (so the outliers) via an endpoint API. This avoids the problem of having to expose statistics like distribution (of which the data is huge in size to calculate) and allows EDDI scripts to notify explorers when they approach or break a record.

The end result being exploring in Elite gets highly enriched since a lot of extra information becomes available for EDDI to provide accurate feedback on. It makes every jump and scan worth-wile doing.

Regards, Baroness Galaxy

Javelias commented 4 years ago

An example

EDDI mentions this icy body is remarkable, with an extremely oblong orbit of 0.1618.

Checking EDSM I couldn't get an idea of average orbital period data, but I could via EDDB.

image

Not "extreme" at all, especially if you use Colonia as reference point which has 20k bodies to compare towards. The value of 0.1618 falls in a normal elliptic orbit, see https://en.wikipedia.org/wiki/Orbital_eccentricity#/media/File:Animation_of_Orbital_eccentricity.gif.

This does show a complication: how to get distribution normal and stdev mean data on all body data? EDSM only exports last 7 days and EDDB does not export it anymore nor does it have an API, the only thing you can do is manually search using a reference system

Tkael commented 4 years ago

EDDI uses static mean and standard deviation values calculated from an EDSM dump to provide feedback on unusual characteristics for each planet class. It would be very nice, however, to offer users feedback if they find an EDSM galactic record.

This could be implemented in one of two ways:

  1. a standalone statistics endpoint which would provide the values for current galactic extreme records (and perhaps additional data such as mean and standard deviation values) for each planet class (hottest, coldest, largest, smallest, etc.) and for any tracked star system values. EDDI would be able to ping this endpoint periodically (perhaps on startup) and update internal values.
  2. by providing a showstatistics parameter on the https://www.edsm.net/api-system-v1/bodies endpoint which would add either boolean values for galactic records or perhaps statistical rankings relative to other similar bodies (e.g. "Of all icy bodies discovered in the galaxy to date, this body is the 27th most eccentric.")
Javelias commented 4 years ago

In addition, EDSM currently does not track records for material distributions, so that would be added work on EDSM as well.