As part of an EU-US Transatlantic Open Data Partnership, the R library was developed to provide access to comparable datasets from the EU and the US. This version is in alpha. Feedback welcome -- submit an issue via this repo!
Latest commit 55c51db Nov 13, 2016 @SigmaMonstR SigmaMonstR Updates to search
SearchRel — updates to vague results
Failed to load latest commit information.
R Updates to search Nov 13, 2016 Merge remote-tracking branch 'origin/master' Nov 5, 2016
inst/extdata Hard clean Nov 5, 2016
man Fix region naming using property map. Temp fix depends on GEO being o… Nov 5, 2016
DESCRIPTION Rebuild to fix shp path Nov 2, 2016
LICENSE Initial commit Sep 21, 2016
NAMESPACE Fix region naming using property map. Temp fix depends on GEO being o… Nov 5, 2016 Edits to key documentation Nov 12, 2016 Fix region naming using property map. Temp fix depends on GEO being o… Nov 5, 2016


A R Library developed through an EU-US Transatlantic Open Data Partnership

The United States' Department of Commerce and Bureau of Economic Analysis in partnership with the European Commission's DG CONNECT and Eurostat have established a Transatlantic Open Data Partnership focused on economic data. The R library is the direct result of this collaborative effort, enabling easy access to comparable datasets from the Eurostat API and BEA API.


As the library is currently available only via Github repository, installation requires a couple additional lines of code:

#Install packages if needed
install.packages(c('devtools', 'httr'));


httr::set_config( config( ssl_verifypeer = 0L ));



#Assign your API Key 
myKey <- 'Your 36-digit BEA API key here'


Using your BEA API key, set as "myKey", get the data as a relationship table:

getRel('gross domestic product', lucky = T, beaKey = myKey)
getRel('gdp', lucky = T, beaKey = myKey)


The library supports a free text search for data series. Note that regular expressions are not supported in this version. For a list of all comparable datasets, enter a wild card search ("*")

searchRel('gross domestic product')


Using a relationship ID, return a description of that relationship as a table:

describeRel('<JOINT#GDP_A_2>', asHtml = TRUE)


List the relationships available using a direct SPARQL query of the (online) metadata store.

listRel(asHtml = FALSE)


Using the retrieved dataset from getRel(), returns either (1) a harmonized shapefile of EU and US geographies with the dataset joined for a selected year, (2) an interactive web-enabled leaflet map.

## Look at state/NUTS2 level data:
dataset <- getRel('<JOINT#GDP_A_2>', lucky = F, beaKey = myKey)

geoMap(dataset, 2014) ## As leaflet map

geoMap(dataset, 2014, asSHP = TRUE) ## As shapefile

## Look at metro level data:
dataset = getRel('gdp', lucky = T, beaKey = myKey)

geoMap(dataset, 2012) ## As leaflet map

geoMap(dataset, "all") ##As a shapefile with all years in the data


Provides user easier access to extracts the latest overlapping year of data or all overlapping years.

timeSync(dataset, 1) #latest
timeSync(dataset, 2) #all overlapping years