Global temperature anomaly, 1900 to 2025
Global temperature rose 1.16°C from 1970 to 2025. A temporal x axis spaces the readings by date, so the last five-year step is half as wide.
{
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"data": "\u0000demo-fold:0",
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
}
{
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"data": [
{
"year": "1900",
"anomaly": -0.08
},
{
"year": "1910",
"anomaly": -0.43
},
{
"year": "1920",
"anomaly": -0.27
},
{
"year": "1930",
"anomaly": -0.16
},
{
"year": "1940",
"anomaly": 0.12
},
{
"year": "1950",
"anomaly": -0.17
},
// … 8 more rows; Copy includes them
],
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
}import { Chart } from "@opendata-ai/openchart-react";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:0";
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
export function Example() {
return <Chart spec={spec} />;
}
import { Chart } from "@opendata-ai/openchart-react";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
export function Example() {
return <Chart spec={spec} />;
}
<script setup lang="ts">
import { Chart } from "@opendata-ai/openchart-vue";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:0";
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<template>
<Chart :spec="spec" />
</template>
<script setup lang="ts">
import { Chart } from "@opendata-ai/openchart-vue";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<template>
<Chart :spec="spec" />
</template>
<script lang="ts">
import { Chart } from "@opendata-ai/openchart-svelte";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:0";
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<Chart {spec} />
<script lang="ts">
import { Chart } from "@opendata-ai/openchart-svelte";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
</script>
<Chart {spec} />
import { createChart } from "@opendata-ai/openchart-vanilla";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = "\u0000demo-fold:0";
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createChart(container, spec);
import { createChart } from "@opendata-ai/openchart-vanilla";
import type { ChartSpec } from "@opendata-ai/openchart-core";
import "@opendata-ai/openchart-core/styles.css";
const data = [/* 14 rows; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "line",
"stroke": "#0e7490",
"strokeWidth": 2,
"point": true
},
"encoding": {
"x": {
"field": "year",
"type": "temporal",
"axis": {
"format": "%Y"
}
},
"y": {
"field": "anomaly",
"type": "quantitative",
"axis": {
"title": "Difference from the 1951–1980 average",
"format": "+.1f",
"labelSuffix": "°C"
}
}
},
"chrome": {
"title": "Global temperature rose 1.16°C from 1970 to 2025",
"subtitle": "Global surface temperature against the 1951–1980 average (°C), one reading per decade from 1900, then 2025"
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createChart(container, spec);