gta_bulk_upload: Import structured data into main db.

View source: R/gta bulk upload.R

gta_bulk_uploadR Documentation

Import structured data into main db.

Description

Import structured data into main db.

Usage

gta_bulk_upload(
  dump.name = "data dump",
  master.path = NULL,
  test.size = 5,
  sa.id = "state.act.id",
  sa.title = "title",
  sa.description = "announcement.description",
  announcement.date = "date.announced",
  sa.source = "source",
  source.off = "source.official",
  int.id = "intervention.id",
  implementer = "implementing.jurisdiction",
  implementer.type = "name",
  int.type = "intervention.type",
  int.description = "intervention.description",
  int.flow = "affected.flow",
  eval.gta = "gta.evaluation",
  eval.research = "research.evaluation",
  inception.date = "date.implemented",
  removal.date = "date.removed",
  temporary = "duration.limited",
  firms = "eligible.firms",
  imp.level = "implementation.level",
  is.noncommercial = "non.commercial",
  is.horizontal = "horizontal",
  is.fta = "include.fta",
  int.prior = "level.prior",
  int.new = "level.new",
  int.unit = "level.unit",
  sectors.nonhs = "affected.sectors.nonhs",
  dm.nonsupport = "dm.editor.choice",
  dm.type = "name",
  dm.freeze = "freeze.dm",
  aj.nonsupport = "aj.editor.choice",
  aj.type = "name",
  aj.freeze = "freeze.aj",
  hs.code = "affected.product",
  hs.prior = "atl.prior",
  hs.new = "atl.new",
  hs.unit = "atl.unit",
  hs.official = "atl.official",
  hs.inception = "atl.implemented",
  hs.removed = "atl.removed"
)

Arguments

dump.name

Specify a name for this data dump. It will be used in the files. Default is 'data dump'.

master.path

Specify data frame that contains all relevant information. Default is 'master'.

test.size

Number of state acts to include in the test set. Default is 5. There is NO overlap between the test and the full set CSVs i.e. you have to import both eventually.

sa.id

Name of the column containing the state act ID. Default is 'state.act.id'.

sa.title

Name of the column containing the title of the state act. Default is 'title'.

sa.description

Name of the column containing the announcement description. Default is 'announcement.description'.

announcement.date

Name of the column containing the announcement date. Default is 'date.announced'.

sa.source

Name of the column containing the source. Default is 'source'.

source.off

Name of the column containing whether source is official (T/F). Default is 'source.official'.

int.id

Name of the column containing ther intervention ID. Default is 'intervention.id'.

implementer

Name of the column containing the implementing jurisdiction. Default is 'implementing.jurisdiction'.

implementer.type

State how the implementing countries are specified ('un','name'). Default is 'name'.

int.type

Name of the column containing the intervention type. Default is 'intervention.type'.

int.description

Name of the column containing the intervention description. Default is 'intervention.description'.

int.flow

Name of the column containing the affected flow. Default is 'affected.flow'.

eval.gta

Name of the column containing the GTA evaluation. Default is 'gta.evaluation'.

eval.research

Name of the column containing the research evaluation. Default is 'research.evaluation'.

inception.date

Name of the column containing the inception date. Default is 'date.implemented'.

removal.date

Name of the column containing the removal date. Default is 'date.removed'.

temporary

Name of the column containing whether duration is announced as temporary (T/F). Default is 'duration.limited'.

firms

Name of the column containing the eligible firms. Default is 'eligible.firms'.

imp.level

Name of the column containing the implementation level. Default is 'implementation.level'.

is.noncommercial

Name of the column containing whether there is a higher motive (T/F). Default is 'non.commercial'.

is.horizontal

Name of the column containing whether the intervention is horizontal. Default is 'horizontal'.

is.fta

Name of the column containing whether the affected trading partners may include FTA partners (T/F). Default is 'include.fta'.

int.prior

Name of the column containing the prior level values for the intervention description. Default is 'level.prior'.

int.new

Name of the column containing the new level values for the intervention description. Default is 'level.prior'.

int.unit

Name of the column containing the unit for level values attached to the intervention description. Default is 'level.prior'.

sectors.nonhs

Name of the column containing the affected sectors that are not generated by the affected tariff lines. Default is 'affected.sectors.nonhs'.

dm.nonsupport

Name of the column containing the distorted markets that are not generated from a support table. Default is 'dm.editor.choice'.

dm.type

State how the distorted markets are specified ('un','name'). Default is 'name'.

dm.freeze

Name of the column containing whether the distorted market choice should be frozen as specified (T/F). Default is 'freeze.dm'.

aj.nonsupport

Name of the column containing the affected jurisdictions that are not generated from a support table. Default is 'aj.editor.choice'.

aj.type

State how the affected jurisdictions are specified ('un','name'). Default is 'name'.

aj.freeze

Name of the column containing whether the affected jurisdictions choice should be frozen as specified (T/F). Default is 'freeze.aj'.

hs.code

Name of the column containing the affected tariff line. Default is 'affected.product'.

hs.prior

Name of the column containing the prior level for the affected tariff line. Default is 'atl.prior'.

hs.new

Name of the column containing the new level for the affected tariff line. Default is 'atl.new'.

hs.unit

Name of the column containing the unit for the affected tariff line values. Default is 'atl.unit'.

hs.official

Name of the column containing the whether the affected tariff line is official (T/F). Default is 'atl.official'.

hs.inception

Name of the column containing the inception date for the affected tariff line (if different from intervention date). Default is 'atl.implemented'.

author

State your name. Default is "Piotr".

hs.removal

Name of the column containing the removal date for the affected tariff line (if different from intervention date). Default is 'atl.removed'.

Value

Only status and error messages..

Author(s)

Global Trade Alert

References

www.globaltradealert.org


global-trade-alert/gtalibrary documentation built on April 26, 2024, 12:38 p.m.