Skip to content

Instantly share code, notes, and snippets.

@kperry2215
Created January 13, 2020 03:20
Show Gist options
  • Save kperry2215/b23725279316fada6aaeaf2d92248a19 to your computer and use it in GitHub Desktop.
Save kperry2215/b23725279316fada6aaeaf2d92248a19 to your computer and use it in GitHub Desktop.
import quandl
import pandas as pd
import matplotlib.pyplot as plt
quandl_api_key = "YOUR API KEY HERE"
#Use the Quandl API to pull data
quandl.ApiConfig.api_key = quandl_api_key
#Pull GDP Data
data = quandl.get('FRED/GDP')
data["date_time"] = data.index
#Plot the GDP time series
plot_data(df = data,
x_variable = "date_time",
y_variable = "Value",
title ="Quarterly GDP Data")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment