Public
Edited
May 26, 2023
Paused
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`We have **${dataBasic.length}** entries from the basic csv file.

Each entry contains the ap, user, mac, state and timestamp fields. The entry above is telling us that: user **1** is connected to ap **3** with a device that has mac address **3** and the connectionstate is **1**.
`
Insert cell
dataBasic = {
const data = await FileAttachment("basic.csv").csv();
const p = data.map(({ ap, user, mac, state, timestamp }) => {
return {
ap: Number(ap),
user: Number(user),
mac: Number(mac),
state: Number(state),
timestamp: new Date(Number(timestamp) * 1000)
};
});
return p;
}
Insert cell
Insert cell
Insert cell
md`We have **${dataDetails.length}** entries from the details csv file.

Each entry on that dataset describes the connection quality for a client. In the entry above, for the timestamp **${ddo.timestamp}**, the client sent **${ddo.bytes_rx}** bytes and **received ${ddo.bytes_tx}**. It retried **${ddo.retries}** times. The [rssi](https://www.metageek.com/training/resources/understanding-rssi/) and [snr](https://en.wikipedia.org/wiki/Received_signal_strength_indicator) were **${ddo.rssi}** and **${ddo.snr}** respectively. We have received **${ddo.pkts_rx}** packets and sent **${ddo.pkts_tx}** packets. The wifi speed was **${ddo.speed}** and the number of retries was **${ddo.tx_retries}**.

NOTE: The original dataset contained quite a few entries with all zero values. I have removed those from the dataset.

`
Insert cell
dataDetails = {
const data = await FileAttachment("details@1.csv").csv();
const p = data.map((o) => {
const keys = Object.keys(o);
const newObj = {};
keys.map(
(k) =>
(newObj[k] =
k === "timestamp" ? new Date(Number(o[k]) * 1000) : Number(o[k]))
);
return newObj;
});
return p;
}
Insert cell
foo = "111111"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more