Creates a property 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_property(
label,
description,
language,
datatype,
equivalence_property = NA_character_,
equivalence_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,
"duration".- 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,
"Length in time.".- 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).
- datatype
A single character string defining the datatype of this property, for example,
"string","wikibase-item","quantity","commonsMedia","url","external-id","globe-coordinate".- equivalence_property
An optional PID of a property already defined in the same Wikibase instance that records the equivalence of this new property 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
An optional PID or other identifier in Wikibase that records the equivalence of the property. An external ID. Defaults to
NA_character_; if left missing, no equivalence relations is will be claimed.- wikibase_api_url
The full URL of the Wikibase API, which is the address that the
wbdatasetR 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:
actioncreate_propertyid_on_targetThe new Property Identifier (PID) on the targeted Wikibase.
labelThe propery label
descriptionThe description label
languageThe language code of the label.
datatypeThe datatype of the property, for example,
stringwikibase_api_urlThe MediaWiki API URL where the new property is created.
equivalence_propertyThe PID that connects an equivalence ID to the property.
equivalence_idThe ID of an equivalent property defined elsewhere.
classification_propertyNot applicable for properties.
classification_idNot applicable for properties.
successTRUE if successfully created, FALSE if there was an error.
commentA summary of the error messages(s), if success is FALSE.
timeThe time when the action started.
logfileThe name of the CSV logfile.