Unemployment Rates Dashboard (CSV)
Home
Dataset Information
For this exercise, we will use data from the AlphaVantage API.
Specifically we will use the "Unemployment Rate" endpoint.
The unemployment rate represents the "number of unemployed as a percentage of the labor force".
Consult the API documentation to learn more.
Setup
First obtain an AlphaVantage API Key, and supply it when prompted.
Part 1
Write JavaScript code to answer the questions below.
Log each of the answers to the console.
- Fetch monthly unemployment rates data in CSV format from the API, using the provided URL.
- Display the number of datapoints provided. (i.e. around 927).
- Display the time range (earliest and latest date) of available data (i.e. "1948-01-01" to "2025-03-01").
- Display the average, min, and max unemployment rate (using all available data).
- Display the average, min, and max unemployment rate (over the past 12 months only).
NOTE: it's sufficient to just take the first twelve datapoints using an array slicing approach.
Part 2
Write JavaScript code to answer the questions below.
Display the answers on the page in the designated areas.
- Create a line chart of the unemployment rate over time. Include a chart title and axis labels.