Module:Convert/wikidata/data

Tikang ha Wikipedia

Documentation for this module may be created at Module:Convert/wikidata/data/doc

--[[ Cache of Wikidata information with units for Module:Convert.
The codes should rarely change, and using a cache means that changing a
unit at Wikidata will not cause lots of converts in articles to break.

For a unit known to convert, the unit here must have:
	label = Wikidata label for unit (used only when listing units)
	ucode = unit code for input to convert
	(there are no optional fields because convert handles everything)

For a unit not known to convert, the unit here must have:
	label = Wikidata label for unit (used only when listing units)
	(no ucode field)
	_ucode = unit code for input to convert, and the
	         symbol used to display the unit when abbr=on
	(convert will use the specified fields to display the unit,
	and will not attempt to do a conversion)

For a unit not known to convert, the unit here may have:
	name1 = singular name used to display the unit when abbr=off
	name2 = plural name used to display the unit when abbr=off
	link = name of article that unit will be linked to when lk=on
	si = key for the SI base unit, if any

The base unit for each SI unit here must have:
	symbol = symbol used to display the base unit when abbr=on
	name1 = singular name of base unit used to display the unit when abbr=off
	(if name1 is not given, symbol will be used, but an SI unit should have a name)

The base unit for each SI unit here may have:
	name2 = plural name of base unit used to display the unit when abbr=off
	link = name of article that unit will be linked to when lk=on
	       (applies for all SI units using this base, where the
		   SI unit does not define its own link field)

If name1 is not specified, the symbol is used for the name.
If name2 is not specified, a plural name is formed by appending 's' to name1.
If link is not specified, name1 is used for the link.

SI units are assumed to be simple items like V (volt) where 'mV' would
cause convert to insert:
	'm' before the base symbol 'V' to make 'mV', if abbr=on
	'milli' before the base name 'volt' to make 'millivolt', if abbr=off
A unit like "square meter" would not work because it needs an SI prefix
inserted before "meter" rather than at the beginning of the name.

Items that should not be used with convert as no precise unit is implied:
Q11247037  ton          generic (cannot use)
Q178413    gallon       generic
Q130964    calorie      dubious (ambiguous, should not use)
Q216658    bushel       dubious
Q420266    fluid ounce  dubious
]]

local wikidata_units = {
	-- Following are SI base units.
	A = {
		symbol = 'A',
		name1 = 'amperyo',
	},
	F = {
		symbol = 'F',
		name1 = 'faraday',
	},
	H = {
		symbol = 'H',
		name1 = 'henry',
	},
	V = {
		symbol = 'V',
		name1 = 'voltahe',
	},
	-- Following are aliases to convert unit codes, used with "input=<value><space><unit>".
	kilograms = {
		ucode = 'kg',
	},
	-- Following are SI units not known to convert, used with "input=<value><space><unit>".
	kV = {
		ucode = 'kV',
		si = 'V',
	},
	mV = {
		ucode = 'mV',
		si = 'V',
	},
	-- Following are Wikidata units.
	Q131255 = {
		label = 'farad',
		_ucode = 'F',
		si = 'F',
	},
	Q163354 = {
		label = 'henry',
		_ucode = 'H',
		si = 'H',
	},
	Q1916026 = {
		label = 'microvoltahe',
		_ucode = 'uV',
		si = 'V',
	},
	Q193933 = {
		label = 'dioptre',
		name1 = 'dioptre',
		_ucode = 'dpt',
	},
	Q212120 = {
		label = 'amperyo-oras',
		name1 = 'amperyo-oras',
		_ucode = 'A⋅h',
	},
	Q2448803 = {
		label = 'milivoltahe',
		_ucode = 'mV',
		si = 'V',
	},
	Q2451296 = {
		label = 'microfarad',
		_ucode = 'uF',
		si = 'F',
	},
	Q2490574 = {
		label = 'miliamperyo',
		_ucode = 'mA',
		si = 'A',
	},
	Q25250 = {
		label = 'voltahe',
		_ucode = 'V',
		si = 'V',
	},
	Q25272 = {
		label = 'amperyo',
		_ucode = 'A',
		si = 'A',
	},
	Q2553708 = {
		label = 'megavoltahe',
		_ucode = 'MV',
		si = 'V',
	},
	Q2554092 = {
		label = 'kilovoltahe',
		_ucode = 'kV',
		si = 'V',
	},
	Q2636421 = {
		label = 'nanohenry',
		_ucode = 'nH',
		si = 'H',
	},
	Q2679083 = {
		label = 'mikrohenry',
		_ucode = 'uH',
		si = 'H',
	},
	Q2682463 = {
		label = 'nanofarad',
		_ucode = 'nF',
		si = 'F',
	},
	Q2756030 = {
		label = 'pikofarad',
		_ucode = 'pF',
		si = 'F',
	},
	Q2793566 = {
		label = 'gigavoltahe',
		_ucode = 'GV',
		si = 'V',
	},
	Q2924137 = {
		label = 'milihenry',
		_ucode = 'mH',
		si = 'H',
	},
	Q3117809 = {
		label = 'mikroamperyo',
		_ucode = 'uA',
		si = 'A',
	},
	Q33680 = {
		label = 'radian',
		name1 = 'radian',
		_ucode = 'rad',
	},
	Q4456994 = {
		label = 'milifarad',
		_ucode = 'mF',
		si = 'F',
	},
	Q47083 = {
		label = 'ohm',
		name1 = 'ohm',
		_ucode = 'Ω',
	},
	Q483261 = {
		label = 'atomiko nga masa hin unit',
		name1 = 'atomiko nga masa hin unit',
		_ucode = 'u',
	},
	Q550341 = {
		label = 'voltahe-amperyo',
		name1 = 'voltahe-amperyo',
		_ucode = 'VA',
	},
	Q100995 = {
		label = 'libra',
		ucode = 'lb',
	},
	Q1022113 = {
		label = 'kubiko nga sentimetro',
		ucode = 'cc',
	},
	Q102573 = {
		label = 'becquerel',
		ucode = 'Bq',
	},
	Q103246 = {
		label = 'sievert',
		ucode = 'Sv',
	},
	Q1050958 = {
		label = 'pulgada hin merkuryo',
		ucode = 'inHg',
	},
	Q1051665 = {
		label = 'metro ha tagsa segundo nga kwadrado',
		ucode = 'm/s2',
	},
	Q1052397 = {
		label = 'rad',
		ucode = 'rad',
	},
	Q1054140 = {
		label = 'megametro',
		ucode = 'Mm',
	},
	Q1057069 = {
		label = 'hektogramo',
		ucode = 'hg',
	},
	Q1063786 = {
		label = 'kwadrado nga pulgada',
		ucode = 'sqin',
	},
	Q1092296 = {
		label = 'tuig',
		ucode = 'year',
	},
	Q11570 = {
		label = 'kilogramo',
		ucode = 'kg',
	},
	Q11573 = {
		label = 'metro',
		ucode = 'm',
	},
	Q11574 = {
		label = 'segundo',
		ucode = 's',
	},
	Q11579 = {
		label = 'kelvin',
		ucode = 'K',
	},
	Q11582 = {
		label = 'litro',
		ucode = 'liter',
	},
	Q1165588 = {
		label = 'rod',
		ucode = 'rod',
	},
	Q1165799 = {
		label = 'thou',
		ucode = 'thou',
	},
	Q11776930 = {
		label = 'megagramo',
		ucode = 'Mg',
	},
	Q11929860 = {
		label = 'kiloparsec',
		ucode = 'kpc',
	},
	Q1194225 = {
		label = 'libra-pwersa',
		ucode = 'lbf',
	},
	Q12129 = {
		label = 'parsec',
		ucode = 'pc',
	},
	Q12438 = {
		label = 'newton',
		ucode = 'N',
	},
	Q1255620 = {
		label = 'dram',
		ucode = 'drachm',
	},
	Q12874593 = {
		label = 'watt-nga-oras',
		ucode = 'W.h',
	},
	Q128822 = {
		label = 'knot',
		ucode = 'kn',
	},
	Q1374438 = {
		label = 'kilosegundo',
		ucode = 'ks',
	},
	Q1377051 = {
		label = 'gigasegundo',
		ucode = 'Gs',
	},
	Q14754979 = {
		label = 'zetagramo',
		ucode = 'Zg',
	},
	Q14786969 = {
		label = 'megajoule',
		ucode = 'MJ',
	},
	Q14787261 = {
		label = 'megawatt nga oras',
		ucode = 'MW.h',
	},
	Q1550511 = {
		label = 'kwadrado nga yard',
		ucode = 'sqyd',
	},
	Q160857 = {
		label = 'kusog hin kabayo',
		ucode = 'hp',
	},
	Q1628990 = {
		label = 'kusog hin kabayo-oras',
		ucode = 'hph',
	},
	Q163343 = {
		label = 'tesla',
		ucode = 'T',
	},
	Q1645498 = {
		label = 'mikrogramo',
		ucode = 'ug',
	},
	Q17087835 = {
		label = 'kwerda',
		ucode = 'cda',
	},
	Q174728 = {
		label = 'sentimetro',
		ucode = 'cm',
	},
	Q174789 = {
		label = 'milimetro',
		ucode = 'mm',
	},
	Q175821 = {
		label = 'mikrometro',
		ucode = 'um',
	},
	Q1770733 = {
		label = 'teragramo',
		ucode = 'Tg',
	},
	Q1772386 = {
		label = 'desigramo',
		ucode = 'dg',
	},
	Q177493 = {
		label = 'gauss',
		ucode = 'G',
	},
	Q1777507 = {
		label = 'femtosegundo',
		ucode = 'fs',
	},
	Q177974 = {
		label = 'atmospera',
		ucode = 'atm',
	},
	Q178674 = {
		label = 'nanometro',
		ucode = 'nm',
	},
	Q180154 = {
		label = 'kilometro ha tagsa oras',
		ucode = 'km/h',
	},
	Q180892 = {
		label = 'solar mass',
		ucode = 'solar mass',
	},
	Q1811 = {
		label = 'astronomikal nga unit',
		ucode = 'au',
	},
	Q1815100 = {
		label = 'sentilitro',
		ucode = 'cl',
	},
	Q182098 = {
		label = 'kilowatt nga oras',
		ucode = 'kW.h',
	},
	Q1823150 = {
		label = 'mikrowatt',
		ucode = 'uW',
	},
	Q182429 = {
		label = 'metro ha tagsa segundo',
		ucode = 'm/s',
	},
	Q1826195 = {
		label = 'desilitro',
		ucode = 'dl',
	},
	Q185078 = {
		label = 'are',
		ucode = 'a',
	},
	Q185153 = {
		label = 'erg',
		ucode = 'erg',
	},
	Q185648 = {
		label = 'torr',
		ucode = 'Torr',
	},
	Q190095 = {
		label = 'gray',
		ucode = 'Gy',
	},
	Q191118 = {
		label = 'tonelada',
		ucode = 'tonne',
	},
	Q1913097 = {
		label = 'femtogramo',
		ucode = 'fg',
	},
	Q192274 = {
		label = 'pikometro',
		ucode = 'pm',
	},
	Q1972579 = {
		label = 'poundal',
		ucode = 'pdl',
	},
	Q200323 = {
		label = 'desimetro',
		ucode = 'dm',
	},
	Q201933 = {
		label = 'dyne',
		ucode = 'dyn',
	},
	Q2029519 = {
		label = 'hektolitro',
		ucode = 'hl',
	},
	Q2051195 = {
		label = 'gigawatt nga oras',
		ucode = 'GW.h',
	},
	Q207488 = {
		label = 'Rankine nga timbangan',
		ucode = 'R',
	},
	Q208788 = {
		label = 'femtometro',
		ucode = 'fm',
	},
	Q2101 = {
		label = 'elementaryo nga karga',
		ucode = 'e',
	},
	Q21014455 = {
		label = 'metro ha tagsa minuto',
		ucode = 'm/min',
	},
	Q21062777 = {
		label = 'megapascal',
		ucode = 'MPa',
	},
	Q21064807 = {
		label = 'kilopascal',
		ucode = 'kPa',
	},
	Q211256 = {
		label = 'milya ha tagsa oras',
		ucode = 'mph',
	},
	Q21178489 = {
		label = 'mga bariles ha tagsa adlaw',
		ucode = 'oilbbl/d',
	},
	Q2143992 = {
		label = 'kilohertz',
		ucode = 'kHz',
	},
	Q21467992 = {
		label = 'kubiko nga pye ha tagsa segundo',
		ucode = 'cuft/s',
	},
	Q215571 = {
		label = 'newton nga metro',
		ucode = 'Nm',
	},
	Q216795 = {
		label = 'dunam',
		ucode = 'dunam',
	},
	Q216880 = {
		label = 'kilogramo-pwersa',
		ucode = 'kgf',
	},
	Q18413919 = {
		label = 'sentimetro ha tagsa segundo',
		ucode = 'cm/s',
	},
	Q218593 = {
		label = 'pulgada',
		ucode = 'in',
	},
	Q2282891 = {
		label = 'mikrolitro',
		ucode = 'ul',
	},
	Q2282906 = {
		label = 'nanogramo',
		ucode = 'ng',
	},
	Q229354 = {
		label = 'curie',
		ucode = 'Ci',
	},
	Q232291 = {
		label = 'kwadrado nga milya',
		ucode = 'sqmi',
	},
	Q2332346 = {
		label = 'mililitro',
		ucode = 'ml',
	},
	Q23387 = {
		label = 'semana',
		ucode = 'week',
	},
	Q23823681 = {
		label = 'terawatt',
		ucode = 'TW',
	},
	Q23925410 = {
		label = 'galon',
		ucode = 'impgal',
	},
	Q23925413 = {
		label = 'galon',
		ucode = 'USgal',
	},
	Q2438073 = {
		label = 'atogramo',
		ucode = 'ag',
	},
	Q2474258 = {
		label = 'milisievert',
		ucode = 'mSv',
	},
	Q2483628 = {
		label = 'atosegundo',
		ucode = 'as',
	},
	Q2489298 = {
		label = 'kwadrado nga sentimetro',
		ucode = 'cm2',
	},
	Q2518569 = {
		label = 'nanosievert',
		ucode = 'nSv',
	},
	Q25235 = {
		label = 'oras',
		ucode = 'h',
	},
	Q25236 = {
		label = 'watt',
		ucode = 'W',
	},
	Q25267 = {
		label = 'mga grado nga Celsius',
		ucode = 'C',
	},
	Q25269 = {
		label = 'joule',
		ucode = 'J',
	},
	Q253276 = {
		label = 'milya',
		ucode = 'mi',
	},
	Q25343 = {
		label = 'kwadrado nga metro',
		ucode = 'm2',
	},
	Q25406 = {
		label = 'coulomb',
		ucode = 'coulomb',
	},
	Q25517 = {
		label = 'kubiko nga metro',
		ucode = 'm3',
	},
	Q260126 = {
		label = 'Roentgen equivalent man',
		ucode = 'rem',
	},
	Q2612219 = {
		label = 'petagramo',
		ucode = 'Pg',
	},
	Q2619500 = {
		label = 'Foe',
		ucode = 'foe',
	},
	Q2637946 = {
		label = 'dekalitro',
		ucode = 'dal',
	},
	Q2655272 = {
		label = 'exagramo',
		ucode = 'Eg',
	},
	Q2691798 = {
		label = 'sentigramo',
		ucode = 'cg',
	},
	Q2739114 = {
		label = 'mikrosievert',
		ucode = 'uSv',
	},
	Q2799294 = {
		label = 'gigagramo',
		ucode = 'Gg',
	},
	Q3013059 = {
		label = 'Kyr',
		ucode = 'millennium',
	},
	Q305896 = {
		label = 'tuldok ha tagsa pulgada',
		ucode = 'dpi',
	},
	Q3207456 = {
		label = 'miliwatt',
		ucode = 'mW',
	},
	Q3221356 = {
		label = 'yoktometro',
		ucode = 'ym',
	},
	Q3239557 = {
		label = 'pikogramo',
		ucode = 'pg',
	},
	Q3241121 = {
		label = 'miligramo',
		ucode = 'mg',
	},
	Q3267417 = {
		label = 'terametro',
		ucode = 'Tm',
	},
	Q3270676 = {
		label = 'zeptometro',
		ucode = 'zm',
	},
	Q3276763 = {
		label = 'gigahertz',
		ucode = 'GHz',
	},
	Q3277907 = {
		label = 'exametro',
		ucode = 'Em',
	},
	Q3277915 = {
		label = 'zetametro',
		ucode = 'Zm',
	},
	Q3277919 = {
		label = 'petametro',
		ucode = 'Pm',
	},
	Q3312063 = {
		label = 'femtolitro',
		ucode = 'fl',
	},
	Q3320608 = {
		label = 'kilowatt',
		ucode = 'kW',
	},
	Q3332822 = {
		label = 'megatonelada',
		ucode = 'Mt(TNT)',
	},
	Q35852 = {
		label = 'hektarya',
		ucode = 'ha',
	},
	Q3675550 = {
		label = 'kubiko nga milimetro',
		ucode = 'mm3',
	},
	Q3710 = {
		label = 'pye',
		ucode = 'ft',
	},
	Q3773454 = {
		label = 'megaparsec',
		ucode = 'Mpc',
	},
	Q3902688 = {
		label = 'pikolitro',
		ucode = 'pl',
	},
	Q3902709 = {
		label = 'pikosegundo',
		ucode = 'ps',
	},
	Q39369 = {
		label = 'hertz',
		ucode = 'Hz',
	},
	Q3972226 = {
		label = 'kilolitro',
		ucode = 'kl',
	},
	Q4068266 = {
		label = "apothecaries' drachm",
		ucode = 'drachm',
	},
	Q41803 = {
		label = 'gramo',
		ucode = 'g',
	},
	Q4220561 = {
		label = 'kilometro ha tagsa segundo',
		ucode = 'km/s',
	},
	Q42289 = {
		label = 'grado nga Fahrenheit',
		ucode = 'F',
	},
	Q4243638 = {
		label = 'kubiko nga kilometro',
		ucode = 'km3',
	},
	Q44395 = {
		label = 'pascal',
		ucode = 'Pa',
	},
	Q48013 = {
		label = 'onza',
		ucode = 'oz',
	},
	Q482798 = {
		label = 'yarda',
		ucode = 'yd',
	},
	Q4989854 = {
		label = 'kilojoule',
		ucode = 'kJ',
	},
	Q4992853 = {
		label = 'kilotonelada',
		ucode = 'kt(TNT)',
	},
	Q5139563 = {
		label = 'hektopascal',
		ucode = 'hPa',
	},
	Q5151 = {
		label = 'bulan',
		ucode = 'month',
	},
	Q531 = {
		label = 'pawa-tuig',
		ucode = 'ly',
	},
	Q5465723 = {
		label = 'pye-poundal',
		ucode = 'ftpdl',
	},
	Q573 = {
		label = 'adlaw',
		ucode = 'd',
	},
	Q577 = {
		label = 'tuig',
		ucode = 'year',
	},
	Q5879479 = {
		label = 'gigawatt',
		ucode = 'GW',
	},
	Q6003257 = {
		label = 'atometro',
		ucode = 'am',
	},
	Q613726 = {
		label = 'yotagramo',
		ucode = 'Yg',
	},
	Q6170164 = {
		label = 'yoktogramo',
		ucode = 'yg',
	},
	Q667419 = {
		label = 'halaba nga tonelada',
		ucode = 'LT',
	},
	Q673166 = {
		label = 'gravidad han Kalibutan',
		ucode = 'g0',
	},
	Q693944 = {
		label = 'grain',
		ucode = 'gr',
	},
	Q6982035 = {
		label = 'megawatt',
		ucode = 'MW',
	},
	Q712226 = {
		label = 'kwadrado nga kilometro',
		ucode = 'km2',
	},
	Q723733 = {
		label = 'milisegundo',
		ucode = 'ms',
	},
	Q732454 = {
		label = 'Ma',
		ucode = 'Myr',
	},
	Q732707 = {
		label = 'megahertz',
		ucode = 'MHz',
	},
	Q752079 = {
		label = 'gross register ton',
		ucode = 'grt',
	},
	Q752197 = {
		label = 'kilojoule ha tagsa mole',
		ucode = 'kJ/mol',
	},
	Q7727 = {
		label = 'minuto',
		ucode = 'min',
	},
	Q794261 = {
		label = 'kubiko nga metro ha tagsa second',
		ucode = 'm3/s',
	},
	Q809678 = {
		label = 'barye',
		ucode = 'Ba',
	},
	Q81292 = {
		label = 'akre',
		ucode = 'acre',
	},
	Q81454 = {
		label = 'ångström',
		ucode = 'angstrom',
	},
	Q828224 = {
		label = 'kilometro',
		ucode = 'km',
	},
	Q83327 = {
		label = 'elektronvoltahe',
		ucode = 'eV',
	},
	Q838801 = {
		label = 'nanosegundo',
		ucode = 'ns',
	},
	Q842015 = {
		label = 'mikrosegundo',
		ucode = 'us',
	},
	Q844211 = {
		label = 'kilogramo ha tagsa kubiko nga metro',
		ucode = 'kg/m3',
	},
	Q844338 = {
		label = 'hektometro',
		ucode = 'hm',
	},
	Q844976 = {
		label = 'Oersted',
		ucode = 'Oe',
	},
	Q848856 = {
		label = 'dekametro',
		ucode = 'dam',
	},
	Q854546 = {
		label = 'gigametro',
		ucode = 'Gm',
	},
	Q857027 = {
		label = 'kwadrado nga pye',
		ucode = 'sqft',
	},
	Q9048643 = {
		label = 'nanolitro',
		ucode = 'nl',
	},
	Q93318 = {
		label = 'nautiko nga milya',
		ucode = 'nmi',
	},
}

return { wikidata_units = wikidata_units }