Chart Types Explained
Data Race offers nine distinct chart modes for every dataset, plus a data table for exact numbers. Each mode highlights a different aspect of the data — rankings, trends, composition, geographic patterns, rank trajectories, the flow of the whole, or direct magnitude comparison. This guide explains what each visualization shows, how to read it, and when it is most useful.
Bar Chart Race
The bar chart race is the signature visualization of Data Race. It shows ranked entities as horizontal bars, with the longest bar representing the highest value. As the animation plays, bars move up and down to reflect changing rankings, creating a dynamic race effect. Each bar is color-coded and labeled with the entity name, flag (for countries), and current value.
When to use: Use the bar chart race when you want to see how rankings change over time. It is especially effective for comparing a moderate number of entities (10–20) and spotting dramatic rises or falls.
- Bar length represents the value — longer bars mean higher values
- Bar position shows the rank — top bar is rank #1
- Smooth transitions between periods show ranking changes
- Colors are consistent per entity throughout the animation
Bump Chart
The bump chart plots each entity's rank over time on a 1..N axis, with rank #1 at the top. Lines weave up and down whenever rankings change, and crossings mark moments of overtaking. The focus is on the order, not the absolute values — a tight race for #1 looks the same whether the gap is one dollar or one trillion. Pinned entities draw with a brighter line and a halo around the dot.
When to use: Use the bump chart when ranking order is the story — Olympic medal standings, top-10 economies over a century, leaderboards where positions shuffle. It's the clearest view of who overtook whom and when.
- Y-axis is rank: #1 at the top, #N at the bottom
- A line dipping or rising shows that entity gaining or losing position
- Two lines crossing = one entity overtaking another in that period
- Flat horizontal lines mean the rank held steady
- Entities outside the visible top-N show as chips at the bottom edge
Line Chart
The line chart plots each entity's value over time as a continuous line. All entities are shown on the same axes, making it easy to compare long-term trends. The chart highlights the current period with a vertical marker, and you can hover over any point to see the exact value. Pinned entities are emphasized with thicker lines while others fade into the background.
When to use: Use the line chart when you want to track trends over time, compare growth trajectories, or identify crossover points where one entity surpasses another.
- The Y-axis shows the value scale, the X-axis shows time periods
- Each line represents one entity — follow a line to see its trajectory
- Steeper slopes indicate faster growth or decline
- Crossing lines show ranking changes between entities
Streamgraph
The streamgraph stacks each entity's raw values as colored bands around a centered baseline, growing symmetrically above and below as time progresses. The total height at any moment equals the combined value of all entities, so you see composition AND total magnitude at once. As you play, the stream flows in from the left — bands appearing, swelling, and rebalancing in one organic mass. Best on monotonically growing datasets where the whole picture is the story.
When to use: Use the streamgraph when you want to feel the whole evolve as a single flowing form — world GDP exploding while regions rebalance, the OSS ecosystem expanding while new libraries displace old ones, market cap growing while sectors rotate.
- Band thickness at any point = that entity's raw value at that period
- Total chart height = sum of all visible entities (top-N + Others)
- Bands extend from left as the animation plays — the leading edge is the current moment
- The center stays at y=0; the chart grows symmetrically above and below
- Flags appear inside each band; thin bands crop to a sliver of color
Pie Chart
The pie chart shows the composition of values for a single time period. Each slice represents one entity's share of the total. As the animation plays, slice sizes adjust to reflect changing proportions. The chart is most informative when a few large entities dominate the total, revealing concentration or diversification patterns.
When to use: Use the pie chart when you want to understand what share each entity holds of the total — for example, which countries produce the most CO₂ or hold the largest GDP share.
- Slice size represents the entity's share of the total
- Hover over a slice to see the exact percentage and value
- Small slices are grouped into 'Others' to maintain readability
- Watch for slices growing or shrinking over time to spot shifting dominance
Treemap
The treemap divides the chart area into rectangles, each sized in proportion to one entity's value — the larger the value, the larger the rectangle. The d3-treemapResquarify algorithm keeps shapes squarish across periods, so rectangles slide and resize smoothly rather than reshuffling chaotically. Long-tail entities below the top-N collapse into an 'Others' tile that grows and shrinks with the rest.
When to use: Use the treemap when the story is 'how much of the total does each entity take up' and you want every entity packed into a single frame — no scrolling, no slicing into separate views.
- Rectangle area is proportional to the entity's value
- Largest rectangle is rank #1 — typically anchored to the upper-left
- Shapes stay squarish as the layout updates between periods, preserving readability
- Tiles below the top-N gather into an 'Others' rectangle
- Flag, name, and value sit inside each rectangle; thin tiles drop the flag to fit
Choropleth Map
The choropleth map colors countries according to their values using a continuous color scale. Darker or more intense colors indicate higher values. The map provides an immediate geographic overview, highlighting regional patterns and clusters that are hard to spot in other chart types. Hover over any country to see its name, value, and rank.
When to use: Use the choropleth map when geography matters — to identify regional clusters, compare neighbors, or see how a variable distributes across continents.
- Color intensity corresponds to value — check the legend for the scale
- Gray countries have no data available for the selected period
- Regional patterns (e.g., European cluster, Sub-Saharan belt) are easy to spot
- Hover for exact values; click to pin a country for comparison
Bubble Map
The bubble map is a proportional-symbol map: each entity is drawn as a circle pinned to its country (or region) centroid, with the circle's radius proportional to the value. Position never moves — only the radius and color animate. The result is a geographic snapshot that grows and shrinks in place as time progresses, making it easy to see both 'where' and 'how big' in one view.
When to use: Use the bubble map when you want a single visual that combines geography with magnitude — for example, watching market cap concentrate in a few coastal US cities while smaller bubbles light up across Asia and Europe.
- Circle position is fixed at each country's centroid
- Circle radius is proportional to the value at the current period
- Value is centered inside the circle (no flag — the location identifies the entity)
- Color follows the entity's category palette, fading as it drops out of the top-N
- Periods with no data show no circle for that entity
Bubble Chart
The bubble chart packs each entity as a free-floating circle sized by value, with d3-force resolving collisions so circles cluster tightly without overlapping. The pack layout is recomputed per period and lerped between adjacent periods for smooth animation. There are no axes — position carries no quantitative meaning; only the size does. A global √value scale keeps the largest entity reliably largest as the data evolves.
When to use: Use the bubble chart when you want pure magnitude comparison, freed from axes and geography — ideal for 'which is bigger and by how much' across the top entities at a glance.
- Circle radius is proportional to √(value) — the largest entity gets the largest circle
- Position is decorative; circles drift but their pixel location has no value meaning
- Flag sits at 18px when room allows; hidden in circles smaller than 4px
- Aggregate mode (region/group) centers the value with no flag
- Color follows the entity's category palette
Data Table
The data table presents all values in a sortable, scrollable grid. Each row shows an entity with its rank, name, value, global share, and year-over-year change. Unlike animated charts, the table shows precise numbers, making it ideal for detailed comparisons and data verification. Sort by any column to find top performers, biggest movers, or specific entities.
When to use: Use the data table when you need exact numbers rather than visual impressions — for fact-checking, detailed comparisons, or exporting data for further analysis.
- Sort by the 'Value' column to see the highest or lowest entries
- The 'Change' column shows growth or decline from the previous period
- Use the 'Share' column to compare each entity's portion of the global total
- Download the table as CSV for use in spreadsheets or research
Choosing the Right Chart
Each chart type answers a different question. The bar chart answers 'Who is winning right now?' The bump chart answers 'Who overtook whom in rank?' The line chart answers 'How did each value evolve?' The streamgraph answers 'How does the whole flow as one?' The pie chart answers 'What share does each hold at this moment?' The treemap answers 'How much of the total does each take up?' The choropleth map answers 'Where are values highest geographically?' The bubble map answers 'How big — and where?' The bubble chart answers 'How do raw magnitudes compare?' And the table answers 'What are the exact numbers?' Switching between views on the same dataset gives you a complete picture of the data from multiple angles.
- Rankings and competition → Bar Chart
- Rank trajectories and overtakings → Bump Chart
- Long-term trends and trajectories → Line Chart
- Composition flowing through time → Streamgraph
- Share at a moment → Pie Chart
- All entities packed into one frame → Treemap
- Geographic patterns → Choropleth Map
- Geography + magnitude in one view → Bubble Map
- Pure magnitude comparison → Bubble Chart
- Exact values and export → Data Table