Giter VIP home page Giter VIP logo

am494 / eu.us.opendata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from commercedataservice/eu.us.opendata

0.0 0.0 0.0 27.78 MB

As part of an EU-US Transatlantic Open Data Partnership, the eu.us.opendata 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!

License: European Union Public License 1.1

R 100.00%

eu.us.opendata's Introduction

EU.US.OPENDATA

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 eu.us.opendata R library is the direct result of this collaborative effort, enabling easy access to comparable datasets from the Eurostat API and BEA API.

Installation

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'));

library(devtools);
library(httr);

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

devtools::install_github('CommerceDataService/eu.us.opendata') 

library(eu.us.opendata)

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

getRel

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)

searchRel

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')

describeRel

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

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

listRel

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

listRel(asHtml = FALSE)

geoMap

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

timeSync

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

Attribution

  1. European Union Geographic Boundaries
  • Data source: GISCO - Eurostat (European Commission)
  • Administrative boundaries: © EuroGeographics © UN-FAO © Turkstat
  1. United States Geographic Boundaries
  • Data source: U.S. Department of Commerce, U.S. Census Bureau - Geography Division, Geographic Products Branch
  • Disclaimer: This product uses Census Bureau shapefiles but is not endorsed or certified by the Census Bureau.
  1. Metadata Repository
  • This library uses an RDF store hosted on Dydra.
  1. Data
  • This product extracts data from the Eurostat and BEA APIs.

eu.us.opendata's People

Contributors

dreajulca avatar lucagramaglia avatar sigmamonstr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.