Last Updated:
June 17, 2021
by
Jesse Langstaff
| Version: 16
| 2,716 views
| 0 followers
members are following updates on this item.
R is an open-source language for statistical analysis and data visualizations. Installing third party packages to your R environment provides functionality for connecting to data feeds.
For more information about R, see R: The R Project for Statistical Computing.
When connecting to your digital workplace's data feeds, you must authenticate using your Igloo Authentication credentials. If you do not know what your Igloo Authentication password is, see Resetting a forgot Igloo password.
The instructions in this article use:
Follow the keyringr instructions for your operating system.
install.packages("httr")
install.packages("keyringr")#if using keyringr
install.packages("jsonlite")
library(httr)
library(keyringr)#if using keyringr
library(jsonlite)
url <- "https://{your community domain}/odata/dUser"
If using a filter, or URI that contains spaces, the character code of "%20" must be used in place of a space.
url <- "https://{your community domain}/odata/dUser?$filter=user_key%20eq%2020322315"
response <- GET(url, authenticate('{username}','{pass}'))
df1 <- jsonlite::fromJSON(rawToChar((response$content)))
If using a secure method of password storage, substitute its function for '{pass}'.
install.packages("httr")
install.packages("keyringr")#if using keyringr
install.packages("jsonlite")
library(httr)
library(keyringr)
library(jsonlite)
url1 <- "https://{your community domain}/odata/dContainerSpace" #odata url for space dimension table
url2 <- "https://{your community domain}/odata/fContainerSpace" #odata url for space fact table
response1 <- GET(url1, authenticate('user', 'pass')) #load data for dimension table
df1 <- jsonlite::fromJSON(rawToChar((response1$content))) #parse dimension data to dataframe
response2 <- GET(url2, authenticate('user', 'pass')) #load data for fact table
df2 <- jsonlite::fromJSON(rawToChar((response2$content))) #parse fact data to dataframe
merge(x=df1,y=df2,by.x=df1$space_key,by.y=df2$space_key) #join fact and dimension tables to get details for space level activity