Code Monkey home page Code Monkey logo

databridgesapir's Introduction

R API client for DataBridgesAPIr

API Documentation of the DataBridges platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, Teams channel API Integration - This endpoint uses Hey Jude pattern

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI spec from a remote server, you can easily generate an API client.

  • API version: 1.3.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RClientCodegen

Installation

Prerequisites

Install the dependencies

install.packages("jsonlite")
install.packages("httr")
install.packages("base64enc")

Build the package

git clone https://github.com/WFP-VAM/DataBridgesAPIr
cd GIT_REPO_ID
R CMD build .
R CMD check DataBridgesAPIr_1.0.0.tar.gz --no-manual
R CMD INSTALL --preclean DataBridgesAPIr_1.0.0.tar.gz

Install the package

install.packages("DataBridgesAPIr")

To install directly from Github, use devtools:

install.packages("devtools")
library(devtools)
install_github("WFP-VAM/DataBridgesAPIr")

To install the package from a local file:

install.packages("DataBridgesAPIr_1.0.0.tar.gz", repos = NULL, type = "source")

Usage

library(DataBridgesAPIr)

Reformat code

To reformat code using styler, please run the following in the R console:

install.packages("remotes")
remotes::install_github("r-lib/[email protected]")
library("styler")
style_dir()

Documentation for API Endpoints

All URIs are relative to https://api.wfp.org/vam-data-bridges/1.3.1

Class Method HTTP request Description
CommoditiesApi CommoditiesCategoriesListGet GET /Commodities/Categories/List Provides the list of categories.
CommoditiesApi CommoditiesListGet GET /Commodities/List Provide the detailed list of the commodities available in DataBridges platform
CommodityUnitsApi CommodityUnitsConversionListGet GET /CommodityUnits/Conversion/List Provides conversion factors to Kilogram or Litres for each convertible unit of measure.
CommodityUnitsApi CommodityUnitsListGet GET /CommodityUnits/List Provides the detailed list of the unit of measure available in DataBridges platform
CurrencyApi CurrencyListGet GET /Currency/List Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217.
CurrencyApi CurrencyUsdIndirectQuotationGet GET /Currency/UsdIndirectQuotation Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates.
EconomicDataApi EconomicDataIndicatorListGet GET /EconomicData/IndicatorList Returns the lists of indicators.
EconomicDataApi EconomicDataIndicatorNameGet GET /EconomicData/{indicatorName} Returns the time series of values for different indicators.
FoodSecurityApi FoodSecurityListGet GET /FoodSecurity/List
GorpApi GorpLatestGet GET /Gorp/Latest Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
GorpApi GorpListGet GET /Gorp/List Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
MarketPricesApi MarketPricesAlpsGet GET /MarketPrices/Alps Returns time series values of ALPS and PEWI.
MarketPricesApi MarketPricesPriceDailyGet GET /MarketPrices/PriceDaily Returns a daily time series of commodity market prices.
MarketPricesApi MarketPricesPriceMonthlyGet GET /MarketPrices/PriceMonthly Returns a monthly time series of commodity market prices.
MarketPricesApi MarketPricesPriceRawGet GET /MarketPrices/PriceRaw Returns original commodity market prices
MarketPricesApi MarketPricesPriceWeeklyGet GET /MarketPrices/PriceWeekly Returns a weekly time series of commodity market prices.
MarketsApi MarketsGeoJSONListGet GET /Markets/GeoJSONList Provide a list of geo referenced markets in a specific country
MarketsApi MarketsListGet GET /Markets/List Get a complete list of markets in a country
MarketsApi MarketsMarketsAsCSVGet GET /Markets/MarketsAsCSV Get a complete list of markets in a country
MarketsApi MarketsNearbyMarketsGet GET /Markets/NearbyMarkets Find markets near a given location by longitude and latitude within a 15Km distance
RpmeApi RpmeOutputValuesGet GET /Rpme/OutputValues Processed values for each variable used in the assessments
RpmeApi RpmeSurveysGet GET /Rpme/Surveys Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
RpmeApi RpmeVariablesGet GET /Rpme/Variables List of variables
RpmeApi RpmeXLSFormsGet GET /Rpme/XLSForms Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
SurveysApi MFISurveysBaseDataGet GET /MFI/Surveys/BaseData Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
SurveysApi MFISurveysFullDataGet GET /MFI/Surveys/FullData Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact [email protected] for authorization.
SurveysApi MFISurveysGet GET /MFI/Surveys Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
SurveysApi MFISurveysProcessedDataGet GET /MFI/Surveys/ProcessedData Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
XlsFormsApi MFIXlsFormsDefinitionGet GET /MFI/XlsForms/definition Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
XlsFormsApi MFIXlsFormsGet GET /MFI/XlsForms Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

default

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://api.wfp.org/authorize
  • Scopes:
    • vamdatabridges_mfi-surveys-fulldata_get: vamdatabridges_mfi-surveys-fulldata_get
    • vamdatabridges_marketprices-priceraw_get: vamdatabridges_marketprices-priceraw_get

Author

[email protected]

databridgesapir's People

Contributors

alexgherardelli avatar

Watchers

 avatar Rihanna Kedir avatar Paolo Lucchino avatar  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.