write_econdata: write_econdata

View source: R/write_econdata.R

write_econdataR Documentation

write_econdata

Description

Saves the data set for the given dataflow - agencyid:id(version) and data provider - agencyid:id, as a list. Available data sets can be looked up from the data registry (http://www.econdata.co.za/FusionRegistry).

Usage

write_econdata(db, ...)

Arguments

db

Data set to upload.

...

Further Optional arguments, if encoded in database metadata:

agencyid Agency responsible for the data definition.
id Data identifier.
version Version of the data definition.
provideragencyid Agency responsible for making the data available.
providerid Provider of the data.
file character. File name for saving data set as JSON data to disk.
username character. EconData username.
password character. EconData password.

Details

An EconData account (http://app.econdata.co.za) is required to use this function. The user must provide their credentials either through the function arguments, or by setting the ECONDATA_CREDENTIALS environment variable using the syntax: "username;password". If credentials are not supplied by the aforementioned methods a GUI dialog will prompt the user for credentials.

The functionality provided by write_econdata is to save the data set described by the function arguments. As this makes modifications to the database the user calling this function requires higher privileges than needed for other econdatar functions - determined by the correct data set role (owner). You can look up user roles for a given data set on the EconData app.

See Also

read_econdata

Examples

## Not run: 
db <- read_econdata("BA900", nameby="CODE")

write_econdata(db, "ECONDATA", "BA900", "1.0", "ECONDATA", "SARB", file = "ba900.json")

## End(Not run)

byrongibby/econdatar documentation built on March 18, 2023, 9:30 p.m.