Tell us what works and what could be better. We read every submission.
@alteist·9 public vizzes
This example demonstrates how an ESP32 microcontroller detects button presses on an iTAG BLE device and triggers a sound response. The code uses the BLEDevice library to scan for the iTAG’s advertised address, connect to its FFF0 service, and register a notify callback on the FFF1 characteristic to monitor button state. When pressed, the callback increments a counter and sets a timer, while a second characteristic (FFF2) is prepared for sending sound commands. The sketch also includes serial logging and an LED indicator, with the connection logic managing reconnection via ESP.restart().
This visualization compares four Russian ministries across three metrics: execution percentage, budget in billions, and plan achievement. Using D3 v4 with SVG rendering, it employs a divergent bar chart with two mirrored linear scales (x1, x2) for execution values and a third scale (x3) for budget data, arranged around a central axis. The code defines scales, axes, and grid lines programmatically, with data loaded from an inline array. Y-axis categories are displayed via a band scale, while grid lines are generated through custom axis functions that omit tick labels.
A radar-style chart displays three KPI values as points on concentric circular grids, with connecting lines forming a polygon. The visualization includes a header title, value labels along the axes, and a context area at the bottom showing the selected data point's name and value on mouseover. Built with D3 v4, it uses SVG elements including circles, lines, paths, and text, with event handlers for interactive highlighting of data points.
This visualization, titled “bars of bars,” displays four years of numeric values as grouped bar charts. Each year’s value is rendered as a vertical stack of small rectangles, with positive values extending upward from a zero line and negative values extending downward. The code uses d3.v4 to parse dates, apply linear and band scales, and draw axes. Rectangles are generated via d3.range and appended inside SVG groups, with steelblue fills, based on the data from the gist.
A radial pie chart displays demographic proportions of men and women in Russia, using 100 small circles arranged around a larger circle. Each dot’s color corresponds to one of two categories, with the boundary between colors determined by a threshold scale. The chart uses d3.v4 with SVG, computing angles in radians and positioning dots via trigonometric functions. A legend shows percentages and category names, while an inner grey circle outlines the main structure. Data is hardcoded as an array of population counts.
This visualization demonstrates Kazakhstan’s administrative regions and major cities using a Mercator projection. It renders region boundaries as semi-transparent steelblue paths with hover effects, while city points scale by population using `path.pointRadius`. Regional labels appear via `d3.geoPath` centroids, with white halo text for readability. The code uses D3.js v4’s `geoMercator`, `geoPath`, and JSON loading for both the country’s GeoJSON boundaries and a separate cities dataset.
This example shows a Python script that converts The Bat! mail databases into Unix mbox format by scanning directories for `.TBB` files and reconstructing their folder structure. It relies on `subprocess.Popen` to invoke `wine` and run the external `tbb2mbx.exe` converter, while `os.getcwd` and filesystem path parsing handle directory traversal. The script validates dependencies like `wine` and the converter, builds shell commands for creating output directories and executing conversions, and prompts the user for confirmation before running them. Error handling tracks `ValueError` and `UnicodeDecodeError` exceptions during path parsing.
This script converts an Everpad Evernote client database (SQLite schema v5) into a Zim wiki notebook structure, creating one text file per note plus attachment folders. It uses the `sqlite3` command-line tool to query notebooks, notes, and resources, then pipes HTML note content through `pandoc` to convert it to Markdown-compatible Zim format. The script strips filenames with `sed`, copies attachments from their stored paths, and appends attachment links at the end of each note. Finally, it invokes `zim --index` and `zim --gui` to build and open the resulting notebook.