In [137]:
import math
from collections import OrderedDict
from random import random, seed

Snatching asteroids. A hijacking guide to the galaxy!

Ahoy, buddy! Welcome to the Earth Pirate Station.

The are plenty of loot floating around, so your task as a new crew member is to get acquianted with locating and snatching the best booty.

  • Search and watch the horizon
  • Survey to estimate the treasure
  • Choose the best one
  • Snatch and
  • Profit!

Feel free to annoy your fellow crew mates with questions and help enhance this guide. More skilled pirates - more rum and booty!

We've got a map - MPCORB from Minor Planet Center. Here is what you should know about it.

Asteroids!

They call them minor planets that roam around the sun. Pieces of rock, minerals, fuel and other valuable stuff that don't have an atmosphere and a comet trace. There are 700 000+ asteroids that are worthy to have some name, and a lot more that are too minor.

So, asteroids, where are they?

They are mostly moving around the Sun, and those what are not, are attaches to bigger planets as natural sattelites. Asteroids are moving in circles, and there is no sector or some constant address where all of them reside. Circles get distorted and turn into ellipses, paths known as asteroid orbits, and to catch an asteroid you need to work with that orbit.

How far are asteroids?

The most dista

Distance from Sun to asteroid can be found from asteroid brightness known as absolute magnitude (H). Brigthness of asteroid depends on its size, capability to reflect sunlight and distance.

Parsing MPCORB - Minor Planet Center Orbit Database


In [ ]:


In [116]:
class MPCORB:
    """class for accessing MRCORB database records"""
    def __init__(self, file='MRCORB.DAT'):
        self.file = file

class MPOrbit:
    """parse and process MPCORB entries
       http://www.minorplanetcenter.org/iau/info/MPOrbitFormat.html
    """
    def __init__(self, line):
        """parse line and fill self.data dictionary with fields according
           to header line in MPCORB.DAT file. Fix MPCORB format issues:
           
            - adds header for uncertainty parameter U
        """
        
        headerline = "Des'n  H  G  Epoch  M  Peri.  Node  Incl.  e  n  a  "\
                     "Reference  #Obs  #Opp  Arc  rms  Perts  Computer"
        self.headers = headerline.split()
        # fill missing Uncertainty header
        self.headers.insert(11, 'U')

        data = line.split()
        # join space separated Perts argument
        data[17:19] = [data[17]+' '+data[18]]
        for i, h in enumerate(self.headers):
            self.data = OrderedDict()
            self.data[h] = data[i]

    # dict-type access methods: mporbit['h']
    def __getitem__(self, name):
        return self.data.__getitem__(name)
    def __setitem__(self, name, value):
        return self.data.__setitem__(name, value)
        

def find_semiminor(major, e):
    """Given semimajor and eccentricity, return semiminor"""
    return float(major)*math.sqrt(1-float(e)**2)

def find_diameter(absmag, albedo=0.15):
    """Return asteroid diameter in km
    http://www.physics.sfasu.edu/astro/asteroids/sizemagnitude.html"""
    return (10**(-0.2*float(absmag)))*1329/math.sqrt(albedo)

def norm_radius(minr, maxr, minv, maxv, v):
    """Given minimal/maximum radius, min/max value and value,
    return radius.
    """
    return

In [117]:
table = []
headers = []

for idx, line in enumerate(open('MPCORB.DAT', 'r')):
    if idx == 38:
        headers = line.split()
        headers.insert(11, 'U') # fill missing Uncertainty header
        #print(len(headers))
    if 40 < idx < 42+100:
        data = line.split()
        data[17:19] = [data[17]+' '+data[18]]
        entry = MPOrbit(line)
        #entry = dict()
        for i, h in enumerate(headers):
            if h == 'a':
                h = 'semimajor'
            if h == 'Des\'n':
                h = 'id'
            entry[h] = data[i]
        entry['semiminor'] = find_semiminor(entry['semimajor'], entry['e'])
        entry['size'] = find_diameter(entry['H'])
        table.append(entry)

Output format:

var asteroids = [
  { radius: 0, color: 0 },
  { name: 'Vesta', radius: 30, color: 0xFF0000, mass: 1000, fossils: { H2O: 0.1, NH3: 0.2, CH4: 0.1, Ni: 0.01 } },
  { name: 'Pallad', radius: 20, color: 0xFFFF22 }
];

In [144]:
minv = min(e['semimajor'] for e in table)
maxv = max(e['semimajor'] for e in table)

asteroids = []
aheaders = 'id', 'size'

print('// id  size  distance platinum fuel terraforming orbit')

tojson = []
seed(3.14)
for e in table:
    a = OrderedDict()
    a['id'] = e['id']
    a['size'] = e['size']
    a['distance'] = float(e['semimajor'])
    a['period'] = 365/float(e['n'])  # n = Mean daily motion (degrees per day)
    a['---'] = ''
    a['platinum'] = random()
    a['fuel'] = random()
    a['terraforming'] = random()
    a['orbit'] = random()
    tojson.append(a)

import json

print('')
#e[radius] = norm_radius()
#print('{id} {size} {distance}'.format(**a))
print(json.dumps(tojson, indent=4))


// id  size  distance platinum fuel terraforming orbit

[
    {
        "id": "00001",
        "size": 737.0201327910924,
        "distance": 2.7681117,
        "period": 1705.5489778995432,
        "---": "",
        "platinum": 0.49810441403140715,
        "fuel": 0.05848065286917259,
        "terraforming": 0.26617606750428713,
        "orbit": 0.7516227569343463
    },
    {
        "id": "00002",
        "size": 512.2469148423332,
        "distance": 2.7723622,
        "period": 1709.4788871395483,
        "---": "",
        "platinum": 0.6539144141142561,
        "fuel": 0.14771192414184176,
        "terraforming": 0.4568272019302274,
        "orbit": 0.38615110124855134
    },
    {
        "id": "00003",
        "size": 294.76733257802425,
        "distance": 2.6697633,
        "period": 1615.466413479558,
        "---": "",
        "platinum": 0.9687364934397148,
        "fuel": 0.386087941837701,
        "terraforming": 0.25879353281631934,
        "orbit": 0.5469742098041601
    },
    {
        "id": "00004",
        "size": 786.1028149035884,
        "distance": 2.3616695,
        "period": 1344.0563251658898,
        "---": "",
        "platinum": 0.5758613968423114,
        "fuel": 0.9110212501723672,
        "terraforming": 0.19646636863283307,
        "orbit": 0.8223208230668904
    },
    {
        "id": "00005",
        "size": 146.37919397264432,
        "distance": 2.5741812,
        "period": 1529.4928758945596,
        "---": "",
        "platinum": 0.6192979306941884,
        "fuel": 0.5496756157368788,
        "terraforming": 0.06431489578654026,
        "orbit": 0.24898252941680754
    },
    {
        "id": "00006",
        "size": 247.44538103230687,
        "distance": 2.4270715,
        "period": 1400.2727654619846,
        "---": "",
        "platinum": 0.9945224268734295,
        "fuel": 0.1262995255449476,
        "terraforming": 0.6691033048608979,
        "orbit": 0.8441966541190128
    },
    {
        "id": "00007",
        "size": 271.318465038267,
        "distance": 2.3852629,
        "period": 1364.2475057444165,
        "---": "",
        "platinum": 0.5995311124217414,
        "fuel": 0.7768052078994762,
        "terraforming": 0.3729369832375863,
        "orbit": 0.8026160287031356
    },
    {
        "id": "00008",
        "size": 172.7743832759794,
        "distance": 2.2010449,
        "period": 1209.294725400974,
        "---": "",
        "platinum": 0.18772141320583946,
        "fuel": 0.8894411371815817,
        "terraforming": 0.3634268686510935,
        "orbit": 0.22028736229264734
    },
    {
        "id": "00009",
        "size": 190.31777486026604,
        "distance": 2.3863627,
        "period": 1365.1911854878906,
        "---": "",
        "platinum": 0.12232524523407617,
        "fuel": 0.4221174381366666,
        "terraforming": 0.23394318322735774,
        "orbit": 0.824517230305495
    },
    {
        "id": "00010",
        "size": 281.500617213328,
        "distance": 3.1439153,
        "period": 2064.4057257452264,
        "---": "",
        "platinum": 0.1614619576400247,
        "fuel": 0.572498458525459,
        "terraforming": 0.4731639526358663,
        "orbit": 0.8646221115820859
    },
    {
        "id": "00011",
        "size": 168.06580167148627,
        "distance": 2.4525399,
        "period": 1422.3710598227055,
        "---": "",
        "platinum": 0.5985991983107282,
        "fuel": 0.713640894607641,
        "terraforming": 0.6359372431681267,
        "orbit": 0.21733355088320327
    },
    {
        "id": "00012",
        "size": 122.31489628979887,
        "distance": 2.3334443,
        "period": 1320.0335194484155,
        "---": "",
        "platinum": 0.39434505533426756,
        "fuel": 0.04107461640301757,
        "terraforming": 0.18385015365579316,
        "orbit": 0.045184509163213704
    },
    {
        "id": "00013",
        "size": 153.98533118019594,
        "distance": 2.5769048,
        "period": 1531.9209302159652,
        "---": "",
        "platinum": 0.07398628575480293,
        "fuel": 0.01049955227468724,
        "terraforming": 0.008770650791058876,
        "orbit": 0.21661531898645414
    },
    {
        "id": "00014",
        "size": 188.57293101246137,
        "distance": 2.5859743,
        "period": 1540.0155098548337,
        "---": "",
        "platinum": 0.9533952652783525,
        "fuel": 0.5657340374563872,
        "terraforming": 0.9889722673616248,
        "orbit": 0.6694961052333744
    },
    {
        "id": "00015",
        "size": 301.6333457803826,
        "distance": 2.6435344,
        "period": 1591.7184589322028,
        "---": "",
        "platinum": 0.7940791179798782,
        "fuel": 0.0919573020721991,
        "terraforming": 0.16460544806735633,
        "orbit": 0.04291133026696614
    },
    {
        "id": "00016",
        "size": 226.71452828784516,
        "distance": 2.9218051,
        "period": 1849.54822124387,
        "---": "",
        "platinum": 0.7863280811799248,
        "fuel": 0.18624242363336596,
        "terraforming": 0.7336750476727256,
        "orbit": 0.9829255280716431
    },
    {
        "id": "00017",
        "size": 96.26742414187886,
        "distance": 2.4706208,
        "period": 1438.1292751347764,
        "---": "",
        "platinum": 0.02428738948456899,
        "fuel": 0.9351906663256158,
        "terraforming": 0.600789101418405,
        "orbit": 0.4065274019017815
    },
    {
        "id": "00018",
        "size": 171.19037820898708,
        "distance": 2.2952381,
        "period": 1287.7465867130095,
        "---": "",
        "platinum": 0.6728897472810833,
        "fuel": 0.18626604122973178,
        "terraforming": 0.29689120576548034,
        "orbit": 0.6505421832052797
    },
    {
        "id": "00019",
        "size": 128.67060749751,
        "distance": 2.4415951,
        "period": 1412.8604206933187,
        "---": "",
        "platinum": 0.8509024331732064,
        "fuel": 0.93563859629304,
        "terraforming": 0.8360115641681775,
        "orbit": 0.40132762540691636
    },
    {
        "id": "00020",
        "size": 171.98055709247893,
        "distance": 2.4085919,
        "period": 1384.310865399093,
        "---": "",
        "platinum": 0.789255451469856,
        "fuel": 0.3876872069244245,
        "terraforming": 0.3363758849393712,
        "orbit": 0.45343421671911555
    },
    {
        "id": "00021",
        "size": 116.27312674865377,
        "distance": 2.4347872,
        "period": 1406.955308623549,
        "---": "",
        "platinum": 0.0632634450705406,
        "fuel": 0.591690077873868,
        "terraforming": 0.17441589627751797,
        "orbit": 0.2270073403281162
    },
    {
        "id": "00022",
        "size": 175.98649888127383,
        "distance": 2.9105203,
        "period": 1838.8433645009727,
        "---": "",
        "platinum": 0.5004182297930544,
        "fuel": 0.33050307073289664,
        "terraforming": 0.008015463611038887,
        "orbit": 0.2214016414117318
    },
    {
        "id": "00023",
        "size": 139.79104499166897,
        "distance": 2.6249515,
        "period": 1574.9642644923358,
        "---": "",
        "platinum": 0.9923040958369014,
        "fuel": 0.5605617374675513,
        "terraforming": 0.31334888445414044,
        "orbit": 0.33665025678715776
    },
    {
        "id": "00024",
        "size": 131.66773096470945,
        "distance": 3.136107,
        "period": 2056.7195931053575,
        "---": "",
        "platinum": 0.46126359384531723,
        "fuel": 0.5511521085805259,
        "terraforming": 0.6894705677695803,
        "orbit": 0.5515972457324445
    },
    {
        "id": "00025",
        "size": 93.21361507589089,
        "distance": 2.4007941,
        "period": 1377.5937731855636,
        "---": "",
        "platinum": 0.29106811906479235,
        "fuel": 0.5665579759182727,
        "terraforming": 0.17822635849395863,
        "orbit": 0.7627019187966091
    },
    {
        "id": "00026",
        "size": 108.51239560529477,
        "distance": 2.6542069,
        "period": 1601.3672956574167,
        "---": "",
        "platinum": 0.7783570872976281,
        "fuel": 0.6272557430960317,
        "terraforming": 0.2876904490733647,
        "orbit": 0.391422333452097
    },
    {
        "id": "00027",
        "size": 136.60901232216727,
        "distance": 2.3466524,
        "period": 1331.2571071804946,
        "---": "",
        "platinum": 0.8113422794594611,
        "fuel": 0.8692789625766462,
        "terraforming": 0.5083243485076574,
        "orbit": 0.3720519950474237
    },
    {
        "id": "00028",
        "size": 131.06277269265516,
        "distance": 2.776761,
        "period": 1713.5490558579434,
        "---": "",
        "platinum": 0.730721454303024,
        "fuel": 0.5580050035500067,
        "terraforming": 0.8665342879770656,
        "orbit": 0.37084036910962215
    },
    {
        "id": "00029",
        "size": 231.9953880451889,
        "distance": 2.5545651,
        "period": 1512.0433214910652,
        "---": "",
        "platinum": 0.8470153063045603,
        "fuel": 0.6486124330197283,
        "terraforming": 0.9982279518355668,
        "orbit": 0.2315335565598584
    },
    {
        "id": "00030",
        "size": 105.07014979446737,
        "distance": 2.3654708,
        "period": 1347.3027092042737,
        "---": "",
        "platinum": 0.9039764629764548,
        "fuel": 0.37682748483173045,
        "terraforming": 0.11742605931785377,
        "orbit": 0.0674059792797832
    },
    {
        "id": "00031",
        "size": 153.98533118019594,
        "distance": 3.1559785,
        "period": 2076.2986864310583,
        "---": "",
        "platinum": 0.4224472303555987,
        "fuel": 0.9934440204945284,
        "terraforming": 0.8323673099908916,
        "orbit": 0.34242146309799726
    },
    {
        "id": "00032",
        "size": 105.55513157043823,
        "distance": 2.5879758,
        "period": 1541.8037270338302,
        "---": "",
        "platinum": 0.9056230031492671,
        "fuel": 0.12657004216648904,
        "terraforming": 0.4065237091799577,
        "orbit": 0.011672677838274415
    },
    {
        "id": "00033",
        "size": 66.9082007702406,
        "distance": 2.867733,
        "period": 1798.4437302679312,
        "---": "",
        "platinum": 0.8238130166188491,
        "fuel": 0.6495681000862896,
        "terraforming": 0.48554503263299775,
        "orbit": 0.9791537848115356
    },
    {
        "id": "00034",
        "size": 68.15211709476294,
        "distance": 2.6878849,
        "period": 1631.9422880823456,
        "---": "",
        "platinum": 0.12744309904125717,
        "fuel": 0.9971382023306922,
        "terraforming": 0.14052093880692418,
        "orbit": 0.7794523047402595
    },
    {
        "id": "00035",
        "size": 68.46669297430097,
        "distance": 2.993357,
        "period": 1917.9026279259442,
        "---": "",
        "platinum": 0.9009165380648739,
        "fuel": 0.883490418730796,
        "terraforming": 0.09455261538700044,
        "orbit": 0.6096143705033097
    },
    {
        "id": "00036",
        "size": 69.73958383216828,
        "distance": 2.7489333,
        "period": 1687.85487148673,
        "---": "",
        "platinum": 0.7924125150061031,
        "fuel": 0.40823553245232924,
        "terraforming": 0.20915435636714086,
        "orbit": 0.46709141121979647
    },
    {
        "id": "00037",
        "size": 119.53066933174124,
        "distance": 2.6441459,
        "period": 1592.2707600152632,
        "---": "",
        "platinum": 0.06783735566887605,
        "fuel": 0.17345351276772536,
        "terraforming": 0.6889516574970906,
        "orbit": 0.4633917595727651
    },
    {
        "id": "00038",
        "size": 74.38396961160308,
        "distance": 2.7384824,
        "period": 1678.2386972233012,
        "---": "",
        "platinum": 0.05632674191400133,
        "fuel": 0.7544799058678413,
        "terraforming": 0.9598087148845802,
        "orbit": 0.7015293222813869
    },
    {
        "id": "00039",
        "size": 216.51069365823926,
        "distance": 2.7681649,
        "period": 1705.5981516362738,
        "---": "",
        "platinum": 0.8877473170268878,
        "fuel": 0.06607021958006021,
        "terraforming": 0.9195743781975173,
        "orbit": 0.16231651363976207
    },
    {
        "id": "00040",
        "size": 136.60901232216727,
        "distance": 2.2673937,
        "period": 1264.3845391751363,
        "---": "",
        "platinum": 0.575423458325063,
        "fuel": 0.8764803957942302,
        "terraforming": 0.7355942521748814,
        "orbit": 0.4537397428614973
    },
    {
        "id": "00041",
        "size": 129.2645240367122,
        "distance": 2.7595585,
        "period": 1697.6501777393225,
        "---": "",
        "platinum": 0.24102434467054168,
        "fuel": 0.4216889277290824,
        "terraforming": 0.8305897454473181,
        "orbit": 0.19409730895028054
    },
    {
        "id": "00042",
        "size": 107.02354972220051,
        "distance": 2.4428615,
        "period": 1413.9598278130081,
        "---": "",
        "platinum": 0.5886836876064028,
        "fuel": 0.11790838666190584,
        "terraforming": 0.18992305417410027,
        "orbit": 0.40397976739012853
    },
    {
        "id": "00043",
        "size": 89.01831131373174,
        "distance": 2.2028632,
        "period": 1210.793470777964,
        "---": "",
        "platinum": 0.9467320436615146,
        "fuel": 0.7315421522224133,
        "terraforming": 0.9506063032749152,
        "orbit": 0.26210505966007724
    },
    {
        "id": "00044",
        "size": 134.7346664056948,
        "distance": 2.4228674,
        "period": 1396.6360738317694,
        "---": "",
        "platinum": 0.6187679333153466,
        "fuel": 0.9470400484712462,
        "terraforming": 0.29778117267012183,
        "orbit": 0.7521402118290139
    },
    {
        "id": "00045",
        "size": 110.52979166067468,
        "distance": 2.7206237,
        "period": 1661.848822750847,
        "---": "",
        "platinum": 0.7764516883659345,
        "fuel": 0.07535853308341989,
        "terraforming": 0.08002724518759186,
        "orbit": 0.6949080622808997
    },
    {
        "id": "00046",
        "size": 73.02630915985239,
        "distance": 2.5268535,
        "period": 1487.5065547078218,
        "---": "",
        "platinum": 0.05515137969065098,
        "fuel": 0.2172098965792334,
        "terraforming": 0.7685272343520937,
        "orbit": 0.5612815664582337
    },
    {
        "id": "00047",
        "size": 92.78533741746176,
        "distance": 2.8809382,
        "period": 1810.8801150231359,
        "---": "",
        "platinum": 0.13731740862834907,
        "fuel": 0.322663162658979,
        "terraforming": 0.6975872198382924,
        "orbit": 0.00045519188195142224
    },
    {
        "id": "00048",
        "size": 143.04719672357848,
        "distance": 3.1105474,
        "period": 2031.6272599626827,
        "---": "",
        "platinum": 0.22809651470770043,
        "fuel": 0.916873282835568,
        "terraforming": 0.8442727546938085,
        "orbit": 0.6062158670481917
    },
    {
        "id": "00049",
        "size": 94.51034563112196,
        "distance": 3.0926568,
        "period": 2014.1248089685391,
        "---": "",
        "platinum": 0.47872682766015984,
        "fuel": 0.08130633153499156,
        "terraforming": 0.3873270480986437,
        "orbit": 0.831873019355463
    },
    {
        "id": "00050",
        "size": 48.69443727847629,
        "distance": 2.6491327,
        "period": 1596.7773271268713,
        "---": "",
        "platinum": 0.7533990914927657,
        "fuel": 0.17690745526202767,
        "terraforming": 0.7288722286585293,
        "orbit": 0.24094508807769033
    },
    {
        "id": "00051",
        "size": 116.27312674865377,
        "distance": 2.3656391,
        "period": 1347.4464505399476,
        "---": "",
        "platinum": 0.0029850532781865446,
        "fuel": 0.7240198896087227,
        "terraforming": 0.30002336346844394,
        "orbit": 0.39368689852304417
    },
    {
        "id": "00052",
        "size": 187.70651709565982,
        "distance": 3.096339,
        "period": 2017.72301560811,
        "---": "",
        "platinum": 0.47562275228961404,
        "fuel": 0.5689958701791005,
        "terraforming": 0.34596419178768245,
        "orbit": 0.8264655280522645
    },
    {
        "id": "00053",
        "size": 59.35801256796187,
        "distance": 2.6163862,
        "period": 1567.2618325584692,
        "---": "",
        "platinum": 0.5964483658636193,
        "fuel": 0.8860275178033946,
        "terraforming": 0.7396914936364198,
        "orbit": 0.38095349128398803
    },
    {
        "id": "00054",
        "size": 100.80436806628575,
        "distance": 2.7097488,
        "period": 1651.8946552835284,
        "---": "",
        "platinum": 0.866769149819798,
        "fuel": 0.9421098190713773,
        "terraforming": 0.9841156488290448,
        "orbit": 0.2375725264287165
    },
    {
        "id": "00055",
        "size": 98.96448099650542,
        "distance": 2.7609594,
        "period": 1698.9430154032225,
        "---": "",
        "platinum": 0.40978316053670183,
        "fuel": 0.40642570629835106,
        "terraforming": 0.5510326216177657,
        "orbit": 0.37967022964949393
    },
    {
        "id": "00056",
        "size": 74.72731041540476,
        "distance": 2.5964118,
        "period": 1549.348643218414,
        "---": "",
        "platinum": 0.9909223130609185,
        "fuel": 0.875911019485828,
        "terraforming": 0.7479087463196228,
        "orbit": 0.981355075676848
    },
    {
        "id": "00057",
        "size": 134.7346664056948,
        "distance": 3.1527189,
        "period": 2073.082932177587,
        "---": "",
        "platinum": 0.993298138449348,
        "fuel": 0.0884143310873402,
        "terraforming": 0.7457521529442732,
        "orbit": 0.4225639341138593
    },
    {
        "id": "00058",
        "size": 58.00685924337516,
        "distance": 2.699572,
        "period": 1642.5975128013474,
        "---": "",
        "platinum": 0.3663954610707062,
        "fuel": 0.8008774464695961,
        "terraforming": 0.3965928882754809,
        "orbit": 0.042184556551516095
    },
    {
        "id": "00059",
        "size": 89.01831131373174,
        "distance": 2.7121725,
        "period": 1654.1114321849661,
        "---": "",
        "platinum": 0.8494587588237984,
        "fuel": 0.7900819573193986,
        "terraforming": 0.32329176119762626,
        "orbit": 0.5647022209738423
    },
    {
        "id": "00060",
        "size": 78.24910005503162,
        "distance": 2.3931915,
        "period": 1371.0552580344777,
        "---": "",
        "platinum": 0.26643516037227943,
        "fuel": 0.15304900901044627,
        "terraforming": 0.30767339539009253,
        "orbit": 0.26936354708858334
    },
    {
        "id": "00061",
        "size": 99.8801880648043,
        "distance": 2.9826362,
        "period": 1907.6083102107689,
        "---": "",
        "platinum": 0.30174577079360243,
        "fuel": 0.05909480217880103,
        "terraforming": 0.5453479260253381,
        "orbit": 0.09433719429987553
    },
    {
        "id": "00062",
        "size": 60.740638296508344,
        "distance": 3.1270803,
        "period": 2047.8462156138567,
        "---": "",
        "platinum": 0.1314552406178534,
        "fuel": 0.6815142158314926,
        "terraforming": 0.02111550965445408,
        "orbit": 0.09461965476426193
    },
    {
        "id": "00063",
        "size": 106.0423519205758,
        "distance": 2.3944863,
        "period": 1372.1681222488264,
        "---": "",
        "platinum": 0.050014629645503184,
        "fuel": 0.9512343417669421,
        "terraforming": 0.4116940417813557,
        "orbit": 0.2956808288252767
    },
    {
        "id": "00064",
        "size": 100.34121406587809,
        "distance": 2.6810281,
        "period": 1625.7015848808862,
        "---": "",
        "platinum": 0.11068253591886323,
        "fuel": 0.9759399853604548,
        "terraforming": 0.23339948152628465,
        "orbit": 0.2984921973949114
    },
    {
        "id": "00065",
        "size": 162.73439415329497,
        "distance": 3.4289856,
        "period": 2351.458222994646,
        "---": "",
        "platinum": 0.13035405222767504,
        "fuel": 0.018337186556847462,
        "terraforming": 0.05673683888530556,
        "orbit": 0.3122287656035543
    },
    {
        "id": "00066",
        "size": 46.07648610469008,
        "distance": 2.6482274,
        "period": 1595.9589096111401,
        "---": "",
        "platinum": 0.7357707325977081,
        "fuel": 0.9558033247733073,
        "terraforming": 0.5862227850680757,
        "orbit": 0.20019107345660425
    },
    {
        "id": "00067",
        "size": 75.76687085565808,
        "distance": 2.4214042,
        "period": 1395.3710991349617,
        "---": "",
        "platinum": 0.03930517324419325,
        "fuel": 0.5781901743076111,
        "terraforming": 0.8602260920906597,
        "orbit": 0.8220309072120477
    },
    {
        "id": "00068",
        "size": 151.17478214140843,
        "distance": 2.7814497,
        "period": 1717.8910397721427,
        "---": "",
        "platinum": 0.8554661824918103,
        "fuel": 0.3733970042488858,
        "terraforming": 0.028959114571823763,
        "orbit": 0.24270988501946256
    },
    {
        "id": "00069",
        "size": 133.49941155923284,
        "distance": 2.9762239,
        "period": 1901.4599878639967,
        "---": "",
        "platinum": 0.1770706911378731,
        "fuel": 0.09688595539546008,
        "terraforming": 0.9912745155069357,
        "orbit": 0.16607389817163143
    },
    {
        "id": "00070",
        "size": 81.9368665269149,
        "distance": 2.6145406,
        "period": 1565.6037961216691,
        "---": "",
        "platinum": 0.43398993589157087,
        "fuel": 0.5110120657526415,
        "terraforming": 0.41426473044733325,
        "orbit": 0.5352269922989286
    },
    {
        "id": "00071",
        "size": 118.98147579246931,
        "distance": 2.755787,
        "period": 1694.1710305108597,
        "---": "",
        "platinum": 0.006847297920629214,
        "fuel": 0.9885350123849094,
        "terraforming": 0.5212509717903486,
        "orbit": 0.5746833429118386
    },
    {
        "id": "00072",
        "size": 55.90869450803538,
        "distance": 2.2662831,
        "period": 1263.455716846351,
        "---": "",
        "platinum": 0.41503285056205774,
        "fuel": 0.2865798151098804,
        "terraforming": 0.6068294319080305,
        "orbit": 0.8187206220546721
    },
    {
        "id": "00073",
        "size": 56.948114743233305,
        "distance": 2.664561,
        "period": 1610.7468322567368,
        "---": "",
        "platinum": 0.39005807371970524,
        "fuel": 0.7931551319333199,
        "terraforming": 0.5587627352531085,
        "orbit": 0.30093700676466384
    },
    {
        "id": "00074",
        "size": 63.60325638710762,
        "distance": 2.7780095,
        "period": 1714.7049479009215,
        "---": "",
        "platinum": 0.06899370930489523,
        "fuel": 0.29105586047961973,
        "terraforming": 0.8586023857287374,
        "orbit": 0.2648278100009658
    },
    {
        "id": "00075",
        "size": 55.396120515812264,
        "distance": 2.6718947,
        "period": 1617.4013597869887,
        "---": "",
        "platinum": 0.925671034365211,
        "fuel": 0.7641210020672662,
        "terraforming": 0.23730856766688357,
        "orbit": 0.32190526622358573
    },
    {
        "id": "00076",
        "size": 90.25667938004489,
        "distance": 3.4124782,
        "period": 2334.4985999084493,
        "---": "",
        "platinum": 0.10061799280391515,
        "fuel": 0.2714573328191674,
        "terraforming": 0.7052754133836983,
        "orbit": 0.5802803839108813
    },
    {
        "id": "00077",
        "size": 67.83898656010264,
        "distance": 2.6689973,
        "period": 1614.7711656904748,
        "---": "",
        "platinum": 0.878520513402341,
        "fuel": 0.19533323237757305,
        "terraforming": 0.03500075932388902,
        "orbit": 0.31732293978470594
    },
    {
        "id": "00078",
        "size": 82.6950190183689,
        "distance": 2.6194947,
        "period": 1570.055758917207,
        "---": "",
        "platinum": 0.8915978120320466,
        "fuel": 0.1252019554190853,
        "terraforming": 0.14642018609358987,
        "orbit": 0.2650958019752705
    },
    {
        "id": "00079",
        "size": 87.7969342942663,
        "distance": 2.4447408,
        "period": 1415.5917541974236,
        "---": "",
        "platinum": 0.7050636246826284,
        "fuel": 0.1190252310857921,
        "terraforming": 0.7099821938817479,
        "orbit": 0.15555680204728917
    },
    {
        "id": "00080",
        "size": 86.9920071624104,
        "distance": 2.2961742,
        "period": 1288.5344160129032,
        "---": "",
        "platinum": 0.7886045217042289,
        "fuel": 0.005826588151813694,
        "terraforming": 0.5823201686883108,
        "orbit": 0.05565120707904325
    },
    {
        "id": "00081",
        "size": 69.1002074844395,
        "distance": 2.8577326,
        "period": 1789.0446746511975,
        "---": "",
        "platinum": 0.28386662118377204,
        "fuel": 0.41534577649177296,
        "terraforming": 0.05500249021015324,
        "orbit": 0.866964237057124
    },
    {
        "id": "00082",
        "size": 71.6934288040265,
        "distance": 2.7648307,
        "period": 1702.5175663663501,
        "---": "",
        "platinum": 0.7920180124541132,
        "fuel": 0.26372076076863094,
        "terraforming": 0.7526573892966931,
        "orbit": 0.2837536579113237
    },
    {
        "id": "00083",
        "size": 63.60325638710762,
        "distance": 2.4316552,
        "period": 1404.2414478137134,
        "---": "",
        "platinum": 0.8654412666019338,
        "fuel": 0.9403166673830571,
        "terraforming": 0.4960078107200274,
        "orbit": 0.23818838210115234
    },
    {
        "id": "00084",
        "size": 46.93311193803248,
        "distance": 2.3627345,
        "period": 1344.9655782775308,
        "---": "",
        "platinum": 0.16840371570314527,
        "fuel": 0.6723872529911648,
        "terraforming": 0.1844102861291106,
        "orbit": 0.15432646369564362
    },
    {
        "id": "00085",
        "size": 103.15240343351996,
        "distance": 2.6524031,
        "period": 1599.735136455435,
        "---": "",
        "platinum": 0.10294282886420092,
        "fuel": 0.3356644035490093,
        "terraforming": 0.6439873948641912,
        "orbit": 0.6675592787574872
    },
    {
        "id": "00086",
        "size": 67.21703499290082,
        "distance": 3.1128904,
        "period": 2033.9231636209272,
        "---": "",
        "platinum": 0.43487651772863334,
        "fuel": 0.5688483938780614,
        "terraforming": 0.04016760367576422,
        "orbit": 0.3046992782021424
    },
    {
        "id": "00087",
        "size": 140.4362911381482,
        "distance": 3.4794344,
        "period": 2403.5422285906943,
        "---": "",
        "platinum": 0.8531482419686499,
        "fuel": 0.8692776771424919,
        "terraforming": 0.7765359487088436,
        "orbit": 0.4680693103151812
    },
    {
        "id": "00088",
        "size": 134.11561684527942,
        "distance": 2.7677006,
        "period": 1705.1690728860272,
        "---": "",
        "platinum": 0.8397169831123399,
        "fuel": 0.7174840505191735,
        "terraforming": 0.6339523984161034,
        "orbit": 0.8831909304194
    },
    {
        "id": "00089",
        "size": 164.24015696315365,
        "distance": 2.5509542,
        "period": 1508.8386320232355,
        "---": "",
        "platinum": 0.6911305395120384,
        "fuel": 0.27485944306268606,
        "terraforming": 0.9418408433774326,
        "orbit": 0.08981095364353542
    },
    {
        "id": "00090",
        "size": 76.11659484157803,
        "distance": 3.1486846,
        "period": 2069.1050474428785,
        "---": "",
        "platinum": 0.8272653513938373,
        "fuel": 0.13413983649952077,
        "terraforming": 0.7272334474570231,
        "orbit": 0.8695388629853468
    },
    {
        "id": "00091",
        "size": 58.54359010362039,
        "distance": 2.5901958,
        "period": 1543.7880464449267,
        "---": "",
        "platinum": 0.8128036847006466,
        "fuel": 0.11334795455536484,
        "terraforming": 0.3428281359571017,
        "orbit": 0.7853153962158109
    },
    {
        "id": "00092",
        "size": 163.48554198778828,
        "distance": 3.1875818,
        "period": 2107.5640647508353,
        "---": "",
        "platinum": 0.8255026248367946,
        "fuel": 0.24665996410831348,
        "terraforming": 0.9082003202919281,
        "orbit": 0.6765678232846182
    },
    {
        "id": "00093",
        "size": 90.25667938004489,
        "distance": 2.7553611,
        "period": 1693.7783345332864,
        "---": "",
        "platinum": 0.06786744891002328,
        "fuel": 0.7114593444513808,
        "terraforming": 0.38576180193200715,
        "orbit": 0.7415599965709243
    },
    {
        "id": "00094",
        "size": 105.07014979446737,
        "distance": 3.1628508,
        "period": 2083.0843619489774,
        "---": "",
        "platinum": 0.8160612009286131,
        "fuel": 0.7395774555902221,
        "terraforming": 0.7372840485888301,
        "orbit": 0.5395657062736148
    },
    {
        "id": "00095",
        "size": 86.19445964685667,
        "distance": 3.0642023,
        "period": 1986.3919633519934,
        "---": "",
        "platinum": 0.15094043377507627,
        "fuel": 0.3425655562909622,
        "terraforming": 0.9463152730246805,
        "orbit": 0.6973050393383026
    },
    {
        "id": "00096",
        "size": 100.34121406587809,
        "distance": 3.0513158,
        "period": 1973.8744467676074,
        "---": "",
        "platinum": 0.062448989701026525,
        "fuel": 0.7142086206237419,
        "terraforming": 0.09311144420352813,
        "orbit": 0.13164004150232933
    },
    {
        "id": "00097",
        "size": 102.20669651439805,
        "distance": 2.6708496,
        "period": 1616.4524926162444,
        "---": "",
        "platinum": 0.13829564750546575,
        "fuel": 0.046491658402301184,
        "terraforming": 0.33893059905332,
        "orbit": 0.7455002082505297
    },
    {
        "id": "00098",
        "size": 58.54359010362039,
        "distance": 2.6886711,
        "period": 1632.6583923539342,
        "---": "",
        "platinum": 0.638353989332299,
        "fuel": 0.8361948106722743,
        "terraforming": 0.6093020212921001,
        "orbit": 0.23340156428586123
    },
    {
        "id": "00099",
        "size": 44.61484118950052,
        "distance": 2.6655853,
        "period": 1611.6757741066406,
        "---": "",
        "platinum": 0.14883587811362364,
        "fuel": 0.5838330654488558,
        "terraforming": 0.3567838213839044,
        "orbit": 0.881530254966133
    },
    {
        "id": "00100",
        "size": 100.34121406587809,
        "distance": 3.0898061,
        "period": 2011.3406549806857,
        "---": "",
        "platinum": 0.10247341461055381,
        "fuel": 0.7247877769360253,
        "terraforming": 0.7990156346608236,
        "orbit": 0.9514073649491357
    },
    {
        "id": "00101",
        "size": 74.04220631550106,
        "distance": 2.5855148,
        "period": 1539.6050318341813,
        "---": "",
        "platinum": 0.025688113138033986,
        "fuel": 0.31780456182028594,
        "terraforming": 0.0876644356060311,
        "orbit": 0.600968731264182
    }
]

In [143]:
with open('dataset.js', 'w') as fw:
    fw.write('var dataset = ')
    fw.write(json.dumps(tojson, indent=4))

In [ ]: