<jupyter_start><jupyter_text>Overview<jupyter_code>df.drop("newpos", axis='columns').hist(figsize=(25,15), bins=101);
gdf = gpd.GeoDataFrame(df, crs='EPSG:4326', geometry=gpd.points_from_xy(df['long'], df['lat']))
ax = gdf.plot(figsize=(25, 15), marker='.', alpha=0.1)
ctx.add_basemap(ax, source=ctx.providers.OpenStreetMap.Mapnik, crs=gdf.crs)<jupyter_output><empty_output><jupyter_text>Location<jupyter_code>df.groupby(df.long.round(3))['datarate'].median().plot();
ax = df.boxplot('datarate', by=df.long.round(2), rot=90)
plt.suptitle('')
plt.gca().xaxis.set_label_text('');<jupyter_output><empty_output><jupyter_text>Directions and time<jupyter_code>df["dlong"].hist(bins=101);
# Note: 0.0005/360 * earth circumference * cos(47°)/s = 136.7 km/h
df["time"].groupby(df["time"].dt.hour).count().plot(kind="bar");
ax = df["time"][df.dlong<0].groupby(df["time"].dt.hour).count().plot(kind="bar", color='blue', alpha=0.7)
ax = df["time"][df.dlong>0].groupby(df["time"].dt.hour).count().plot(ax=ax, kind="bar", color='orange', alpha=0.7)
ax = df[df.dlong<0].groupby(df.long.round(3))['datarate'].mean().plot()
ax = df[df.dlong>0].groupby(df.long.round(3))['datarate'].mean().plot(ax=ax);
ax = df.plot.scatter(x="long", y="rssi", alpha=0.1, marker='.', color='blue')
start = df.time.min()
map = dict(df.groupby([(df.time-start).dt.days, df.long.round(3)])['datarate'].mean())
X = range((df.time-start).dt.days.min(), (df.time-start).dt.days.max()+1)
Y = sorted(df.long.round(3).unique())
Z = np.array([[map[x,y] if (x,y) in map else np.nan for x in X] for y in Y])
plt.pcolormesh(X, Y, Z, shading='auto')
plt.colorbar()
plt.gcf().set_size_inches(25, 15)<jupyter_output><empty_output><jupyter_text>Correlations<jupyter_code>df.corr()<jupyter_output><empty_output><jupyter_text>Gaps in measurements<jupyter_code>print("1 second interval:", (df["time"].diff() == datetime.timedelta(seconds = 1)).mean())
print("2 second interval:", (df["time"].diff() == datetime.timedelta(seconds = 2)).mean())
print("3 second interval:", (df["time"].diff() == datetime.timedelta(seconds = 3)).mean())
print(">3 second interval:", (df["time"].diff() > datetime.timedelta(seconds = 3)).mean())<jupyter_output><empty_output><jupyter_text>Data rate scatter plots<jupyter_code>for c in ['lat', 'long', 'ele', 'rsrq', 'sinr', 'signal', 'pci', 'rssi', 'netmode', 'rsrp', 'dlong', 'dlat', 'line']:
    df.plot.scatter(x=c, y="datarate", marker='.', alpha=0.01)<jupyter_output><empty_output><jupyter_text>Signal strength scatter plots<jupyter_code>t = ["rssi", "rsrq", "rsrp", "signal", "sinr"]
fig, axs = plt.subplots(len(t), len(t))
for i in range(len(t)):
    for j in range(len(t)):
        if (i==j):
            ax = df[t[i]].hist(ax=axs[i,j], figsize=(25,15), bins=101)
        else:
            ax = df.plot.scatter(ax=axs[i,j], x=t[j], y=t[i], figsize=(25,15), marker='.', alpha=0.01)<jupyter_output><empty_output><jupyter_text>Cell ids<jupyter_code>id_times = df.groupby("cell_id")["time"]
durations = id_times.max() - id_times.min()
long_duration_cells = durations[durations > '8 00:00:00'] # Select only cell_ids seen for at least a week
ax = df[(df.cell_id.isin(long_duration_cells.index))].plot.scatter(x='time', y="cell_id", marker='.', alpha=0.01, figsize=(25,15))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.23635254650808174, 'fraction_numerical': 0.0292772186642269, 'mean_word_length': 7.179551122194514, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '656895', 'license': 'Apache-2.0', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1321, 'n_words': 189, 'path': 'intro.ipynb', 'repo_name': 'mherlich/wireless-data-set', 'size': '3279'}