In [1]:
%matplotlib inline
In [2]:
import pandas as pd
import matplotlib.pyplot as plt
In [3]:
data_file = "P753-line-magnetic-AWAGS_MAG_2010.dat"
columns = [
    "line", "levelFlag", "lineType", "Fiducial", "altitude",
    "FlightNumber", "gpsAltitude", "mag awagsLevelled", "mag tieLevelled",
    "longitude", "latitude"
]
df = pd.read_csv(data_file, delim_whitespace=True, header=None, names=columns)
In [4]:
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 5961492 entries, 0 to 5961491
Data columns (total 11 columns):
 #   Column             Dtype  
---  ------             -----  
 0   line               int64  
 1   levelFlag          int64  
 2   lineType           int64  
 3   Fiducial           int64  
 4   altitude           float64
 5   FlightNumber       int64  
 6   gpsAltitude        float64
 7   mag awagsLevelled  float64
 8   mag tieLevelled    float64
 9   longitude          float64
 10  latitude           float64
dtypes: float64(6), int64(5)
memory usage: 500.3 MB
In [5]:
df["line"].plot.hist()
Out[5]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9fef0040>
In [6]:
s = df["line"].value_counts()
s = s[:10]
In [7]:
plt.barh([f"{i}" for i, _ in s.iteritems()], s.values)
Out[7]:
<BarContainer object of 10 artists>
In [8]:
df["levelFlag"].plot.hist()
Out[8]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cb72f10>
In [9]:
s = df["levelFlag"].value_counts()
plt.barh([f"{i}" for i, _ in s.iteritems()], s.values)
Out[9]:
<BarContainer object of 2 artists>
In [10]:
df["lineType"].plot.hist()
Out[10]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cc399a0>
In [11]:
s = df["lineType"].value_counts()
plt.barh([f"{i}" for i, _ in s.iteritems()], s.values)
Out[11]:
<BarContainer object of 2 artists>
In [12]:
df["Fiducial"].plot.hist()
Out[12]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cc0ffa0>
In [13]:
s = df["Fiducial"].value_counts()
s
Out[13]:
361273    23
361259    23
361200    23
361205    23
361253    23
          ..
677674     1
230929     1
661283     1
669479     1
229488     1
Name: Fiducial, Length: 450723, dtype: int64
In [14]:
s = s[:10]
plt.barh([f"{i}" for i, _ in s.iteritems()], s.values)
Out[14]:
<BarContainer object of 10 artists>
In [15]:
df["altitude"].plot.hist()
Out[15]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cd3b5b0>
In [16]:
s = df["altitude"].value_counts()
s
Out[16]:
80.94     7492
80.92     7469
81.19     7460
80.83     7446
81.06     7409
          ... 
501.32       1
507.73       1
645.15       1
514.06       1
604.83       1
Name: altitude, Length: 56025, dtype: int64
In [17]:
df["FlightNumber"].plot.hist()
Out[17]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cd524c0>
In [18]:
df["gpsAltitude"].plot.hist()
Out[18]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9ce95bb0>
In [19]:
df["mag awagsLevelled"].plot.hist()
Out[19]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cf1cca0>
In [20]:
df["mag tieLevelled"].plot.hist()
Out[20]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cf81850>
In [21]:
df["longitude"].plot.hist()
Out[21]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9cfe1eb0>
In [22]:
df["latitude"].plot.hist()
Out[22]:
<matplotlib.axes._subplots.AxesSubplot at 0x17a9d03ee80>