Convenience wrapper that executes the same two-step flow as the CatMapperJS
edit page: first /uploadInputNodes, then /updateWaitingUSES.
Arguments
- df
Data frame or list of row objects to upload.
- database
Target database, typically
"SocioMap"or"ArchaMap".- formData
Named list matching the edit-page
formDatapayload.- so
Upload mode, usually
"standard"or"simple".- ao
Advanced upload option. Supported values map directly to the CatMapperJS Edit-page advanced upload options:
"add_node"= "Adding new node for every row""node_add"= "Updating existing Node properties–add or add to properties""node_replace"= "Updating existing Node properties–replace one property""add_uses"= "Adding new uses ties (with old or new nodes)""update_add"= "Updating existing USES only–add or add to properties""update_replace"= "Updating existing USES only–replace one property""add_merging"= "Adding new merging ties for every row""merging_add"= "Updating existing Merging tie properties–add or add to properties""merging_replace"= "Updating existing Merging tie properties–replace one property"
- addoptions
Named list with
districtandrecordyearbooleans.- allContext
Optional vector/list of contextual columns.
- mergingType
Optional merging mode used by merge upload workflows.
- api_key
API key used for authenticated write actions. If
NULL,CATMAPR_API_KEYis used.- refresh_waiting_uses
If
TRUE, callupdateWaitingUSESafter upload.- url
API URL override. If
NULL,CATMAPR_API_URLis used when set.
Examples
if (FALSE) { # \dontrun{
submitEditUpload(
df = data.frame(
CMName = "Example",
Name = "Example",
CMID = "",
Key = "Type == Example",
stringsAsFactors = FALSE
),
database = "SocioMap",
formData = list(
datasetID = "SD1",
cmNameColumn = "CMName",
categoryNamesColumn = "Name",
cmidColumn = "CMID",
keyColumn = "Key"
),
ao = "add_node",
api_key = Sys.getenv("CATMAPR_API_KEY")
)
} # }
