STA250HW4
In this assignment I create an interactive display to summarize the Received Signal Strength Indication from the field test data available on http://www.crawdad.org/cu/rssi/. The dataset consists of RSSI data measured at 179 locations among which we discard two locations where the data is incomplete. At each location, RSSI is measured with an omni-directional antenna at four directions (up, down, left and right). On each direction, the measurement takes place during the transmitting of around 500 packets (some measurements are lost apparently). We design an interactive SVG plot, in which the line segments specify the floor plan, the black dots denote the location of measurement and the red triangles denote the base stations (BSs). Upon clicking each black dot, a blue cross appears at that location indicating the direction of the measurement and a set of black lines are plotted to indicate the line of sight (LOS) between the location and each BS. When the mouse is moved over each arm of the cross, the rounded mean RSSI for all BSs will be shown in blue text in the middle of the corresponding LOS. The implementation of this interactive visualization mainly takes two steps. In the first step, we process RSSI data from .csv files and manually generate the SVG file with the XML package for R (“plotSVG.R”). Considering the highly hierarchical structure of the data, we embedded the preprocessd data in the SVG file as XML nodes. Specifically, the RSSI data for each BS, on each direction, at each location, are constructed as a 3-level XML node as a child node for each black dot in the .svg file. Note that it is not a good idea to generate the .svg file with R because the data structure is too complicated for the SVG engine of R to recognize. We also annotate the elements in the .svg file manually at this step. The resulting file is “testVis.svg”. In the second step, we add the interactive feature to the .svg file. This is done by adding javascript the .svg file with XML package in R (“annotateSVG.R”). The resulting file is “./workspace/data/testVisAnnotated.svg”.