Help:Jenis data
This is an information page. It is not one of Wikidata's policies or guidelines, but rather intends to describe some aspect(s) of Wikidata's norms, customs, technicalities, or practices. It may reflect varying levels of consensus and vetting. |
Jenis data menjelaskan cara pernyataan diperlakukan dan jenis data apa saja yang akan diberikan. Jenis pernyataan yang berbeda akan mempergunakan jenis atribut yang berbeda dan jenis data yang dipergunakan juga akan berbeda. Saat pembuatan atribut, salah satu pilihan yaitu mengatur jenis data dan setelah diatur maka atribut akan terkunci untuk jenis data ini. Hal ini akan mempengaruhi cara penggunaan data dan harus ada perencanaan yang matang sebelum atribut yang berguna bisa dijelaskan.
Koordinasi kerja dalam atribut berlangsung di Wikidata:Property proposal.
Data type | Number of properties |
---|---|
External identifier | 8.755 |
Item | 1.642 |
Quantity | 657 |
String | 332 |
URL | 109 |
Commons media file | 80 |
Point in time | 67 |
Monolingual text | 62 |
Property | 21 |
Geographic coordinates | 11 |
Tabular data | 6 |
Geographic shape | 3 |
Data type | Number of properties |
---|---|
Mathematical expression | 36 |
Sense | 19 |
Lexeme | 15 |
Form | 10 |
Musical Notation | 6 |
Atribut berdasarkan jenis
Untuk daftar atribut yang saat ini memerlukan jenis dari jenis data, lihat:
Datatypes to link entities
Wikidata has 5 types of entities (Item, Property, Lexeme, Sense and Form). For each entity type there exists a same-named data type that can be used to link entities of that type.
- Item
- Link to an item. (list of properties)
- Property
- Pranala internal ke sebuah atribut. (list of properties)
The following data types are primarily meant for statements on Lexemes, which make up the lexicographical data of Wikidata.
- Lexeme
- Link to a lexeme. (list of properties)
- Form
- For statements on lexemes that reference forms on other lexemes in order to indicate their relation. (list of properties)
- Sense
- For statements on lexemes that reference senses on other lexemes. (list of properties)
String-based data types
String
- type: string (String)
- list of properties: Category:Properties with string-datatype -- Special:ListProperties/string
Rangkaian karakter, nomor dan simbol yang tidak membutuhkan terjemahan ke dalam bahasa-bahasa berbeda atau format angka. Sebuah string tidak digunakan untuk perhitungan.
- Examples:
- B123
- 90928390-XLE
- u29238
Panjang maksimal adalah 1500 karakter di Wikidata, sebagaimana ditentukan dengan wmgWikibaseStringLimits
di InitialiseSettings.php.
Monolingual text
- type: monolingualtext (Monolingual text)
- list of properties: Category:Properties with monolingualtext-datatype -- Special:ListProperties/monolingualtext
A string that is not translated into other languages. This type of string is defined once and reused in all languages. Typical use is a geographically localized entity name written in the local language, an identifier of some kind, a chemical formula or a Latin scientific name. See Help:Monolingual text languages for information about the language codes available for monolingual text values and how to request support for additional language codes. (Note that monolingual text also implies a single script system, which can make the string somewhat problematic.)
Panjang maksimal adalah 1500 karakter di Wikidata, sebagaimana ditentukan dengan wmgWikibaseStringLimits
di InitialiseSettings.php.
External identifier
- type: external-id (External identifier)
- list of properties: Category:Properties with external-id-datatype -- Special:ListProperties/external-id
String that represents an identifier used in an external system. Will display as external link if a formatter URL (P1630) is defined. See: External identifiers.
Panjang maksimal adalah 1500 karakter di Wikidata, sebagaimana ditentukan dengan wmgWikibaseStringLimits
di InitialiseSettings.php.
URL
- type: url (URL)
- list of properties: Category:Properties with url-datatype -- Special:ListProperties/url
A generalized "URL" that identifies some kind of external resource, perhaps a link to an external site of some kind, or an identifier used for lookup in some kind of specialized resource.
Panjang maksimal adalah 1500 karakter di Wikidata, sebagaimana ditentukan dengan wmgWikibaseStringLimits
di InitialiseSettings.php.
Data types to reference files on Commons
Commons media
- type: commonsMedia (Commons media file)
- list of properties: Category:Properties with commonsMedia-datatype -- Special:ListProperties/commonsMedia
Rujukan ke berkas di Wikimedia Commons. Saat memasukkan dalam kotak teks, ruang nama "Berkas" di Commons akan dicari untuk menemukan berkas yang sesuai. Berkas-berkas ini dapat digunakan untuk mengilustrasikan konsep itu di Wikidata dan sebagai sebuah nilai atribut aktual untuk inklusi di Wikipedia.
- Examples:
- Wikidata-logo.svg
Geographic shape
- type: geo-shape (Geographic shape)
- list of properties: Category:Properties with geo-shape-datatype -- Special:ListProperties/geo-shape
Reference to map data file on Wikimedia Commons. During entry in the textfield the "Data" namespace on Wikimedia Commons will be searched for matching entries.
Tabular data
- type: tabular-data (Tabular data)
- list of properties: Category:Properties with tabular-data-datatype -- Special:ListProperties/tabular-data
Reference to tabular data file on Wikimedia Commons. During entry in the textfield the "Data" namespace on Commons will be searched for matching entries.
Data types for specific notations
Mathematical expression
- type: math (Mathematical expression)
- list of properties: Category:Properties with math-datatype -- Special:ListProperties/math
String yang diformat yang menampilkan rumus.
Contoh:
\sqrt{1-e^2}
menghasilkan:
Lihat w:Help:Displaying a formula untuk format yang dapat diterapkan.
Isian nilai berjenis ekspresi matematika saat ini belum dapat dikueri langsung melalui Query Service.
Musical Notation
- type: musical-notation (Musical Notation)
- list of properties: Category:Properties with musical-notation-datatype -- Special:ListProperties/musical-notation
Generated image in .png format that displays a musical score. Values for that data type are strings describing music following LilyPond syntax.
Example:
- Value string
\relative c' { c d e f | g2 g | a4 a a a | g1 |}
, produces
Daftar jenis data
Quantity
- type: quantity (Quantity)
- list of properties: Category:Properties with quantity-datatype -- Special:ListProperties/quantity
A Quantity value represents a decimal number, together with information about the uncertainty interval of this number, and a unit of measurement. The attributes are:
- amount: the quantity's main value
- lowerBound: the quantity's lower bound (optional)
- upperBound: the quantity's upper bound (optional)
- unit: unit of measure item (empty for dimensionless values)
Internally, amount, lower bound and upper bound are strings; positive numbers are stored with a plus sign, though this will not be displayed. The representation of a quantity may not be longer than 127 characters; therefore, the maximal value of a quantity is 10^126-1.
Unit conversion is implemented based on conversion to SI unit (P2370). Most units with that property are normalized in the RDF export for the query service (October 2019).
The normalisation table is readable as a JSON file in the WMF Mediawiki repository.
- Examples:
- 762 (dimensionless)
- 2500 km (upper and lower bounds are not set, with unit)
- 1.03 ± 0.02 g (enter as nominal value +/- tolerance, representing a lower and upper bound, with unit). The tolerance is in some cases not shown at Wikipedia, only the nominal value, for example in Wikidata lists produced by the listeria bot.
Time
- type: time (Point in time)
- list of properties: Category:Properties with time-datatype -- Special:ListProperties/time
Jenis data ini menyimpan tanggal dalam kalender Gregorian atau Julian. Lihat detail strukturnya.
- Examples:
- 2012
- 1780-05 (=Mei 1780)
- 1833-11-01 (=1 November 1833)
See Help:Dates for more.
Globe coordinate
- type: globe-coordinate (Geographic coordinates)
- list of properties: Category:Properties with globe-coordinate-datatype -- Special:ListProperties/globe-coordinate
Sebuah posisi geografis tertentu sebagai sebuah pasangan lintang dan bujur pada "globe" tertentu (Bumi atau benda angkasa lainnya). "Globe" ini memiliki nilai baku "Bumi" (globe: http://www.wikidata.org/entity/Q2
). Parameter "tingkat ketelitian" menunjukkan besarnya resolusi sumber untuk koordinat. Perhatikan bahwa sistem koordinat di sini memiliki nilai tetap "WGS84" (World Geodetic System 1984 (Q11902211)) yang bisa jadi tidak sesuai untuk benda angkasa selain Bumi dan konfigurasi WGS84 ini tidak bisa diubah.
Currently, the Web UI of Wikidata doesn't expose all parameters of this data type. The value is visualized only as the coordinate, plus an embedded map if the globe is Earth (Q2). The precision can be modified in the edit mode. The globe is not visible, nor editable, in the item view. The full configuration is however visible in the history diff view (example).
When using the Web UI, the value saved will be an exact multiple of the precision chosen.
It is possible to edit the data in full via API. The CLI tool is one way to access the API. In this example Olympus Mons (Q520) is given a coordinate on Mars (Q111) using the globe parameter (used in coordinate location (P625)):
wd ac Q520 P625 '{ "latitude": 18.4, "longitude": 226, "precision": 0.016666666666667, "globe": "http://www.wikidata.org/entity/Q111" }'
The globe.js script adds a UI to set the globe parameter of coordinate location (P625).
Bots such as LocatorBot may detect when the globe parameter of coordinate location (P625) is not set according to located on astronomical body (P376). Adding located on astronomical body (P376) and waiting for a bot to update the coordinate globe is an accepted workaround.
Technical details
In the Wikibase JSON format each value is represented by "datatype": <datatype>, "datavalue": {"type": <type>, "value": ...}
, where the representation of the value
depends on the type
.
In the RDF format data types are represented by the RDF name in the following table prefixed with http://wikiba.se/ontology# (or the wikibase:
prefix in case of the RDF dumps). Note that this prefix is also available in the Wikidata query service, so for example ?prop wikibase:propertyType wikibase:String will return all properties of data type String.
Name | JSON datatype | RDF name | JSON type | Implemented by | Links |
---|---|---|---|---|---|
Item | wikibase-item | WikibaseItem | wikibase-entityid | built-in | list, query |
Atribut | wikibase-property | WikibaseProperty | wikibase-entityid | built-in | list, query |
Lexeme | wikibase-lexeme | WikibaseLexeme | wikibase-entityid | WikibaseLexeme (Q28925815) | list, query |
Sense | wikibase-sense | WikibaseSense | wikibase-entityid | WikibaseLexeme (Q28925815) | list, query |
Form | wikibase-form | WikibaseForm | wikibase-entityid | WikibaseLexeme (Q28925815) | list, query |
Teks satu bahasa | monolingualtext | Monolingualtext | monolingualtext | built-in | list, query |
String | string | String | string | built-in | list, query |
Penanda luar | external-id | ExternalId | string | built-in | list, query |
URL | url | Url | string | built-in | list, query |
Berkas media Commons | commonsMedia | CommonsMedia | string | built-in | list, query |
Bentuk geografis | geo-shape | GeoShape | string | built-in | list, query |
Data tabel | tabular-data | TabularData | string | built-in | list, query |
Ekspresi matematika | math | Math | string | Math (Q21677559) | list, query |
Notasi Musik | musical-notation | MusicalNotation | string | Score (Q21678392) | list, query |
Jumlah | quantity | Quantity | quantity | built-in | list, query |
Titik waktu | time | Time | time | built-in | list, query |
Koordinat geografis | globe-coordinate | Globecoordinate | globecoordinate | built-in | list, query |
Limitations
- Point in time doesn't support time of day. phab:T57755
- Quantity doesn't support infinity (Q205), e.g. you cannot state prime number (Q49008)quantity (P1114)infinitely many.
Pending data types
For none of the following dates of implementation are likely to be available. Existing datatypes may solve it in the meantime.
To be done
Durasi
waktu dalam format HH:MM:SS.
To plan
Calculated property
A property calculated by Wikibase and added directly to items. Not in development plan.
Possible uses: number of statements on the item.
Celestial coordinates
A coordinate format for specifying positions of celestial objects. Not in development plan.
Current work-around: see Wikidata:Property proposal/Astronomical coordinates
Integer datatype
A quantity datatype for positive integer numbers. This was partially implemented by removing precision and creating integer constraint (Q52848401).
Monostring item
A datatype allowing descriptions in any language, but a single label. Not in development plan.
Current alternatives: lexemes
Alternative that is being evaluated: multilingual label replacing repeated labels
Teks multibahasa
A string that must be translated into other languages. Use might be an entity name on non-local form, that is translated into various languages and script systems. (Note that multilingual text also imply a lot of manual work during translation.). Actual purpose to be determined.
Multiline text
A string that may contain newlines.
Remote property
Properties in remote repositories are likely to be identified through a special field on existing entities, not a separate datatype.
Value series
A simplified way to store series of values for different points in time. Not in development plan.
Chess
Display strings in FEN notation as in position in Forsyth-Edwards Notation (P6648) directly as chessboards.
Hiero
Strings for display with WikiHiero. Strings in WikiHiero syntax are embedded in <hiero></hiero>
to display. Samples on Talk:Q68101340 and Property_talk:P7383.
Phab request to do.
Combined human-readable and numeric id
Datatype to add numeric id and page title, e.g. of a MediaWiki page. Qualifier MediaWiki page ID (P9675) is sometimes added to property value with page titles. Some properties use the numeric value directly.
Wikibase statement
Datatype to reference a specific Wikidata statement.
Regular expressions
Datatype to store regular expressions (regex). These are currently stored as strings or monolingual text, e.g. format as a regular expression (P1793), format as language specific regular expression (P8770).
IP address ranges
Datatype to store address ranges and simplify querying them.
Data types that will never be implemented
Boolean
Declined. Suggested alternative: item-datatype.
Changing datatype
A property in "string" datatype may be converted to "external identifier" datatype by a system administrator. To propose such a change, you may start a discussion at the talk page of the property or Project chat. After a consensus, a request may be made in Contact the development team. You should read previous discussion if you want to convert a property created before 2016.
Other changes of data type requires creating a new property and deleting the old one. You should use Properties for deletion for such requests.