US data visualization using a 3D printed topological map and LED matrices.
The map viewer displays a US COVID-19 heat map. The color of a city depends on the number of positive cases of the state it resides in. The number of positive cases is mapped from a logarithmic (min_positive_cases..max_positive_cases) scale to a linear (yellow..red) scale. The map can be transformed by supplying the LED matrix coordinates of three reference cities, displayed in white.
The map viewer requires the Eigen library. To "install" Eigen, download and extract its source.
cd ~/Downloads
wget https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.bz2
tar -xf eigen-3.3.7.tar.bz2
When you run make
, use the directory's path for the EIGEN
variable.
make map-viewer EIGEN="~/Downloads/eigen-3.3.7/"
sudo ./map-viewer [options]
Options:
--ref-string, -r : Comma-separated reference string with format,
"<city1>,<st1>,<x1>,<y1>,<city2>,<st2>,<x2>,<y2>,<city3>,<st3>,<x3>,<y3>"
(default="Olympia,WA,19,4,Augusta,ME,109,10,Austin,TX,60,51")
--led-cols : Number of columns in one panel (default=32).
--led-rows : Number of rows in one panel (default=32).
--led-chain : Number of daisy-chained panels (default=1).
--led-parallel : Number of parallel chains (range=1..3, default=1).
Flags:
--show-ref, -s : Show reference cities in white.
--use-remapper, -m : Use the remapper for the setup at Penn.
The LED matrix coordinate system has the top left pixel at the origin; the x-axis points from left to right and the Y axis points from top to bottom.
sudo ./map-viewer --led-chain 8 --led-parallel 3 --use-remapper --ref-string "Brownsville,TX,100,120,Seattle,WA,18,19,Portland,ME,178,22"
sudo ./map-viewer --led-cols 64 --led-rows 64 --led-chain 2 --ref-string "Olympia,WA,19,4,Augusta,ME,109,10,Austin,TX,60,51"
The panel test cycles colors one panel at a time. It also displays the column and row numbers for panels according to how they've been wired (not necessarily how they've been arranged after-the-fact).
make panel-test
sudo ./panel-test [options]
Options:
--led-cols : Number of columns in one panel (default=32).
--led-rows : Number of rows in one panel (default=32).
--led-chain : Number of daisy-chained panels (default=1).
--led-parallel : Number of parallel chains (range=1..3, default=1).
--led-pixel-mapper : Semicolon-separated list of pixel-mappers to arrange
pixels.
Available: "Rotate:<degrees>"
sudo ./panel-test --led-cols 64 --led-rows 64 --led-chain 2
- Henner Zeller - Raspberry Pi LED Matrix library
- SimpleMaps - US cities database
- The COVID Tracking Project - COVID-19 state data