Modulo:Pagbaliwen/wikidata/datos

Dokumentasion ti modulo
--[[ 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 = 'amperio',
	},
	F = {
		symbol = 'F',
		name1 = 'faraday',
	},
	H = {
		symbol = 'H',
		name1 = 'henry',
	},
	V = {
		symbol = 'V',
		name1 = 'boltahe',
	},
	-- 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 = 'mikroboltahe',
		_ucode = 'uV',
		si = 'V',
	},
	Q193933 = {
		label = 'dioptre',
		name1 = 'dioptre',
		_ucode = 'dpt',
	},
	Q212120 = {
		label = 'amperio oras',
		name1 = 'amperio oras',
		_ucode = 'A·h',
	},
	Q2448803 = {
		label = 'miliboltahe',
		_ucode = 'mV',
		si = 'V',
	},
	Q2451296 = {
		label = 'mikrofarad',
		_ucode = 'uF',
		si = 'F',
	},
	Q2490574 = {
		label = 'miliamperio',
		_ucode = 'mA',
		si = 'A',
	},
	Q25250 = {
		label = 'boltahe',
		_ucode = 'V',
		si = 'V',
	},
	Q25272 = {
		label = 'amperio',
		_ucode = 'A',
		si = 'A',
	},
	Q2553708 = {
		label = 'megaboltahe',
		_ucode = 'MV',
		si = 'V',
	},
	Q2554092 = {
		label = 'kiloboltahe',
		_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 = 'picofarad',
		_ucode = 'pF',
		si = 'F',
	},
	Q2793566 = {
		label = 'gigaboltahe',
		_ucode = 'GV',
		si = 'V',
	},
	Q2924137 = {
		label = 'milihenry',
		_ucode = 'mH',
		si = 'H',
	},
	Q3117809 = {
		label = 'mikroamperio',
		_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 = 'dalton',
		name1 = 'dalton',
		_ucode = 'u',
	},
	Q550341 = {
		label = 'boltahe-amperio',
		name1 = 'boltahe-amperio',
		_ucode = 'VA',
	},
	Q100995 = {
		label = 'libra',
		ucode = 'lb',
	},
	Q1022113 = {
		label = 'kubiko sentimetro',
		ucode = 'cc',
	},
	Q102573 = {
		label = 'becquerel',
		ucode = 'Bq',
	},
	Q103246 = {
		label = 'sievert',
		ucode = 'Sv',
	},
	Q1050958 = {
		label = 'pulgada iti merkurio',
		ucode = 'inHg',
	},
	Q1051665 = {
		label = 'metro kada segundo nakuadrado',
		ucode = 'm/s2',
	},
	Q1052397 = {
		label = 'rad',
		ucode = 'rad',
	},
	Q1054140 = {
		label = 'megametro',
		ucode = 'Mm',
	},
	Q1057069 = {
		label = 'hektogramo',
		ucode = 'hg',
	},
	Q1063786 = {
		label = 'kuadrado pulgada',
		ucode = 'sqin',
	},
	Q1092296 = {
		label = 'tawen',
		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-puersa',
		ucode = 'lbf',
	},
	Q12129 = {
		label = 'parsec',
		ucode = 'pc',
	},
	Q12438 = {
		label = 'newton',
		ucode = 'N',
	},
	Q1255620 = {
		label = 'dram',
		ucode = 'drachm',
	},
	Q12874593 = {
		label = 'watt-oras',
		ucode = 'W.h',
	},
	Q128822 = {
		label = 'knot',
		ucode = 'kn',
	},
	Q1374438 = {
		label = 'kilosegundo',
		ucode = 'ks',
	},
	Q1377051 = {
		label = 'gigasegundo',
		ucode = 'Gs',
	},
	Q14754979 = {
		label = 'setagramo',
		ucode = 'Zg',
	},
	Q14786969 = {
		label = 'megajoule',
		ucode = 'MJ',
	},
	Q14787261 = {
		label = 'megawatt oras',
		ucode = 'MW.h',
	},
	Q1550511 = {
		label = 'kuadrado yarda',
		ucode = 'sqyd',
	},
	Q160857 = {
		label = 'metriko pigsa ti kabalio',
		ucode = 'hp',
	},
	Q1628990 = {
		label = 'pigsa ti kabalio-oras',
		ucode = 'hph',
	},
	Q163343 = {
		label = 'tesla',
		ucode = 'T',
	},
	Q1645498 = {
		label = 'mikrogramo',
		ucode = 'ug',
	},
	Q17087835 = {
		label = 'kuerda',
		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 = 'pemtosegundo',
		ucode = 'fs',
	},
	Q177974 = {
		label = 'pagalagadan nga atmospera',
		ucode = 'atm',
	},
	Q178674 = {
		label = 'nanometro',
		ucode = 'nm',
	},
	Q180154 = {
		label = 'kilometro kada oras',
		ucode = 'km/h',
	},
	Q180892 = {
		label = 'solar mass',
		ucode = 'solar mass',
	},
	Q1811 = {
		label = 'astronomikal a yunit',
		ucode = 'au',
	},
	Q1815100 = {
		label = 'sentilitro',
		ucode = 'cl',
	},
	Q182098 = {
		label = 'kilowatt oras',
		ucode = 'kW.h',
	},
	Q1823150 = {
		label = 'mikrowatt',
		ucode = 'uW',
	},
	Q182429 = {
		label = 'metro kada 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 = 'pemtogramo',
		ucode = 'fg',
	},
	Q192274 = {
		label = 'pikometro',
		ucode = 'pm',
	},
	Q1972579 = {
		label = 'poundal',
		ucode = 'pdl',
	},
	Q200323 = {
		label = 'desimetro',
		ucode = 'dm',
	},
	Q201933 = {
		label = 'dina',
		ucode = 'dyn',
	},
	Q2029519 = {
		label = 'hektolitro',
		ucode = 'hl',
	},
	Q2051195 = {
		label = 'gigawatt oras',
		ucode = 'GW.h',
	},
	Q207488 = {
		label = 'gantingan ti rankine',
		ucode = 'R',
	},
	Q208788 = {
		label = 'pemtometro',
		ucode = 'fm',
	},
	Q2101 = {
		label = 'elementario a karga',
		ucode = 'e',
	},
	Q21014455 = {
		label = 'metro kada minuto',
		ucode = 'm/min',
	},
	Q21062777 = {
		label = 'megapascal',
		ucode = 'MPa',
	},
	Q21064807 = {
		label = 'kilopascal',
		ucode = 'kPa',
	},
	Q211256 = {
		label = 'milia kada oras',
		ucode = 'mph',
	},
	Q21178489 = {
		label = 'barbariles kada aldaw',
		ucode = 'oilbbl/d',
	},
	Q2143992 = {
		label = 'kilohertz',
		ucode = 'kHz',
	},
	Q21467992 = {
		label = 'kubiko kadapan kada segundo',
		ucode = 'cuft/s',
	},
	Q215571 = {
		label = 'newton metro',
		ucode = 'Nm',
	},
	Q216795 = {
		label = 'dunam',
		ucode = 'dunam',
	},
	Q216880 = {
		label = 'kilogramo-puersa',
		ucode = 'kgf',
	},
	Q18413919 = {
		label = 'sentimetro kada 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 = 'kuadrado milia',
		ucode = 'sqmi',
	},
	Q2332346 = {
		label = 'mililitro',
		ucode = 'ml',
	},
	Q23387 = {
		label = 'lawas',
		ucode = 'week',
	},
	Q23823681 = {
		label = 'terawatt',
		ucode = 'TW',
	},
	Q23925410 = {
		label = 'galon (RU)',
		ucode = 'impgal',
	},
	Q23925413 = {
		label = 'galon (EU}',
		ucode = 'USgal',
	},
	Q2438073 = {
		label = 'atogramo',
		ucode = 'ag',
	},
	Q2474258 = {
		label = 'milisievert',
		ucode = 'mSv',
	},
	Q2483628 = {
		label = 'atosegundo',
		ucode = 'as',
	},
	Q2489298 = {
		label = 'kuadrado sentimetro',
		ucode = 'cm2',
	},
	Q2518569 = {
		label = 'nanosievert',
		ucode = 'nSv',
	},
	Q25235 = {
		label = 'oras',
		ucode = 'h',
	},
	Q25236 = {
		label = 'watt',
		ucode = 'W',
	},
	Q25267 = {
		label = 'grado Celsius',
		ucode = 'C',
	},
	Q25269 = {
		label = 'joule',
		ucode = 'J',
	},
	Q253276 = {
		label = 'milia',
		ucode = 'mi',
	},
	Q25343 = {
		label = 'kuadrado metro',
		ucode = 'm2',
	},
	Q25406 = {
		label = 'kulombio',
		ucode = 'coulomb',
	},
	Q25517 = {
		label = 'kubiko 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 = 'eksagramo',
		ucode = 'Eg',
	},
	Q2691798 = {
		label = 'sentigramo',
		ucode = 'cg',
	},
	Q2739114 = {
		label = 'mikrosievert',
		ucode = 'uSv',
	},
	Q2799294 = {
		label = 'gigagramo',
		ucode = 'Gg',
	},
	Q3013059 = {
		label = 'kiloannum',
		ucode = 'millennium',
	},
	Q305896 = {
		label = 'tultulnek kada 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 = 'septometro',
		ucode = 'zm',
	},
	Q3276763 = {
		label = 'gigahertz',
		ucode = 'GHz',
	},
	Q3277907 = {
		label = 'eksametro',
		ucode = 'Em',
	},
	Q3277915 = {
		label = 'setametro',
		ucode = 'Zm',
	},
	Q3277919 = {
		label = 'petametro',
		ucode = 'Pm',
	},
	Q3312063 = {
		label = 'pemtolitro',
		ucode = 'fl',
	},
	Q3320608 = {
		label = 'kilowatt',
		ucode = 'kW',
	},
	Q3332822 = {
		label = 'megatonelada ti TNT',
		ucode = 'Mt(TNT)',
	},
	Q35852 = {
		label = 'hektaria',
		ucode = 'ha',
	},
	Q3675550 = {
		label = 'kubiko milimetro',
		ucode = 'mm3',
	},
	Q3710 = {
		label = 'kadapan',
		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 kada segundo',
		ucode = 'km/s',
	},
	Q42289 = {
		label = 'grado Fahrenheit',
		ucode = 'F',
	},
	Q4243638 = {
		label = 'kubiko kilometro',
		ucode = 'km3',
	},
	Q44395 = {
		label = 'pascal',
		ucode = 'Pa',
	},
	Q48013 = {
		label = 'onsa',
		ucode = 'oz',
	},
	Q482798 = {
		label = 'yarda',
		ucode = 'yd',
	},
	Q4989854 = {
		label = 'kilojoule',
		ucode = 'kJ',
	},
	Q4992853 = {
		label = 'kilotonelada ti TNT',
		ucode = 'kt(TNT)',
	},
	Q5139563 = {
		label = 'hektopascal',
		ucode = 'hPa',
	},
	Q5151 = {
		label = 'bulan',
		ucode = 'month',
	},
	Q531 = {
		label = 'lawag-tawen',
		ucode = 'ly',
	},
	Q5465723 = {
		label = 'kadapan-poundal',
		ucode = 'ftpdl',
	},
	Q573 = {
		label = 'aldaw',
		ucode = 'd',
	},
	Q577 = {
		label = 'tawen',
		ucode = 'year',
	},
	Q5879479 = {
		label = 'gigawatt',
		ucode = 'GW',
	},
	Q6003257 = {
		label = 'atometro',
		ucode = 'am',
	},
	Q613726 = {
		label = 'yotagramo',
		ucode = 'Yg',
	},
	Q6170164 = {
		label = 'yoktogramo',
		ucode = 'yg',
	},
	Q667419 = {
		label = 'atiddog a tonelada',
		ucode = 'LT',
	},
	Q673166 = {
		label = 'grabidad ti Daga',
		ucode = 'g0',
	},
	Q693944 = {
		label = 'bukel',
		ucode = 'gr',
	},
	Q6982035 = {
		label = 'megawatt',
		ucode = 'MW',
	},
	Q712226 = {
		label = 'kuadrado kilometro',
		ucode = 'km2',
	},
	Q723733 = {
		label = 'milisegundo',
		ucode = 'ms',
	},
	Q732454 = {
		label = 'megaannum',
		ucode = 'Myr',
	},
	Q732707 = {
		label = 'megahertz',
		ucode = 'MHz',
	},
	Q752079 = {
		label = 'gross register ton',
		ucode = 'grt',
	},
	Q752197 = {
		label = 'kilojoule kada mol',
		ucode = 'kJ/mol',
	},
	Q7727 = {
		label = 'minuto',
		ucode = 'min',
	},
	Q794261 = {
		label = 'kubiko metro kada segundo',
		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 = 'elektronboltahe',
		ucode = 'eV',
	},
	Q838801 = {
		label = 'nanosegundo',
		ucode = 'ns',
	},
	Q842015 = {
		label = 'mikrosegundo',
		ucode = 'us',
	},
	Q844211 = {
		label = 'kilogramo kada kubiko 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 = 'kuadrado kadapan',
		ucode = 'sqft',
	},
	Q9048643 = {
		label = 'nanolitro',
		ucode = 'nl',
	},
	Q93318 = {
		label = 'nautika milia',
		ucode = 'nmi',
	},
}

return { wikidata_units = wikidata_units }