{
  "id": "before-after-slider",
  "name": "Before and after slider",
  "family": "time",
  "tier": "pro",
  "summary": "Use a before-and-after slider to lay two states of the same picture on top of each other and let readers drag between them.",
  "title": "In 2005 one person in six was online; by 2024 it was seven in ten",
  "subtitle": "Share of people using the internet, by country, 2005 and 2024, %",
  "howToRead": "Left of the divider is 2005, right of it is 2024; drag the divider across any country to watch it change.",
  "useWhen": [
    "the same map, photo or chart exists in two states",
    "the change is visible in shape or colour, not only a number",
    "readers want to scrub back and forth themselves"
  ],
  "avoidWhen": [
    "there are more than two states (use a year slider)",
    "the change is small and needs exact values (use a dumbbell)",
    "the two states use different scales"
  ],
  "fields": [
    {
      "name": "before",
      "type": "year",
      "description": "the earlier year"
    },
    {
      "name": "after",
      "type": "year",
      "description": "the later year"
    },
    {
      "name": "world",
      "type": "number",
      "description": "world share online in each year, %",
      "unit": "%",
      "format": "percent"
    },
    {
      "name": "countries[].id",
      "type": "id",
      "description": "ISO 3166 numeric code, matches the map"
    },
    {
      "name": "countries[].name",
      "type": "place",
      "description": "the country"
    },
    {
      "name": "countries[].before",
      "type": "number",
      "description": "share online in the earlier year, %",
      "unit": "%",
      "format": "percent"
    },
    {
      "name": "countries[].after",
      "type": "number",
      "description": "share online in the later year, %",
      "unit": "%",
      "format": "percent"
    }
  ],
  "hints": {
    "word": "online"
  },
  "interactive": [
    "slider"
  ],
  "interactions": [
    "drag the divider (or the handle) left and right",
    "the Before and After buttons jump to one side",
    "hover or tap a country to read both years"
  ],
  "motion": "The divider sweeps once from 2005 to 2024 when the map comes into view, then rests in the middle.",
  "sound": "A chime at either end. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "seven in ten",
      "in": "title"
    }
  ],
  "tags": [
    "before and after",
    "swipe",
    "compare",
    "slider",
    "map",
    "internet",
    "technology"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9"
  ],
  "bestRatio": "16:9",
  "source": {
    "title": "Share of the population using the Internet",
    "publisher": "Our World in Data (International Telecommunication Union via World Bank)",
    "url": "https://ourworldindata.org/grapher/share-of-individuals-using-the-internet",
    "license": "CC BY 4.0",
    "retrieved": "2026-12-01"
  },
  "note": "Countries without figures for both years are left grey."
}