Monthly temperature range in Central Park, 2023
New York's average daily high peaked at 30.2°C in July 2023. Error bars span y to y2 for each month, and the figure offers SVG, PNG and CSV downloads.
{
"mark": {
"type": "errorbar",
"ticks": true
},
"data": [
{
"month": "Jan",
"low": 3.5,
"high": 9.3
},
{
"month": "Feb",
"low": 0.9,
"high": 9.2
},
{
"month": "Mar",
"low": 3.2,
"high": 10.8
},
{
"month": "Apr",
"low": 9.4,
"high": 19
},
{
"month": "May",
"low": 12,
"high": 22.1
},
{
"month": "Jun",
"low": 16.8,
"high": 25.4
},
{
"month": "Jul",
"low": 22.1,
"high": 30.2
},
{
"month": "Aug",
"low": 20.2,
"high": 27.6
},
{
"month": "Sep",
"low": 17.3,
"high": 24.3
},
{
"month": "Oct",
"low": 12.4,
"high": 19.3
},
{
"month": "Nov",
"low": 4.5,
"high": 11.8
},
{
"month": "Dec",
"low": 4.2,
"high": 9.8
}
],
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
}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": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
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 = [/* 12 rows, as in the Spec tab; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
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": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
</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 = [/* 12 rows, as in the Spec tab; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
</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": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
</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 = [/* 12 rows, as in the Spec tab; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
</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": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
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 = [/* 12 rows, as in the Spec tab; Copy includes them */];
const spec: ChartSpec = {
data,
"mark": {
"type": "errorbar",
"ticks": true
},
"encoding": {
"x": {
"field": "month",
"type": "nominal"
},
"y": {
"field": "low",
"type": "quantitative",
"axis": {
"title": "Temperature (°C)"
}
},
"y2": {
"field": "high",
"type": "quantitative"
}
},
"chrome": {
"title": "New York's average daily high peaked at 30.2°C in July 2023",
"subtitle": "Average daily low to average daily high by month, Central Park, 2023 (°C)"
}
};
const container = document.getElementById("chart");
if (!container) throw new Error('Add <div id="chart"></div> to the page first.');
createChart(container, spec);