Tell us what works and what could be better. We read every submission.
@adima·3 public vizzes
This visualization shows a terminal configuration file for the Zsh shell, highlighting the custom prompt and plugin setup. The code uses the oh-my-zsh framework with the "agnoster" theme, and a custom `prompt_context` function that replaces the default username display with a frog emoji. It sources the zsh-syntax-highlighting plugin for command highlighting and sets up `dircolors` for colorized directory listings. The visualization demonstrates how shell customization can be achieved through environment variables, theme selection, and plugin integration.
This choropleth maps road accident deaths across Russian regions, using a color scale from light yellow to dark red to indicate increasing fatality counts. It loads geographic boundaries from a TopoJSON file and accident statistics from a CSV, joining them by region code. The visualization uses D3 v3 with `d3.geo.albers` projection, `d3.geo.path` for rendering SVG paths, `d3.scale.threshold` with ColorBrewer palettes, and `queue()` for asynchronous data loading.
This example demonstrates a custom SQLAlchemy construct that compiles an `INSERT ... ON DUPLICATE KEY UPDATE` statement for MySQL, enabling efficient bulk upserts. The `Upsert` class extends `sqlalchemy.sql.expression.Insert`, and a `@compiles` decorator registers a MySQL-specific compiler function that transforms the insert into an upsert by appending the `ON DUPLICATE KEY UPDATE` clause with `VALUES()` references. The code detects auto-increment primary keys to use `LAST_INSERT_ID()` for correct ID handling, and it supports both single-row and multi-row parameter sets.