# Sleep infographic

> A tall 1080 by 2160 infographic on one page from a university sleep lab, showing how many hours of sleep five age groups need and what a short night does to each. Each age group is one bed component whose blanket and pillow lengths are set by two hours figures, so changing the bands or numbers means editing one row.

- The design, as a .vd file: https://getv.design/library/sleep-infographic.vd
- Its page: https://getv.design/library/sleep-infographic

## How it was made

Drafted from this prompt:

> An infographic from the Moorside Sleep Lab on how many hours of sleep each age group needs: newborn 14 to 17, school age 9 to 11, teenager 8 to 10, adult 7 to 9 and over 65 7 to 8.

Then refined:

- Added a line under each bed on what a short night does at that age.
- Gave the header more room so the key no longer touches the first age group.
- Made the pale part of each blanket and the mattress easier to see against the night blue.

## Make it yours

- "Make a sleep infographic for kids and teens only."
- "Change the hours for teenagers to 9 to 11."
- "Use our lab name and colours."

## The source

```vd
version 12
kind design
title "Sleep infographic"
$night = #1B2A49
$dusk = #2B3E66
$moon = #F3E9C6
$star = #FFD166
$grey = #9CA3AF
$m = 72
$u = 48
$rowh = 292

font display = Mirza
  fallback "Georgia, serif"
  face asset=mirza-500 weight=500
  face asset=mirza-700 weight=700

font body = "Host Grotesk"
  fallback "system-ui, sans-serif"
  face asset=host-grotesk-400 weight=400
  face asset=host-grotesk-600 weight=600

asset mirza-500 = font/woff2 hash=sha256-cad2c0b2fd1d5e284c83da07a779ecaf8b5c3510c09c7ca1abc5c7ecfb7b63a9 bytes=13240 license=OFL
asset mirza-700 = font/woff2 hash=sha256-5d2d27578756eab95ed8e9128e1f3420d001c91c8655ef390092731463a0fdba bytes=13348 license=OFL
asset host-grotesk-400 = font/woff2 hash=sha256-66c5700221ce1f6155614a3f869f89c29d48e0a5cf7b8ec1d94f382fae7deef6 bytes=13684 license=OFL
asset host-grotesk-600 = font/woff2 hash=sha256-91897e9f297d83ea11c844c9db6e4b535b7d85cb8aff7a12c3e75acd07e087e8 bytes=13728 license=OFL

frame bed x=0 y=2400 w=900 h=104 component
  rect bed.head x=0 y=0 w=18 h=104 fill=grey radius=6
  rect bed.foot x=(100% - 18) y=44 w=18 h=60 fill=grey radius=6
  rect bed.base x=18 y=70 w=(100% - 36) h=14 fill=grey
  rect bed.mattress x=18 y=48 w=(100% - 36) h=26 fill=#3E5486 radius=6
  rect bed.ext x=34 y=30 w=300 h=34 fill=star opacity=0.5 radius=14
  rect bed.cover x=34 y=30 w=200 h=34 fill=star radius=14
  rect bed.fold x=(@bed.cover.x + 14) y=42 w=(@bed.cover.w - 28) h=3 fill=night opacity=0.25 radius=2
  rect bed.pillow x=30 y=20 w=84 h=26 fill=moon radius=13
  rect bed.legl x=18 y=84 w=10 h=20 fill=grey
  rect bed.legr x=(100% - 28) y=84 w=10 h=20 fill=grey

frame sleep x=0 y=0 w=1080 h=2160 background=night
  ellipse sleep.moon x=(100% - $m - 130) y=96 w=130 h=130 fill=moon
  ellipse sleep.bite x=(@sleep.moon.x + 40) y=(@sleep.moon.y - 24) w=130 h=130 fill=night
  text sleep.title x=$m y=96 w=720 h=210 font=display size=96 weight=700 lineHeight=1.03 letterSpacing=-1 fill=moon
    "How much sleep\neach age needs"
  text sleep.lede x=$m y=(@sleep.title.bottom + 20) w=700 h=84 font=body size=30 lineHeight=1.35 fill=grey
    "Each bed is as long as the most hours that age needs. The blanket covers the least."
  rect sleep.key1 x=$m y=(@sleep.lede.bottom + 28) w=44 h=22 fill=star radius=11
  text sleep.key1.t x=(@sleep.key1.right + 14) y=(@sleep.key1.y - 6) w=260 h=34 font=body size=26 fill=moon
    "Least hours needed"
  rect sleep.key2 x=(@sleep.key1.t.right + 24) y=@sleep.key1.y w=44 h=22 fill=star opacity=0.5 radius=11
  text sleep.key2.t x=(@sleep.key2.right + 14) y=(@sleep.key2.y - 6) w=300 h=34 font=body size=26 fill=moon
    "Up to the most"
  connector row.1.rule x1=$m y1=(490 + 0 * $rowh) x2=(100% - $m) y2=(490 + 0 * $rowh) stroke=grey strokeWidth=1 opacity=0.4
  text row.1.name x=$m y=((490 + 0 * $rowh) + 22) w=520 h=68 font=display size=54 weight=700 fill=moon
    "Newborns"
  text row.1.age x=$m y=(@row.1.name.bottom + 2) w=520 h=36 font=body size=28 fill=grey
    "Birth to 3 months"
  text row.1.hours x=(100% - $m - 400) y=((490 + 0 * $rowh) + 22) w=400 h=90 font=display size=72 weight=700 align=right fill=star
    "14 to 17 hours"
  instance row.1.bed component=bed x=$m y=((490 + 0 * $rowh) + 124) w=(17 * $u + 80)
    override bed.ext w=(17 * $u)
    override bed.cover w=(14 * $u)
  text row.1.effect x=$m y=((490 + 0 * $rowh) + 242) w=(100% - $m * 2) h=40 font=body size=28 fill=moon
    "Under 14 hours: more fussing at feeds and a harder time settling."
  connector row.2.rule x1=$m y1=(490 + 1 * $rowh) x2=(100% - $m) y2=(490 + 1 * $rowh) stroke=grey strokeWidth=1 opacity=0.4
  text row.2.name x=$m y=((490 + 1 * $rowh) + 22) w=520 h=68 font=display size=54 weight=700 fill=moon
    "School age"
  text row.2.age x=$m y=(@row.2.name.bottom + 2) w=520 h=36 font=body size=28 fill=grey
    "6 to 13 years"
  text row.2.hours x=(100% - $m - 400) y=((490 + 1 * $rowh) + 22) w=400 h=90 font=display size=72 weight=700 align=right fill=star
    "9 to 11 hours"
  instance row.2.bed component=bed x=$m y=((490 + 1 * $rowh) + 124) w=(11 * $u + 80)
    override bed.ext w=(11 * $u)
    override bed.cover w=(9 * $u)
  text row.2.effect x=$m y=((490 + 1 * $rowh) + 242) w=(100% - $m * 2) h=40 font=body size=28 fill=moon
    "Under 9 hours: shorter attention and more tears by the afternoon."
  connector row.3.rule x1=$m y1=(490 + 2 * $rowh) x2=(100% - $m) y2=(490 + 2 * $rowh) stroke=grey strokeWidth=1 opacity=0.4
  text row.3.name x=$m y=((490 + 2 * $rowh) + 22) w=520 h=68 font=display size=54 weight=700 fill=moon
    "Teenagers"
  text row.3.age x=$m y=(@row.3.name.bottom + 2) w=520 h=36 font=body size=28 fill=grey
    "14 to 17 years"
  text row.3.hours x=(100% - $m - 400) y=((490 + 2 * $rowh) + 22) w=400 h=90 font=display size=72 weight=700 align=right fill=star
    "8 to 10 hours"
  instance row.3.bed component=bed x=$m y=((490 + 2 * $rowh) + 124) w=(10 * $u + 80)
    override bed.ext w=(10 * $u)
    override bed.cover w=(8 * $u)
  text row.3.effect x=$m y=((490 + 2 * $rowh) + 242) w=(100% - $m * 2) h=40 font=body size=28 fill=moon
    "Under 8 hours: slower reactions, low mood and drowsy driving."
  connector row.4.rule x1=$m y1=(490 + 3 * $rowh) x2=(100% - $m) y2=(490 + 3 * $rowh) stroke=grey strokeWidth=1 opacity=0.4
  text row.4.name x=$m y=((490 + 3 * $rowh) + 22) w=520 h=68 font=display size=54 weight=700 fill=moon
    "Adults"
  text row.4.age x=$m y=(@row.4.name.bottom + 2) w=520 h=36 font=body size=28 fill=grey
    "18 to 64 years"
  text row.4.hours x=(100% - $m - 400) y=((490 + 3 * $rowh) + 22) w=400 h=90 font=display size=72 weight=700 align=right fill=star
    "7 to 9 hours"
  instance row.4.bed component=bed x=$m y=((490 + 3 * $rowh) + 124) w=(9 * $u + 80)
    override bed.ext w=(9 * $u)
    override bed.cover w=(7 * $u)
  text row.4.effect x=$m y=((490 + 3 * $rowh) + 242) w=(100% - $m * 2) h=40 font=body size=28 fill=moon
    "Under 7 hours: weaker memory, and a higher chance of catching colds."
  connector row.5.rule x1=$m y1=(490 + 4 * $rowh) x2=(100% - $m) y2=(490 + 4 * $rowh) stroke=grey strokeWidth=1 opacity=0.4
  text row.5.name x=$m y=((490 + 4 * $rowh) + 22) w=520 h=68 font=display size=54 weight=700 fill=moon
    "Over 65"
  text row.5.age x=$m y=(@row.5.name.bottom + 2) w=520 h=36 font=body size=28 fill=grey
    "65 years and up"
  text row.5.hours x=(100% - $m - 400) y=((490 + 4 * $rowh) + 22) w=400 h=90 font=display size=72 weight=700 align=right fill=star
    "7 to 8 hours"
  instance row.5.bed component=bed x=$m y=((490 + 4 * $rowh) + 124) w=(8 * $u + 80)
    override bed.ext w=(8 * $u)
    override bed.cover w=(7 * $u)
  text row.5.effect x=$m y=((490 + 4 * $rowh) + 242) w=(100% - $m * 2) h=40 font=body size=28 fill=moon
    "Under 7 hours: more dozing by day and a higher chance of falls."
  connector row.end.rule x1=$m y1=(490 + 5 * $rowh) x2=(100% - $m) y2=(490 + 5 * $rowh) stroke=grey strokeWidth=1 opacity=0.4
  text sleep.source x=$m y=(490 + 5 * $rowh + 36) w=(100% - $m * 2) h=112 font=body size=26 lineHeight=1.4 fill=grey
    "Moorside Sleep Lab, yearly public summary. Hours are per night for healthy people. Some need an hour either side, and a nap does not count towards the total."
```
