-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11e05df
commit bd175bd
Showing
10 changed files
with
523 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
set.seed(1014) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# reference: https://www.programmableweb.com/news/how-to-access-any-restful-api-using-r-language/how-to/2017/07/21 | ||
|
||
# basic steps: | ||
|
||
# - Install the "httr" and "jsonlite" packages | ||
# - Make a "GET" request to the API to pull raw data into your environment | ||
# - "Parse" that data from its raw form through JavaScript Object Notification (JSON) into a usable format | ||
# - Write a loop to "page" through that data and retrieve the full data set | ||
# - Apply the same mehodology to other APIs | ||
|
||
library(httr) | ||
library(jsonlite) | ||
|
||
base <- "https://api-v2.intrinio.com/companies/AAPL?api_key=" | ||
keys <- "OjJlZmM1YjM4OWZjMWZkMjQyNjI5ODNjZWQzYjE0Yzcy" | ||
|
||
request_url <- str_c(base, keys) | ||
response <- GET(request_url) | ||
|
||
|
||
|
Oops, something went wrong.