api를 이용한 Quandl 데이터 다운로드

# API를 이용한 Quandl 데이터 다운로드


# R에서 API 주소를 이용해 직접 데이터를 다운로드

url.aapl = "https://www.quandl.com/api/v3/datasets/WIKI/AAPL/
data.csv?api_key=xw3NU3xLUZ7vZgrz5QnG"
data.aapl = read.csv(url.aapl)

head(data.aapl)

# Date   Open   High    Low   Close   Volume Ex.Dividend Split.Ratio
# 1 2018-03-27 173.68 175.15 166.92 168.340 38962839           0           1
# 2 2018-03-26 168.07 173.10 166.44 172.770 36272617           0           1
# 3 2018-03-23 168.39 169.92 164.94 164.940 40248954           0           1
# 4 2018-03-22 170.00 172.68 168.60 168.845 41051076           0           1
# 5 2018-03-21 175.04 175.09 171.26 171.270 35247358           0           1
# 6 2018-03-20 175.24 176.80 174.94 175.240 19314039           0           1
# Adj..Open Adj..High Adj..Low Adj..Close Adj..Volume
# 1    173.68    175.15   166.92    168.340    38962839
# 2    168.07    173.10   166.44    172.770    36272617
# 3    168.39    169.92   164.94    164.940    40248954
# 4    170.00    172.68   168.60    168.845    41051076
# 5    175.04    175.09   171.26    171.270    35247358
# 6    175.24    176.80   174.94    175.240    19314039