Skip to main content
Public

Share visualization

Loading preview…

Most Obese Countries as of 2014

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Most Obese Countries as of 2014

4
CCurran Kelleher
Last edited Sep 16, 2019
Created on Sep 16, 2019

This visualization displays the 80 countries with the highest obesity rates in 2014, ranked from highest to lowest using horizontal bars. The data is loaded from a CSV file via the `d3.csv` method, then sorted with `d3.descending` before being sliced to the top 80 entries. The chart is built using the Vega-Lite API (via `vega-lite-api`), with `markBar`, `vl.y().fieldQ('value')`, and `vl.x().fieldN('Country').sort('-y')` for encoding. Custom axis and label styling is applied through the `config` object.

AI-generated description

A visualization of countries with top Global Obesity Rates 2014 using the vega-lite-api.

This variant adds sorting the data before slicing, which makes the top list accurate.

Comments

Sign in to join the discussion.

MIT Licensed