import pandas as pd
import matplotlib.pylab as plt
%matplotlib inline
df = pd.read_pickle("../data/gp-history_FY1C_decayed_only.pkl.gz","gzip")
df.EPOCH = pd.to_datetime(df.EPOCH, infer_datetime_format=True)
first = df.groupby(by=["NORAD_CAT_ID"]).first()
last = df.groupby(by=["NORAD_CAT_ID"]).last()
plt.scatter(first.PERIOD, first.APOAPSIS, color='#fc821535', s=2)
plt.scatter(first.PERIOD, first.PERIAPSIS, color='#76aa4335', s=2)
plt.show()
plt.scatter(last.PERIOD, last.APOAPSIS, color='#fc821535', s=2)
plt.scatter(last.PERIOD, last.PERIAPSIS, color='#76aa4335', s=2)
plt.show()