Creates an item entity on a Wikibase instance with a single language labelling and description. New labels and descriptions can be added in further language later. This is a wrapper for MediaWiki action=wbeditentity
Usage
create_item(
label,
description,
language,
equivalence_property = NA_character_,
equivalence_id = NA_character_,
classification_property = NA_character_,
classification_id = NA_character_,
wikibase_api_url,
data_curator = NULL,
log_file_name = NULL,
csrf,
wikibase_session = NULL
)
Arguments
- label
A language-specific, human-readable name for the Wikibase entity (item, property, or Lexeme). Used when setting or retrieving the entity’s label in the specified language, for example,
"human"
.- description
A short, language-specific textual summary of the Wikibase entity (such as an item, property, or Lexeme). Descriptions help disambiguate entities with similar labels and are not required to be unique but are typically distinct within the same language. For example,
"A member of the homo sapience species."
.- language
A single language code that indicates the language of the label and description, using BCP 47-compliant language tags (e.g., "en" for English, "fr" for French).
- equivalence_property
An optional PID of a property already defined in the same Wikibase instance that records the equivalence of this new item with a property defined elsewhere, for example, on Wikidata or CIDOC-CRM. Defaults to
NA_character_
; if left missing, no equivalence relations is will be claimed.- equivalence_id
The identifier that uniquely identifies this item among another system's definitions. Defaults to
NA_character_
; if left missing, no equivalence relations is will be claimed.- classification_property
The instance of, or subclass of, or superclass of property. Defaults to
NA_character
when not used.- classification_id
The QID of the class. Defaults to
NA_character
when not used.- wikibase_api_url
The full URL of the Wikibase API, which is the address that the
wbdataset
R client sends requests to when interacting with the knowledge base. For example,'https://reprexbase.eu/demowiki/api.php'
. The URL must end with api.php.- data_curator
The name of the data curator who runs the function and creates the log file, created with person.
- log_file_name
An explicitly stated full path to a possible CSV log file, defaults to
NULL
. If the value isNULL
, no log file will be created.- csrf
The CSRF token of your session, received with
get_csrf
.- wikibase_session
An optional list that contains any of the values of
language
,wikibase_api_url
,data_curator
, andcsrf
(for repeated use in a session.)
Value
Returns a dataset_df
object.
The columns are:
action
create_item
id_on_target
The new Property Identifier (PID) on the targeted Wikibase.
label
The propery label
description
The description label
language
The language code of the label
datatype
Defaults to
item
wikibase_api_url
The MediaWiki API URL where the new property is created
equivalence_property
The PID that connects an equivalence ID to the property
equivalence_id
The ID of an equivalent item defined elsewhere
classification_property
The PID that connects the item to a superclass, or class.
classification_id
The QID of a class, subclass or superclass.
success
TRUE if successfully created, FALSE if there was an error
comment
A summary of the error messages(s), if success is FALSE
time
The time when the action started
logfile
The name of the CSV logfile