Skip to main content
100%

Scatter Plot of Loading US GDP Data with axes

✓ Published1🌍 Public
SSeekerzero
Last edited Feb 20, 2023
Created on Feb 20, 2023

This example uses a D3.js scatter plot to visualize annual US GDP data, plotting the year on the x-axis against GDP in current dollars on the y-axis. The visualization loads data from a GitHub-hosted CSV file sourced from the Bureau of Economic Analysis. The code leverages D3’s `scaleLinear`, `extent`, and `axisLeft`/`axisBottom` APIs to build scales and axes, with data parsed via `csvParse` and rendered as circles. A title labels the chart, and axes are annotated with descriptive text.

AI-generated description

based on template from professor given.

dataset from: https://datahub.io/core/gdp-us

Gross Domestic Product of the United States (US GDP)

Gross Domestic Product (GDP) of the United States (US) both nominal and real on an annual and quarterly basis. Annual data is provided since 1930 and quarterly data since 1947. Both total GDP (levels) and annualized percentage change in GDP are provided. Both levels and changes are available both in current dollars (nominal GDP) and in chained 2009 dollars (real GDP). Data is sourced from US Government’s Bureau of Economic Analysis (BEA) and provided in standardized CSV.

Field Name Order Type (Format) Description
date 1 year The year
level-current 2 number GDP in billions of current dollars
level-chained 3 number GDP in billions of chained 2009 dollars
change-current 4 number GDP percent change based on current dollars
change-chained 5 number GDP percent change based on chained 2009 dollars

MIT Licensed

Similar vizzes