# Data layers

> Draw a series of numbers, such as world population or CO₂, under a timeline on the same time axis, read its values, and share that view.

A data layer is a series of numbers drawn under a timeline, on the same time axis: world population under a history of the world, CO₂ under the industrial age, temperature under a century of events. You add it from Add context, as you would a context timeline, and read its value at any date without leaving the timeline. Data layers are free on every plan, for anyone who can open a timeline, signed in or not. This article covers how to add one, how to read it, and how to share the view.

## What a data layer is

A data layer is a named series of dated values with a unit, such as world population in people or CO₂ in parts per million. On a wide screen it is drawn as a muted strip below the main timeline, a little shorter than a context timeline's strip, with a line through its values and, where the data gives a range around a value, a faint band around the line. On a phone held upright it is a narrow rail beside the timeline instead, as Small screens describes. A layer uses the main timeline's time axis, so when you drag or zoom, its line moves with the items above it. Nothing is drawn before its first value or after its last.

Timescrolly keeps a library of series that anyone can add, such as world population, CO₂, temperature and life expectancy. Data layers you have made, and those your teams have made, appear in the picker under their own sections. A data layer has no items, comments or collaborators: it is there to be read against a timeline.

## Add and remove a data layer

The Add context button is in the toolbar at the bottom of the viewer; on a phone it is in the viewer menu. It first asks What do you want to add?, with two choices: A timeline and A data layer. A data layer opens a picker with a search field and three sections: My data layers, My teams' data layers and From Timescrolly. A row in My teams' data layers names its team, and every row shows the layer's unit and range. Signed out, only From Timescrolly shows. Choose a row and its layer appears as a strip, or as a rail on a phone. A layer you have already added is marked Added, and one marked No points yet can't be chosen.

Data layers and context timelines share one limit: three strips in total, timelines and data layers together. The first screen of Add context lists the ones you have added at the top, under Added, each with a Remove button. At three, the two choices are greyed out and it asks you to remove one before adding another. On a wide screen you can also remove a layer with the close (X) button in its strip's header.

A data layer needs a main timeline with real dates, as a context timeline does: on a floating timeline the Add context button explains instead of opening the picker. See [what can't be lined up](https://timescrolly.com/help/context-timelines#what-can-t-be-lined-up).

## Read a data layer

A strip's header shows the layer's name, a Data badge, its unit, and the range of its values, written in the main timeline's dates. Point at the strip and a rule and a dot mark the nearest value, with its date and exact value in the layer's unit, followed by the range around it when the data has one. The strip stays muted until you point at it, and the header's chevron hides its body when you want the room back.

The value axis fits what is on screen. A few faint gridlines with round values at the left show the scale, and as you drag and zoom it adjusts to the values in view, so a small change over a short stretch is as easy to read as a large one over centuries. Each layer opens on its own scale, linear or logarithmic, and the Log button in the header switches it for you; the choice isn't kept in the link. Log is unavailable when any value, or the low end of any range, is zero or below: a logarithmic scale needs every value above zero.

## When the ranges don't meet

The view keeps to the main timeline's range, so a layer whose values all lie outside it draws nothing. Its strip then says Outside this timeline's range, with a Widen the view to include it button: the view then reaches every strip's range and zooms out to show them all. A layer that is in reach but has no values where you are looking says Nothing between, with the dates on screen, and Show its range zooms to its values. A layer with no values at all says No points yet.

To keep the view to the main timeline again, open Add context and clear Let the view span the context too. The choice lives in the address along with the context, and removing the last timeline or data layer clears it.

## Share the link

Data layers live in the address of the page, beside any context timelines, not in the timeline. Nothing is saved: the timeline looks the same to everyone who opens it without your link. To show someone the same view, send them the address from your browser. They see the same strips, for the layers they may read: anyone can read Timescrolly's own, a layer of yours only you, and a team's layer only its members. A layer they can't read shows This data layer isn't available, with a header they can remove.

Embeds, booklets, posters and captured images never include data layers. See [context timelines](https://timescrolly.com/help/context-timelines) for how the rest of the context travels in the link.

## Small screens

On a phone held upright, or in a narrow window, the timeline runs from top to bottom, and each data layer is drawn as a narrow rail at the right edge, on the same time axis, with its values as a small line down the rail. Tap the rail to see the date and value of the point nearest your tap, and tap that again to open the layer's sheet; tapping the title along the rail opens it too. The sheet offers Use a log scale or Use a linear scale, Widen the view to include it or Show its range, and Remove from context, and Try again when the layer didn't load.

Layer rails share the room with context timelines' rails, so a very narrow screen fits fewer of them, as [small screens](https://timescrolly.com/help/context-timelines#small-screens) in the context timelines article describes. A data layer can't take the main timeline's place the way a context timeline can.
