Module:Transclusion count/data/C៖ ភាពខុសគ្នារវាងកំណែនានា

ខ្លឹមសារដែលបានលុបចោល ខ្លឹមសារដែលបានសរសេរបន្ថែម
បានបង្កើតទំព័រដែលផ្ដើមដោយ --[[ This module is intended to replace the functionality of {{Coord}} and related templates. It provides several meth...
ស្លាក: កែ​សម្រួល​តាម​ទូរស័ព្ទ កំណែប្រែពីអ៊ីនធើណិតចល័ត Advanced mobile edit
 
Updated from en:Module:Transclusion_count/data/C
 
បន្ទាត់ទី១៖
return {
--[[
["C"] = 565000,
This module is intended to replace the functionality of {{Coord}} and related
["C-Class"] = 68000,
templates. It provides several methods, including
["C-SPAN"] = 12000,
 
["C-cmn"] = 2400,
{{#invoke:Coordinates | coord }} : General function formatting and displaying
["C-pl"] = 52000,
coordinate values.
["CAN"] = 20000,
 
["CANelec"] = 12000,
{{#invoke:Coordinates | dec2dms }} : Simple function for converting decimal
["CANelec/gain"] = 2300,
degree values to DMS format.
["CANelec/hold"] = 4200,
 
["CANelec/source"] = 6200,
{{#invoke:Coordinates | dms2dec }} : Simple function for converting DMS format
["CANelec/top"] = 5500,
to decimal degree format.
["CANelec/total"] = 5500,
 
["CAS"] = 3800,
{{#invoke:Coordinates | link }} : Export the link used to reach the tools
["CBB_Standings_End"] = 13000,
 
["CBB_Standings_Entry"] = 13000,
]]
["CBB_Standings_Start"] = 13000,
 
["CBB_Yearly_Record_End"] = 2700,
require('Module:No globals')
["CBB_Yearly_Record_Entry"] = 2700,
 
["CBB_Yearly_Record_Start"] = 2600,
local math_mod = require("Module:Math")
["CBB_Yearly_Record_Subhead"] = 3500,
local coordinates = {};
["CBB_Yearly_Record_Subtotal"] = 2500,
 
["CBB_roster/Footer"] = 6100,
local current_page = mw.title.getCurrentTitle()
["CBB_roster/Header"] = 6100,
local page_name = mw.uri.encode( current_page.prefixedText, 'WIKI' );
["CBB_roster/Player"] = 6100,
local coord_link = '//geohack.toolforge.org/geohack.php?pagename=' .. page_name .. '&params='
["CBB_schedule_end"] = 8700,
 
["CBB_schedule_entry"] = 8700,
--[[ Helper function, replacement for {{coord/display/title}} ]]
["CBB_schedule_start"] = 8800,
local function displaytitle(s, notes)
["CBB_yearly_record_end"] = 3600,
local l = "[[Geographic coordinate system|Coordinates]]: " .. s
["CBB_yearly_record_end/legend"] = 3200,
local co = '<span id="coordinates">' .. l .. notes .. '</span>';
["CBB_yearly_record_entry"] = 3600,
return '<span style="font-size: small;">' .. co .. '</span>';
["CBB_yearly_record_start"] = 3500,
end
["CBB_yearly_record_subhead"] = 3600,
 
["CBB_yearly_record_subtotal"] = 3400,
--[[ Helper function, Replacement for {{coord/display/inline}} ]]
["CBSB_Standings_End"] = 3600,
local function displayinline(s, notes)
["CBSB_Standings_Entry"] = 3600,
return s .. notes
["CBSB_Standings_Start"] = 3600,
end
["CBSB_link"] = 3100,
 
["CC0"] = 5700,
--[[ Helper function, used in detecting DMS formatting ]]
["CENTURY"] = 16000,
local function dmsTest(first, second)
["CFB_Standings_End"] = 30000,
if type(first) ~= 'string' or type(second) ~= 'string' then
["CFB_Standings_Entry"] = 30000,
return nil
["CFB_Standings_Start"] = 30000,
end
["CFB_Yearly_Record_End"] = 6200,
local s = (first .. second):upper()
["CFB_Yearly_Record_End/legend"] = 2200,
return s:find('^[NS][EW]$') or s:find('^[EW][NS]$')
["CFB_Yearly_Record_Entry"] = 6200,
end
["CFB_Yearly_Record_Start"] = 6200,
 
["CFB_Yearly_Record_Subhead"] = 6200,
 
["CFB_Yearly_Record_Subtotal"] = 6100,
--[[ Wrapper function to grab args, see Module:Arguments for this function's documentation. ]]
["CFB_schedule"] = 22000,
local function makeInvokeFunc(funcName)
["CFB_schedule_entry"] = 16000,
return function (frame)
["CFL_Year"] = 5200,
local args = require('Module:Arguments').getArgs(frame, {
["CGF_year"] = 2300,
wrappers = 'Template:Coord'
["CHE"] = 9800,
})
["CHI"] = 2600,
return coordinates[funcName](args, frame)
["CHL"] = 3500,
end
["CHN"] = 10000,
end
["COI"] = 14000,
 
["COIUL"] = 121000,
--[[ Helper function, handle optional args. ]]
["COI_editnotice"] = 5900,
local function optionalArg(arg, supplement)
["COL"] = 4500,
return arg and arg .. supplement or ''
["COLON"] = 13000,
end
["CRI"] = 2000,
 
["CRO"] = 3800,
--[[
["CSK"] = 2700,
Formats any error messages generated for display
["CSS_image_crop"] = 3300,
]]
["CUB"] = 3400,
local function errorPrinter(errors)
["CURRENTDATE"] = 3600,
local result = ""
["CURRENTISOYEAR"] = 2000,
for i,v in ipairs(errors) do
["CURRENTMINUTE"] = 2900,
local errorHTML = '<strong class="error">Coordinates: ' .. v[2] .. '</strong>'
["CZE"] = 13000,
result = result .. errorHTML .. "<br />"
["Calendar"] = 2400,
end
["California/color"] = 11000,
return result
["Call_sign_disambiguation"] = 2900,
end
["Campaignbox"] = 21000,
 
["CanadaByProvinceCatNav"] = 9500,
--[[
["CanadaProvinceThe"] = 3900,
Determine the required CSS class to display coordinates
["Canadian_English"] = 4600,
 
["Canadian_Parliament_links"] = 4900,
Usually geo-nondefault is hidden by CSS, unless a user has overridden this for himself
["Canadian_election_result"] = 12000,
default is the mode as specificied by the user when calling the {{coord}} template
["Canadian_election_result/gain"] = 2400,
mode is the display mode (dec or dms) that we will need to determine the css class for
["Canadian_election_result/hold"] = 4200,
]]
["Canadian_election_result/source"] = 7200,
local function displayDefault(default, mode)
["Canadian_election_result/top"] = 11000,
if default == "" then
["Canadian_election_result/top/ElectionYearTest"] = 5000,
default = "dec"
["Canadian_election_result/total"] = 9400,
end
["Canadian_party_colour"] = 15000,
 
["Canadian_party_colour/colour"] = 15000,
if default == mode then
["Canadian_party_colour/colour/default"] = 15000,
return "geo-default"
["Canadian_party_colour/name"] = 13000,
else
["Canadian_party_colour/name/default"] = 5600,
return "geo-nondefault"
["Canned_search"] = 3000,
end
["Cascite"] = 14000,
end
["Caselaw_source"] = 3800,
 
["Cast_listing"] = 8800,
--[[
["Cat"] = 259000,
specPrinter
["CatAutoTOC"] = 603000,
 
["CatAutoTOC/core"] = 602000,
Output formatter. Takes the structure generated by either parseDec
["CatRel"] = 3800,
or parseDMS and formats it for inclusion on Wikipedia.
["CatTrack"] = 3200,
]]
["Cat_class"] = 6600,
local function specPrinter(args, coordinateSpec)
["Cat_in_use"] = 50000,
local uriComponents = coordinateSpec["param"]
["Cat_main"] = 167000,
if uriComponents == "" then
["Cat_more"] = 107000,
-- RETURN error, should never be empty or nil
["Cat_more_if_exists"] = 43000,
return "ERROR param was empty"
["Cat_see_also"] = 3200,
end
["Catalog_lookup_link"] = 481000,
if args["name"] then
["Category"] = 176000,
uriComponents = uriComponents .. "&title=" .. mw.uri.encode(coordinateSpec["name"])
["Category-Class"] = 13000,
end
["Category-inline"] = 7400,
 
["Category_TOC"] = 70000,
local geodmshtml = '<span class="geo-dms" title="Maps, aerial photos, and other data for this location">'
["Category_TOC/tracking"] = 70000,
.. '<span class="latitude">' .. coordinateSpec["dms-lat"] .. '</span> '
["Category_U.S._State_elections_by_year"] = 7200,
.. '<span class="longitude">' ..coordinateSpec["dms-long"] .. '</span>'
["Category_U.S._State_elections_by_year/core"] = 7100,
.. '</span>'
["Category_class"] = 36000,
 
["Category_class/column"] = 36000,
local lat = tonumber( coordinateSpec["dec-lat"] ) or 0
["Category_class/second_row_column"] = 36000,
local geodeclat
["Category_described_in_year"] = 5400,
if lat < 0 then
["Category_diffuse"] = 7300,
-- FIXME this breaks the pre-existing precision
["Category_disambiguation"] = 2200,
geodeclat = tostring(coordinateSpec["dec-lat"]):sub(2) .. "°S"
["Category_disambiguation/category_link"] = 2200,
else
["Category_explanation"] = 72000,
geodeclat = (coordinateSpec["dec-lat"] or 0) .. "°N"
["Category_handler"] = 3100000,
end
["Category_ifexist"] = 4700,
 
["Category_importance"] = 11000,
local long = tonumber( coordinateSpec["dec-long"] ) or 0
["Category_importance/column"] = 11000,
local geodeclong
["Category_importance/second_row_column"] = 11000,
if long < 0 then
["Category_link"] = 281000,
-- FIXME does not handle unicode minus
["Category_link_with_count"] = 5400,
geodeclong = tostring(coordinateSpec["dec-long"]):sub(2) .. "°W"
["Category_ordered_by_date"] = 9300,
else
["Category_other"] = 823000,
geodeclong = (coordinateSpec["dec-long"] or 0) .. "°E"
["Category_pair"] = 4600,
end
["Category_pair/core"] = 4600,
 
["Category_redirect"] = 102000,
local geodechtml = '<span class="geo-dec" title="Maps, aerial photos, and other data for this location">'
["Category_see_also"] = 39000,
.. geodeclat .. ' '
["Category_see_also/Category_pair_check"] = 39000,
.. geodeclong
["Category_see_also_if_exists"] = 47000,
.. '</span>'
["Category_see_also_if_exists_2"] = 81000,
 
["Category_title"] = 2400,
local geonumhtml = '<span class="geo">'
["Catexp"] = 7100,
.. coordinateSpec["dec-lat"] .. '; '
["CathEncy"] = 2300,
.. coordinateSpec["dec-long"]
["Catholic"] = 4200,
.. '</span>'
["Catholic_Encyclopedia"] = 4900,
 
["Catmain"] = 23000,
local inner = '<span class="' .. displayDefault(coordinateSpec["default"], "dms" ) .. '">' .. geodmshtml .. '</span>'
["Catmore"] = 9300,
.. '<span class="geo-multi-punct">&#xfeff; / &#xfeff;</span>'
["Caution"] = 2100,
.. '<span class="' .. displayDefault(coordinateSpec["default"], "dec" ) .. '">';
["Cbb_link"] = 6900,
 
["Cbignore"] = 34000,
if not args["name"] then
["Cc-by-2.5"] = 4700,
inner = inner .. geodechtml
["Cc-by-3.0"] = 11000,
.. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span></span>'
["Cc-by-sa-2.5"] = 3300,
else
["Cc-by-sa-2.5,2.0,1.0"] = 3400,
inner = inner .. '<span class="vcard">' .. geodechtml
["Cc-by-sa-3.0"] = 32000,
.. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span>'
["Cc-by-sa-3.0,2.5,2.0,1.0"] = 3000,
.. '<span style="display:none">&#xfeff; (<span class="fn org">'
["Cc-by-sa-3.0-migrated"] = 31000,
.. args["name"] .. '</span>)</span></span></span>'
["Cc-by-sa-4.0"] = 13000,
end
["Cc-zero"] = 5600,
 
["CensusAU"] = 10000,
return '<span class="plainlinks nourlexpansion">' ..
["Census_2016_AUS"] = 8600,
'[' .. coord_link .. uriComponents .. ' ' .. inner .. ']' .. '</span>'
["Cent"] = 5100,
end
["Center"] = 220000,
 
["Centralized_discussion"] = 5300,
--[[ Helper function, convert decimal to degrees ]]
["Centralized_discussion/core"] = 5300,
local function convert_dec2dms_d(coordinate)
["Centralized_discussion/styles.css"] = 5300,
local d = math_mod._round( coordinate, 0 ) .. "°"
["Centre"] = 2400,
return d .. ""
["Century"] = 2000,
end
["Century_name_from_decade_or_year"] = 70000,
 
["Century_name_from_title_decade"] = 6700,
--[[ Helper function, convert decimal to degrees and minutes ]]
["Century_name_from_title_year"] = 6200,
local function convert_dec2dms_dm(coordinate)
["Certification_Cite/Title"] = 22000,
coordinate = math_mod._round( coordinate * 60, 0 );
["Certification_Cite/URL"] = 25000,
local m = coordinate % 60;
["Certification_Cite/archivedate"] = 4400,
coordinate = math.floor( (coordinate - m) / 60 );
["Certification_Cite/archiveurl"] = 4400,
local d = coordinate % 360 .."°"
["Certification_Cite_Ref"] = 22000,
 
["Certification_Table_Bottom"] = 22000,
return d .. string.format( "%02d′", m )
["Certification_Table_Entry"] = 23000,
end
["Certification_Table_Entry/Foot"] = 21000,
 
["Certification_Table_Entry/Foot/helper"] = 21000,
--[[ Helper function, convert decimal to degrees, minutes, and seconds ]]
["Certification_Table_Entry/Region"] = 22000,
local function convert_dec2dms_dms(coordinate)
["Certification_Table_Entry/Sales"] = 21000,
coordinate = math_mod._round( coordinate * 60 * 60, 0 );
["Certification_Table_Entry/Sales/DanishPeriod"] = 2300,
local s = coordinate % 60
["Certification_Table_Entry/Sales/DanishPeriodHelper1"] = 2300,
coordinate = math.floor( (coordinate - s) / 60 );
["Certification_Table_Entry/Sales/DanishPeriodHelper2"] = 2300,
local m = coordinate % 60
["Certification_Table_Entry/Sales/GermanPeriod"] = 3000,
coordinate = math.floor( (coordinate - m) / 60 );
["Certification_Table_Entry/Sales/ItalianHelper"] = 2600,
local d = coordinate % 360 .."°"
["Certification_Table_Top"] = 23000,
 
["Cfb_link"] = 22000,
return d .. string.format( "%02d′", m ) .. string.format( "%02d″", s )
["Cfd_result"] = 2400,
end
["Cfdend"] = 3600,
 
["Chart"] = 4500,
--[[
["Chart/end"] = 4500,
Helper function, convert decimal latitude or longitude to
["Chart/start"] = 4500,
degrees, minutes, and seconds format based on the specified precision.
["Check_completeness_of_transclusions"] = 5600,
]]
["Check_talk"] = 23000,
local function convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision)
["Check_talk_wp"] = 1350000,
local coord = tonumber(coordinate)
["Check_winner_by_scores"] = 11000,
local postfix
["CheckedSockpuppet"] = 7100,
if coord >= 0 then
["Checked_sockpuppet"] = 17000,
postfix = firstPostfix
["Checkedsockpuppet"] = 5300,
else
["Checkip"] = 12000,
postfix = secondPostfix
["Checkuser"] = 66000,
end
["Checkuserblock-account"] = 7700,
 
["Chem"] = 4300,
precision = precision:lower();
["Chem/atom"] = 4200,
if precision == "dms" then
["Chem/link"] = 4400,
return convert_dec2dms_dms( math.abs( coord ) ) .. postfix;
["Chem2"] = 2400,
elseif precision == "dm" then
["Chem_molar_mass"] = 16000,
return convert_dec2dms_dm( math.abs( coord ) ) .. postfix;
["Chem_molar_mass/format"] = 16000,
elseif precision == "d" then
["Chembox"] = 13000,
return convert_dec2dms_d( math.abs( coord ) ) .. postfix;
["Chembox/styles.css"] = 13000,
end
["Chembox_3DMet"] = 13000,
end
["Chembox_3DMet/format"] = 13000,
 
["Chembox_AllOtherNames"] = 12000,
--[[
["Chembox_AllOtherNames/format"] = 12000,
Convert DMS format into a N or E decimal coordinate
["Chembox_Appearance"] = 5400,
]]
["Chembox_BoilingPt"] = 3600,
local function convert_dms2dec(direction, degrees_str, minutes_str, seconds_str)
["Chembox_CASNo"] = 13000,
local degrees = tonumber(degrees_str)
["Chembox_CASNo/format"] = 13000,
local minutes = tonumber(minutes_str) or 0
["Chembox_CalcTemperatures"] = 6300,
local seconds = tonumber(seconds_str) or 0
["Chembox_ChEBI"] = 13000,
 
["Chembox_ChEBI/format"] = 13000,
local factor = 1
["Chembox_ChEMBL"] = 13000,
if direction == "S" or direction == "W" then
["Chembox_ChEMBL/format"] = 13000,
factor = -1
["Chembox_ChemSpiderID"] = 13000,
end
["Chembox_ChemSpiderID/format"] = 13000,
 
["Chembox_CompTox"] = 13000,
local precision = 0
["Chembox_CompTox/format"] = 13000,
if seconds_str then
["Chembox_Density"] = 4500,
precision = 5 + math.max( math_mod._precision(seconds_str), 0 );
["Chembox_DrugBank"] = 13000,
elseif minutes_str and minutes_str ~= '' then
["Chembox_DrugBank/format"] = 13000,
precision = 3 + math.max( math_mod._precision(minutes_str), 0 );
["Chembox_ECHA"] = 7100,
else
["Chembox_ECNumber"] = 13000,
precision = math.max( math_mod._precision(degrees_str), 0 );
["Chembox_ECNumber/format"] = 13000,
end
["Chembox_Elements"] = 13000,
 
["Chembox_Elements/molecular_formula"] = 16000,
local decimal = factor * (degrees+(minutes+seconds/60)/60)
["Chembox_Footer"] = 13000,
return string.format( "%." .. precision .. "f", decimal ) -- not tonumber since this whole thing is string based.
["Chembox_Footer/tracking"] = 13000,
end
["Chembox_GHSPictograms"] = 2400,
 
["Chembox_GHSSignalWord"] = 2300,
--[[
["Chembox_HPhrases"] = 2300,
Checks input values to for out of range errors.
["Chembox_Hazards"] = 11000,
]]
["Chembox_IUPHAR_ligand"] = 13000,
local function validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, source, strong )
["Chembox_IUPHAR_ligand/format"] = 13000,
local errors = {};
["Chembox_Identifiers"] = 13000,
lat_d = tonumber( lat_d ) or 0;
["Chembox_InChI"] = 12000,
lat_m = tonumber( lat_m ) or 0;
["Chembox_InChI/format"] = 12000,
lat_s = tonumber( lat_s ) or 0;
["Chembox_Indexlist"] = 13000,
long_d = tonumber( long_d ) or 0;
["Chembox_Jmol"] = 13000,
long_m = tonumber( long_m ) or 0;
["Chembox_Jmol/format"] = 13000,
long_s = tonumber( long_s ) or 0;
["Chembox_KEGG"] = 13000,
 
["Chembox_KEGG/format"] = 13000,
if strong then
["Chembox_MeltingPt"] = 5400,
if lat_d < 0 then
["Chembox_PPhrases"] = 2200,
table.insert(errors, {source, "latitude degrees < 0 with hemisphere flag"})
["Chembox_Properties"] = 13000,
end
["Chembox_PubChem"] = 13000,
if long_d < 0 then
["Chembox_PubChem/format"] = 13000,
table.insert(errors, {source, "longitude degrees < 0 with hemisphere flag"})
["Chembox_RTECS"] = 13000,
end
["Chembox_RTECS/format"] = 13000,
--[[
["Chembox_Related"] = 2800,
#coordinates is inconsistent about whether this is an error. If globe: is
["Chembox_SMILES"] = 12000,
specified, it won't error on this condition, but otherwise it will.
["Chembox_SMILES/format"] = 12000,
 
["Chembox_SolubilityInWater"] = 3600,
For not simply disable this check.
["Chembox_UNII"] = 13000,
 
["Chembox_UNII/format"] = 13000,
if long_d > 180 then
["Chembox_headerbar"] = 13000,
table.insert(errors, {source, "longitude degrees > 180 with hemisphere flag"})
["Chembox_image"] = 12000,
end
["Chembox_image_cell"] = 11000,
]]
["Chembox_image_sbs"] = 12000,
end
["Chembox_parametercheck"] = 12000,
 
["Chembox_templatePar/formatPreviewMessage"] = 13000,
if lat_d > 90 then
["Chembox_verification"] = 7200,
table.insert(errors, {source, "latitude degrees > 90"})
["Chemicals"] = 7400,
end
["Chemistry"] = 2900,
if lat_d < -90 then
["Chemspidercite"] = 11000,
table.insert(errors, {source, "latitude degrees < -90"})
["Chessgames_player"] = 3200,
end
["Chinese"] = 7600,
if lat_m >= 60 then
["Chr"] = 8800,
table.insert(errors, {source, "latitude minutes >= 60"})
["ChristianityWikiProject"] = 6100,
end
["Circa"] = 43000,
if lat_m < 0 then
["Circular_reference"] = 5000,
table.insert(errors, {source, "latitude minutes < 0"})
["Citation"] = 334000,
end
["Citation/make_link"] = 5000,
if lat_s >= 60 then
["Citation/styles.css"] = 44000,
table.insert(errors, {source, "latitude seconds >= 60"})
["Citation_needed"] = 477000,
end
["Citation_needed_span"] = 3000,
if lat_s < 0 then
["Citation_style"] = 4300,
table.insert(errors, {source, "latitude seconds < 0"})
["Cite_AV_media"] = 32000,
end
["Cite_AV_media_notes"] = 22000,
if long_d >= 360 then
["Cite_Appletons'"] = 2300,
table.insert(errors, {source, "longitude degrees >= 360"})
["Cite_Australian_Dictionary_of_Biography"] = 2800,
end
["Cite_Catholic_Encyclopedia"] = 7900,
if long_d <= -360 then
["Cite_Colledge2006"] = 3100,
table.insert(errors, {source, "longitude degrees <= -360"})
["Cite_DCB"] = 2700,
end
["Cite_DNB"] = 17000,
if long_m >= 60 then
["Cite_EB1911"] = 22000,
table.insert(errors, {source, "longitude minutes >= 60"})
["Cite_GNIS"] = 2500,
end
["Cite_Gaia_DR2"] = 2300,
if long_m < 0 then
["Cite_Jewish_Encyclopedia"] = 2700,
table.insert(errors, {source, "longitude minutes < 0"})
["Cite_NIE"] = 3600,
end
["Cite_NSW_Parliament"] = 3300,
if long_s >= 60 then
["Cite_NSW_SHR"] = 2600,
table.insert(errors, {source, "longitude seconds >= 60"})
["Cite_ODNB"] = 13000,
end
["Cite_Q"] = 51000,
if long_s < 0 then
["Cite_QHR"] = 2900,
table.insert(errors, {source, "longitude seconds < 0"})
["Cite_QPN"] = 3900,
end
["Cite_Rowlett"] = 2500,
 
["Cite_Russian_law"] = 7100,
return errors;
["Cite_Sports-Reference"] = 53000,
end
["Cite_WoRMS"] = 4200,
 
["Cite_arXiv"] = 4100,
--[[
["Cite_arxiv"] = 2200,
parseDec
["Cite_av_media"] = 2800,
 
["Cite_bcgnis"] = 2800,
Transforms decimal format latitude and longitude into the
["Cite_book"] = 1380000,
structure to be used in displaying coordinates
["Cite_certification"] = 25000,
]]
["Cite_cgndb"] = 2600,
local function parseDec( lat, long, format )
["Cite_conference"] = 13000,
local coordinateSpec = {}
["Cite_court"] = 4700,
local errors = {}
["Cite_dictionary"] = 3400,
 
["Cite_document"] = 9300,
if not long then
["Cite_encyclopedia"] = 139000,
return nil, {{"parseDec", "Missing longitude"}}
["Cite_episode"] = 15000,
elseif not tonumber(long) then
["Cite_gnis"] = 34000,
return nil, {{"parseDec", "Longitude could not be parsed as a number: " .. long}}
["Cite_interview"] = 6100,
end
["Cite_iucn"] = 33000,
 
["Cite_journal"] = 808000,
errors = validate( lat, nil, nil, long, nil, nil, 'parseDec', false );
["Cite_magazine"] = 144000,
coordinateSpec["dec-lat"] = lat;
["Cite_map"] = 31000,
coordinateSpec["dec-long"] = long;
["Cite_news"] = 1270000,
 
["Cite_newspaper"] = 3100,
local mode = coordinates.determineMode( lat, long );
["Cite_newspaper_The_Times"] = 5900,
coordinateSpec["dms-lat"] = convert_dec2dms( lat, "N", "S", mode) -- {{coord/dec2dms|{{{1}}}|N|S|{{coord/prec dec|{{{1}}}|{{{2}}}}}}}
["Cite_paper"] = 2800,
coordinateSpec["dms-long"] = convert_dec2dms( long, "E", "W", mode) -- {{coord/dec2dms|{{{2}}}|E|W|{{coord/prec dec|{{{1}}}|{{{2}}}}}}}
["Cite_patent"] = 4500,
 
["Cite_patent/authors"] = 2900,
if format then
["Cite_patent/core"] = 4800,
coordinateSpec.default = format
["Cite_peakbagger"] = 3900,
else
["Cite_podcast"] = 2600,
coordinateSpec.default = "dec"
["Cite_press_release"] = 51000,
end
["Cite_report"] = 26000,
 
["Cite_rowlett"] = 2500,
return coordinateSpec, errors
["Cite_simbad"] = 3900,
end
["Cite_sports-reference"] = 58000,
 
["Cite_thesis"] = 20000,
--[[
["Cite_tweet"] = 23000,
parseDMS
["Cite_video"] = 11000,
 
["Cite_video_game"] = 2800,
Transforms degrees, minutes, seconds format latitude and longitude
["Cite_web"] = 4040000,
into the a structure to be used in displaying coordinates
["Cite_wikisource"] = 4600,
]]
["Cite_wikisource/make_link"] = 52000,
local function parseDMS( lat_d, lat_m, lat_s, lat_f, long_d, long_m, long_s, long_f, format )
["Civil_navigation"] = 2800,
local coordinateSpec, errors, backward = {}, {}
["Cl"] = 105000,
 
["Clade"] = 5800,
lat_f = lat_f:upper();
["Clade/styles.css"] = 5800,
long_f = long_f:upper();
["Clarify"] = 37000,
 
["Class"] = 9260000,
-- Check if specified backward
["Class/colour"] = 9320000,
if lat_f == 'E' or lat_f == 'W' then
["Class/icon"] = 9270000,
lat_d, long_d, lat_m, long_m, lat_s, long_s, lat_f, long_f, backward = long_d, lat_d, long_m, lat_m, long_s, lat_s, long_f, lat_f, true;
["Class_mask"] = 9490000,
end
["Class_mask/b"] = 309000,
 
["Classical"] = 7100,
errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS', true );
["Classicon"] = 4500,
if not long_d then
["Clc"] = 4500,
return nil, {{"parseDMS", "Missing longitude" }}
["Cleanup"] = 12000,
elseif not tonumber(long_d) then
["Cleanup_bare_URLs"] = 8500,
return nil, {{"parseDMS", "Longitude could not be parsed as a number:" .. long_d }}
["Cleanup_reorganize"] = 2600,
end
["Cleanup_rewrite"] = 5300,
 
["Clear"] = 3360000,
if not lat_m and not lat_s and not long_m and not long_s and #errors == 0 then
["Clear-left"] = 20000,
if math_mod._precision( lat_d ) > 0 or math_mod._precision( long_d ) > 0 then
["Clear_left"] = 32000,
if lat_f:upper() == 'S' then
["Clear_right"] = 2700,
lat_d = '-' .. lat_d;
["Clerk-Note"] = 8800,
end
["Clerknote"] = 6500,
if long_f:upper() == 'W' then
["Clickable_button"] = 12000,
long_d = '-' .. long_d;
["Clickable_button_2"] = 800000,
end
["Clr"] = 3600,
 
["Cmbox"] = 343000,
return parseDec( lat_d, long_d, format );
["Cn"] = 76000,
end
["Coat_of_arms"] = 7500,
end
["Cob"] = 9800,
 
["Code"] = 42000,
coordinateSpec["dms-lat"] = lat_d.."°"..optionalArg(lat_m,"′") .. optionalArg(lat_s,"″") .. lat_f
["Col-1-of-2"] = 3000,
coordinateSpec["dms-long"] = long_d.."°"..optionalArg(long_m,"′") .. optionalArg(long_s,"″") .. long_f
["Col-2"] = 160000,
coordinateSpec["dec-lat"] = convert_dms2dec(lat_f, lat_d, lat_m, lat_s) -- {{coord/dms2dec|{{{4}}}|{{{1}}}|0{{{2}}}|0{{{3}}}}}
["Col-2-of-2"] = 2800,
coordinateSpec["dec-long"] = convert_dms2dec(long_f, long_d, long_m, long_s) -- {{coord/dms2dec|{{{8}}}|{{{5}}}|0{{{6}}}|0{{{7}}}}}
["Col-3"] = 12000,
 
["Col-4"] = 4100,
if format then
["Col-begin"] = 207000,
coordinateSpec.default = format
["Col-break"] = 205000,
else
["Col-end"] = 204000,
coordinateSpec.default = "dms"
["Col-float"] = 2200,
end
["Col-float-break"] = 2100,
 
["Col-float-end"] = 2200,
return coordinateSpec, errors, backward
["Col-float/styles.css"] = 2200,
end
["Col-start"] = 21000,
 
["Colbegin"] = 52000,
--[[
["Colend"] = 63000,
Check the input arguments for coord to determine the kind of data being provided
["Collapse"] = 11000,
and then make the necessary processing.
["Collapse_bottom"] = 45000,
]]
["Collapse_top"] = 45000,
local function formatTest(args)
["Collapsebottom"] = 3800,
local result, errors
["Collapsetop"] = 3700,
local backward, primary = false, false
["Collapsible_list"] = 47000,
 
["Collapsible_option"] = 126000,
local function getParam(args, lim)
["Colledge"] = 2700,
local ret = {}
["College"] = 7200,
for i = 1, lim do
["CollegePrimaryHeader"] = 4400,
ret[i] = args[i] or ''
["CollegePrimaryStyle"] = 85000,
end
["CollegeSecondaryStyle"] = 2100,
return table.concat(ret, '_')
["College_Athlete_Recruit_End"] = 2400,
end
["College_Athlete_Recruit_Entry"] = 2600,
 
["College_Athlete_Recruit_Start"] = 2500,
if not args[1] then
["College_athlete_recruit_end"] = 3500,
-- no lat logic
["College_athlete_recruit_entry"] = 3600,
return errorPrinter( {{"formatTest", "Missing latitude"}} )
["College_athlete_recruit_start"] = 3600,
elseif not tonumber(args[1]) then
["College_color_list"] = 3600,
-- bad lat logic
["Colon"] = 17000,
return errorPrinter( {{"formatTest", "Unable to parse latitude as a number:" .. args[1]}} )
["Color"] = 449000,
elseif not args[4] and not args[5] and not args[6] then
["Color_box"] = 62000,
-- dec logic
["Colorbox"] = 2900,
result, errors = parseDec(args[1], args[2], args.format)
["Colorbull"] = 5100,
if not result then
["Colored_link"] = 30000,
return errorPrinter(errors);
["Colors"] = 2700,
end
["Colour"] = 10000,
-- formatting for geohack: geohack expects D_N_D_E notation or D;D notation
["Coloured_link"] = 4800,
-- wikiminiatlas doesn't support D;D notation
["Columns-list"] = 86000,
-- #coordinates parserfunction doesn't support negative decimals with NSWE
["Comedy"] = 2700,
result.param = table.concat({
["Comic_Book_DB"] = 3700,
math.abs(tonumber(args[1])),
["Comicbookdb"] = 3600,
((tonumber(args[1]) or 0) < 0) and 'S' or 'N',
["Comics-replaceability"] = 2900,
math.abs(tonumber(args[2])),
["Comics_infobox_sec"] = 12000,
((tonumber(args[2]) or 0) < 0) and 'W' or 'E',
["Comics_infobox_sec/creator_nat"] = 3000,
args[3] or ''}, '_')
["Comics_infobox_sec/formcat"] = 3100,
elseif dmsTest(args[4], args[8]) then
["Comics_infobox_sec/genre"] = 3800,
-- dms logic
["Comics_infobox_sec/genrecat"] = 3500,
result, errors, backward = parseDMS(args[1], args[2], args[3], args[4],
["Comicsproj"] = 29000,
args[5], args[6], args[7], args[8], args.format)
["Comicsyrimage"] = 2100,
if args[10] then
["Comma_separated_entries"] = 323000,
table.insert(errors, {'formatTest', 'Extra unexpected parameters'})
["Comment"] = 4300,
end
["Committed_identity"] = 2700,
if not result then
["Committed_identity/styles.css"] = 2700,
return errorPrinter(errors)
["Commons"] = 63000,
end
["Commons-inline"] = 14000,
result.param = getParam(args, 9)
["Commons_and_category"] = 2000,
elseif dmsTest(args[3], args[6]) then
["Commons_cat"] = 48000,
-- dm logic
["Commons_category"] = 806000,
result, errors, backward = parseDMS(args[1], args[2], nil, args[3],
["Commons_category-inline"] = 123000,
args[4], args[5], nil, args[6], args['format'])
["Commons_category_inline"] = 6600,
if args[8] then
["Commonscat"] = 69000,
table.insert(errors, {'formatTest', 'Extra unexpected parameters'})
["Commonscat-inline"] = 21000,
end
["Commonscat_inline"] = 2800,
if not result then
["Commonscatinline"] = 7600,
return errorPrinter(errors)
["Compact_TOC"] = 6700,
end
["Compact_ToC"] = 5000,
result.param = getParam(args, 7)
["Compare"] = 8200,
elseif dmsTest(args[2], args[4]) then
["Compare_image_with_Wikidata"] = 8200,
-- d logic
["Composition_bar"] = 8600,
result, errors, backward = parseDMS(args[1], nil, nil, args[2],
["Confirmed"] = 14000,
args[3], nil, nil, args[4], args.format)
["Confused"] = 2600,
if args[6] then
["Confusing"] = 2400,
table.insert(errors, {'formatTest', 'Extra unexpected parameters'})
["CongBio"] = 9800,
end
["CongLinks"] = 4300,
if not result then
["Connected_contributor"] = 16000,
return errorPrinter(errors)
["Connected_contributor_(paid)"] = 5900,
end
["Conservative_Party_(UK)/meta/color"] = 11000,
result.param = getParam(args, 5)
["Conservative_Party_(UK)/meta/shortname"] = 9400,
else
["Conservative_and_Unionist_Party_(UK)/meta/color"] = 11000,
-- Error
["Constellation_navbox"] = 5400,
return errorPrinter({{"formatTest", "Unknown argument format"}})
["Container"] = 9000,
end
["Container_cat"] = 6600,
result.name = args.name
["Container_category"] = 35000,
 
["Containercat"] = 2700,
local extra_param = {'dim', 'globe', 'scale', 'region', 'source', 'type'}
["Contains_special_characters"] = 3600,
for _, v in ipairs(extra_param) do
["Contains_special_characters/core"] = 3600,
if args[v] then
["Content_category"] = 7100,
table.insert(errors, {'formatTest', 'Parameter: "' .. v .. '=" should be "' .. v .. ':"' })
["Context"] = 3800,
end
["Continent2continental"] = 15000,
end
["Continent_adjective_to_noun"] = 2200,
 
["Controversial"] = 3000,
local ret = specPrinter(args, result)
["Convert"] = 1090000,
if #errors > 0 then
["Convinfobox"] = 190000,
ret = ret .. ' ' .. errorPrinter(errors) .. '[[Category:Pages with malformed coordinate tags]]'
["Convinfobox/2"] = 13000,
end
["Convinfobox/3"] = 115000,
return ret, backward
["Convinfobox/pri2"] = 56000,
end
["Convinfobox/prisec2"] = 2700,
 
["Convinfobox/prisec3"] = 23000,
--[[
["Convinfobox/sec2"] = 7500,
Generate Wikidata tracking categories.
["Coord"] = 1270000,
]]
["Coord_missing"] = 111000,
local function makeWikidataCategories(qid)
["Coord_missing/CheckCat"] = 110000,
local ret
["Coords"] = 7300,
if mw.wikibase and current_page.namespace == 0 then
["Copied"] = 16000,
local entity = qid and mw.wikibase.getEntityObject(qid) or mw.wikibase.getEntityObject()
["Copy_to_Wikimedia_Commons"] = 140000,
if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1] then
["Copyvios"] = 2100,
local snaktype = entity.claims.P625[1].mainsnak.snaktype
["Cospar"] = 3100,
if snaktype == 'value' then
["Cot"] = 9600,
-- coordinates exist both here and on Wikidata, and can be compared.
["Count"] = 8100,
ret = 'Coordinates on Wikidata'
["Country2continent"] = 25000,
elseif snaktype == 'somevalue' then
["Country2continental"] = 2300,
ret = 'Coordinates on Wikidata set to unknown value'
["Country2nationality"] = 73000,
elseif snaktype == 'novalue' then
["CountryPrefixThe"] = 100000,
ret = 'Coordinates on Wikidata set to no value'
["Country_abbreviation"] = 83000,
end
["Country_alias"] = 14000,
else
["Country_at_games_navbox"] = 2300,
-- We have to either import the coordinates to Wikidata or remove them here.
["Country_at_games_navbox/below"] = 2300,
ret = 'Coordinates not on Wikidata'
["Country_data"] = 4800,
end
["Country_data_ALB"] = 6000,
end
["Country_data_ALG"] = 7900,
if ret then
["Country_data_AND"] = 2500,
return string.format('[[Category:%s]]', ret)
["Country_data_ANG"] = 4100,
else
["Country_data_ARG"] = 43000,
return ''
["Country_data_ARM"] = 6000,
end
["Country_data_AUS"] = 68000,
end
["Country_data_AUT"] = 40000,
 
["Country_data_AZE"] = 7200,
--[[
["Country_data_Afghanistan"] = 10000,
link
["Country_data_Alaska"] = 2200,
 
["Country_data_Albania"] = 16000,
Simple function to export the coordinates link for other uses.
["Country_data_Alberta"] = 3800,
 
["Country_data_Algeria"] = 20000,
Usage:
["Country_data_American_Samoa"] = 3000,
{{#invoke:Coordinates | link }}
["Country_data_Andorra"] = 7100,
 
["Country_data_Angola"] = 10000,
]]
["Country_data_Anguilla"] = 2600,
function coordinates.link(frame)
["Country_data_Antigua_and_Barbuda"] = 5600,
return coord_link;
["Country_data_Apulia"] = 7900,
end
["Country_data_Argentina"] = 69000,
 
["Country_data_Arizona"] = 2300,
--[[
["Country_data_Armenia"] = 18000,
dec2dms
["Country_data_Aruba"] = 3700,
 
["Country_data_Australia"] = 108000,
Wrapper to allow templates to call dec2dms directly.
["Country_data_Austria"] = 64000,
 
["Country_data_Azerbaijan"] = 23000,
Usage:
["Country_data_BAH"] = 3900,
{{#invoke:Coordinates | dec2dms | decimal_coordinate | positive_suffix |
["Country_data_BAN"] = 3400,
negative_suffix | precision }}
["Country_data_BAR"] = 2300,
 
["Country_data_BEL"] = 45000,
decimal_coordinate is converted to DMS format. If positive, the positive_suffix
["Country_data_BER"] = 2100,
is appended (typical N or E), if negative, the negative suffix is appended. The
["Country_data_BHR"] = 3700,
specified precision is one of 'D', 'DM', or 'DMS' to specify the level of detail
["Country_data_BIH"] = 11000,
to use.
["Country_data_BLR"] = 22000,
]]
["Country_data_BOL"] = 5700,
coordinates.dec2dms = makeInvokeFunc('_dec2dms')
["Country_data_BOT"] = 2100,
function coordinates._dec2dms(args)
["Country_data_BRA"] = 52000,
local coordinate = args[1]
["Country_data_BUL"] = 22000,
local firstPostfix = args[2] or ''
["Country_data_Bahamas"] = 9300,
local secondPostfix = args[3] or ''
["Country_data_Bahrain"] = 9600,
local precision = args[4] or ''
["Country_data_Bangladesh"] = 16000,
 
["Country_data_Barbados"] = 7300,
return convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision)
["Country_data_Belarus"] = 36000,
end
["Country_data_Belgium"] = 73000,
 
["Country_data_Belize"] = 4900,
--[[
["Country_data_Benin"] = 6400,
Helper function to determine whether to use D, DM, or DMS
["Country_data_Bermuda"] = 5500,
format depending on the precision of the decimal input.
["Country_data_Bhutan"] = 4400,
]]
["Country_data_Bolivia"] = 13000,
function coordinates.determineMode( value1, value2 )
["Country_data_Bosnia_and_Herzegovina"] = 24000,
local precision = math.max( math_mod._precision( value1 ), math_mod._precision( value2 ) );
["Country_data_Botswana"] = 8200,
if precision <= 0 then
["Country_data_Brazil"] = 88000,
return 'd'
["Country_data_British_Columbia"] = 3100,
elseif precision <= 2 then
["Country_data_British_Virgin_Islands"] = 3600,
return 'dm';
["Country_data_Brunei"] = 5600,
else
["Country_data_Bulgaria"] = 43000,
return 'dms';
["Country_data_Burkina_Faso"] = 9100,
end
["Country_data_Burma"] = 2700,
end
["Country_data_Burundi"] = 4900,
 
["Country_data_CAN"] = 54000,
--[[
["Country_data_CGO"] = 2100,
dms2dec
["Country_data_CHE"] = 4200,
 
["Country_data_CHI"] = 16000,
Wrapper to allow templates to call dms2dec directly.
["Country_data_CHN"] = 37000,
 
["Country_data_CIV"] = 6900,
Usage:
["Country_data_CMR"] = 7500,
{{#invoke:Coordinates | dms2dec | direction_flag | degrees |
["Country_data_COD"] = 2800,
minutes | seconds }}
["Country_data_COL"] = 22000,
 
["Country_data_CRC"] = 6300,
Converts DMS values specified as degrees, minutes, seconds too decimal format.
["Country_data_CRO"] = 30000,
direction_flag is one of N, S, E, W, and determines whether the output is
["Country_data_CUB"] = 8400,
positive (i.e. N and E) or negative (i.e. S and W).
["Country_data_CYP"] = 7800,
]]
["Country_data_CZE"] = 42000,
coordinates.dms2dec = makeInvokeFunc('_dms2dec')
["Country_data_California"] = 6200,
function coordinates._dms2dec(args)
["Country_data_Cambodia"] = 8100,
local direction = args[1]
["Country_data_Cameroon"] = 15000,
local degrees = args[2]
["Country_data_Canada"] = 106000,
local minutes = args[3]
["Country_data_Cape_Verde"] = 5400,
local seconds = args[4]
["Country_data_Catalonia"] = 2400,
 
["Country_data_Cayman_Islands"] = 4300,
return convert_dms2dec(direction, degrees, minutes, seconds)
["Country_data_Central_African_Republic"] = 4300,
end
["Country_data_Chad"] = 4800,
 
["Country_data_Chile"] = 34000,
--[[
["Country_data_China"] = 70000,
coord
["Country_data_Chinese_Taipei"] = 16000,
 
["Country_data_Colombia"] = 39000,
Main entry point for Lua function to replace {{coord}}
["Country_data_Colorado"] = 5700,
 
["Country_data_Comoros"] = 3800,
Usage:
["Country_data_Confederate_States_of_America"] = 3000,
{{#invoke:Coordinates | coord }}
["Country_data_Connecticut"] = 3100,
{{#invoke:Coordinates | coord | lat | long }}
["Country_data_Cook_Islands"] = 3400,
{{#invoke:Coordinates | coord | lat | lat_flag | long | long_flag }}
["Country_data_Costa_Rica"] = 15000,
...
["Country_data_Croatia"] = 48000,
 
["Country_data_Cuba"] = 18000,
Refer to {{coord}} documentation page for many additional parameters and
["Country_data_Curaçao"] = 3700,
configuration options.
["Country_data_Cyprus"] = 18000,
 
["Country_data_Czech_Republic"] = 67000,
Note: This function provides the visual display elements of {{coord}}. In
["Country_data_Czechoslovakia"] = 16000,
order to load coordinates into the database, the {{#coordinates:}} parser
["Country_data_DEN"] = 30000,
function must also be called, this is done automatically in the Lua
["Country_data_DEU"] = 7800,
version of {{coord}}.
["Country_data_DNK"] = 3200,
]]
["Country_data_DOM"] = 7500,
coordinates.coord = makeInvokeFunc('_coord')
["Country_data_Democratic_Republic_of_the_Congo"] = 9900,
function coordinates._coord(args)
["Country_data_Denmark"] = 60000,
if not tonumber(args[1]) and not args[2] then
["Country_data_Djibouti"] = 4000,
args[3] = args[1]; args[1] = nil
["Country_data_Dominica"] = 3800,
local entity = mw.wikibase.getEntityObject(args.qid)
["Country_data_Dominican_Republic"] = 15000,
if entity
["Country_data_ECU"] = 10000,
and entity.claims
["Country_data_EGY"] = 12000,
and entity.claims.P625
["Country_data_ENG"] = 41000,
and entity.claims.P625[1].mainsnak.snaktype == 'value'
["Country_data_ESA"] = 2300,
then
["Country_data_ESP"] = 64000,
local precision = entity.claims.P625[1].mainsnak.datavalue.value.precision
["Country_data_EST"] = 12000,
args[1] = entity.claims.P625[1].mainsnak.datavalue.value.latitude
["Country_data_ETH"] = 3200,
args[2] = entity.claims.P625[1].mainsnak.datavalue.value.longitude
["Country_data_EU"] = 3400,
if precision then
["Country_data_East_Germany"] = 10000,
precision = -math_mod._round(math.log(precision)/math.log(10),0)
["Country_data_East_Timor"] = 4300,
args[1] = math_mod._round(args[1],precision)
["Country_data_Ecuador"] = 20000,
args[2] = math_mod._round(args[2],precision)
["Country_data_Egypt"] = 27000,
end
["Country_data_El_Salvador"] = 12000,
end
["Country_data_Empire_of_Japan"] = 3500,
end
["Country_data_England"] = 83000,
 
["Country_data_Equatorial_Guinea"] = 4600,
local contents, backward = formatTest(args)
["Country_data_Eritrea"] = 4800,
local Notes = args.notes or ''
["Country_data_Estonia"] = 29000,
local Display = args.display and args.display:lower() or 'inline'
["Country_data_Eswatini"] = 4500,
 
["Country_data_Ethiopia"] = 11000,
local function isInline(s)
["Country_data_Europe"] = 2400,
-- Finds whether coordinates are displayed inline.
["Country_data_European_Union"] = 7000,
return s:find('inline') ~= nil or s == 'i' or s == 'it' or s == 'ti'
["Country_data_FIJ"] = 3400,
end
["Country_data_FIN"] = 31000,
local function isInTitle(s)
["Country_data_FRA"] = 86000,
-- Finds whether coordinates are displayed in the title.
["Country_data_FRG"] = 12000,
return s:find('title') ~= nil or s == 't' or s == 'it' or s == 'ti'
["Country_data_FR_Yugoslavia"] = 3700,
end
["Country_data_Falkland_Islands"] = 2100,
 
["Country_data_Faroe_Islands"] = 5000,
local function coord_wrapper(in_args)
["Country_data_Federated_States_of_Micronesia"] = 2600,
-- Calls the parser function {{#coordinates:}}.
["Country_data_Fiji"] = 9800,
return mw.getCurrentFrame():callParserFunction('#coordinates', in_args) or ''
["Country_data_Finland"] = 55000,
end
["Country_data_Florida"] = 6600,
 
["Country_data_France"] = 182000,
local text = ''
["Country_data_French_Polynesia"] = 3400,
if isInline(Display) then
["Country_data_GAB"] = 2300,
text = text .. displayinline(contents, Notes)
["Country_data_GBR"] = 47000,
end
["Country_data_GDR"] = 5700,
if isInTitle(Display) then
["Country_data_GEO"] = 11000,
text = text
["Country_data_GER"] = 71000,
.. displaytitle(contents, Notes)
["Country_data_GHA"] = 8900,
.. makeWikidataCategories(args.qid)
["Country_data_GRE"] = 22000,
end
["Country_data_GUA"] = 4900,
if not args.nosave then
["Country_data_GUI"] = 2600,
local page_title, count = mw.title.getCurrentTitle(), 1
["Country_data_GUY"] = 2500,
if backward then
["Country_data_Gabon"] = 6800,
local tmp = {}
["Country_data_Gambia"] = 5700,
while not string.find((args[count-1] or ''), '[EW]') do tmp[count] = (args[count] or ''); count = count+1 end
["Country_data_Georgia"] = 10000,
tmp.count = count; count = 2*(count-1)
["Country_data_Georgia_(U.S._state)"] = 2700,
while count >= tmp.count do table.insert(tmp, 1, (args[count] or '')); count = count-1 end
["Country_data_Georgia_(country)"] = 23000,
for i, v in ipairs(tmp) do args[i] = v end
["Country_data_German_Empire"] = 4800,
else
["Country_data_Germany"] = 128000,
while count <= 9 do args[count] = (args[count] or ''); count = count+1 end
["Country_data_Ghana"] = 20000,
end
["Country_data_Gibraltar"] = 4600,
if isInTitle(Display) and not page_title.isTalkPage and page_title.subpageText ~= 'doc' and page_title.subpageText ~= 'testcases' then args[10] = 'primary' end
["Country_data_Great_Britain"] = 57000,
args.notes, args.format, args.display = nil
["Country_data_Greece"] = 49000,
text = text .. coord_wrapper(args)
["Country_data_Greenland"] = 2700,
end
["Country_data_Grenada"] = 4700,
return text
["Country_data_Guadeloupe"] = 2500,
end
["Country_data_Guam"] = 4800,
 
["Country_data_Guatemala"] = 12000,
--[[
["Country_data_Guernsey"] = 2200,
coord2text
["Country_data_Guinea"] = 7300,
 
["Country_data_Guinea-Bissau"] = 4300,
Extracts a single value from a transclusion of {{Coord}}.
["Country_data_Guyana"] = 7200,
IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED.
["Country_data_HAI"] = 3200,
 
["Country_data_HKG"] = 12000,
Usage:
["Country_data_HON"] = 4200,
 
["Country_data_HUN"] = 32000,
{{#invoke:Coordinates | coord2text | {{Coord}} | parameter }}
["Country_data_Haiti"] = 8200,
 
["Country_data_Honduras"] = 10000,
Valid values for the second parameter are: lat (signed integer), long (signed integer), type, scale, dim, region, globe, source
["Country_data_Hong_Kong"] = 22000,
 
["Country_data_Hungary"] = 56000,
]]
["Country_data_IDN"] = 4600,
function coordinates.coord2text(frame)
["Country_data_INA"] = 9500,
if frame.args[1] == '' or frame.args[2] == '' or not frame.args[2] then return nil end
["Country_data_IND"] = 28000,
frame.args[2] = mw.text.trim(frame.args[2])
["Country_data_IRE"] = 9900,
if frame.args[2] == 'lat' or frame.args[2] == 'long' then
["Country_data_IRI"] = 4400,
local result, negative = mw.text.split((mw.ustring.match(frame.args[1],'[%.%d]+°[NS] [%.%d]+°[EW]') or ''), ' ')
["Country_data_IRL"] = 19000,
if frame.args[2] == 'lat' then
["Country_data_IRN"] = 5400,
result, negative = result[1], 'S'
["Country_data_IRQ"] = 3600,
else
["Country_data_ISL"] = 7700,
result, negative = result[2], 'W'
["Country_data_ISR"] = 19000,
end
["Country_data_ITA"] = 76000,
result = mw.text.split(result, '°')
["Country_data_Iceland"] = 19000,
if result[2] == negative then result[1] = '-'..result[1] end
["Country_data_Idaho"] = 2200,
return result[1]
["Country_data_Illinois"] = 5300,
else
["Country_data_India"] = 94000,
return mw.ustring.match(frame.args[1], 'params=.-_'..frame.args[2]..':(.-)[ _]')
["Country_data_Indiana"] = 2800,
end
["Country_data_Indonesia"] = 31000,
end
["Country_data_Iowa"] = 3000,
 
["Country_data_Iran"] = 82000,
--[[
["Country_data_Iraq"] = 12000,
coordinsert
["Country_data_Ireland"] = 30000,
 
["Country_data_Isle_of_Man"] = 3000,
Injects some text into the Geohack link of a transclusion of {{Coord}} (if that text isn't already in the transclusion). Outputs the modified transclusion of {{Coord}}.
["Country_data_Israel"] = 39000,
IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED.
["Country_data_Italy"] = 123000,
 
["Country_data_Ivory_Coast"] = 14000,
Usage:
["Country_data_JAM"] = 8700,
 
["Country_data_JOR"] = 3400,
{{#invoke:Coordinates | coordinsert | {{Coord}} | parameter:value | parameter:value | … }}
["Country_data_JP"] = 7900,
 
["Country_data_JPN"] = 53000,
Do not make Geohack unhappy by inserting something which isn't mentioned in the {{Coord}} documentation.
["Country_data_Jamaica"] = 17000,
 
["Country_data_Japan"] = 101000,
]]
["Country_data_Jersey"] = 2500,
function coordinates.coordinsert(frame)
["Country_data_Jordan"] = 10000,
for i, v in ipairs(frame.args) do
["Country_data_KAZ"] = 17000,
if i ~= 1 then
["Country_data_KEN"] = 6400,
if not mw.ustring.find(frame.args[1], (mw.ustring.match(frame.args[i], '^(.-:)') or '')) then
["Country_data_KGZ"] = 3200,
frame.args[1] = mw.ustring.gsub(frame.args[1], '(params=.-)_? ', '%1_'..frame.args[i]..' ')
["Country_data_KOR"] = 28000,
end
["Country_data_KSA"] = 4900,
end
["Country_data_KUW"] = 3500,
end
["Country_data_Kazakhstan"] = 28000,
if frame.args.name then
["Country_data_Kenya"] = 16000,
if not mw.ustring.find(frame.args[1], '<span class="vcard">') then
["Country_data_Kingdom_of_Great_Britain"] = 4200,
local namestr = frame.args.name
["Country_data_Kingdom_of_Italy"] = 3500,
frame.args[1] = mw.ustring.gsub(frame.args[1],
["Country_data_Kiribati"] = 2600,
'(<span class="geo%-default">)(<span[^<>]*>[^<>]*</span><span[^<>]*>[^<>]*<span[^<>]*>[^<>]*</span></span>)(</span>)',
["Country_data_Kosovo"] = 7400,
'%1<span class="vcard">%2<span style="display:none">&#xfeff; (<span class="fn org">' .. namestr .. '</span>)</span></span>%3')
["Country_data_Kuwait"] = 9300,
frame.args[1] = mw.ustring.gsub(frame.args[1], '(&params=[^&"<>%[%] ]*) ', '%1&title=' .. mw.uri.encode(namestr) .. ' ')
["Country_data_Kyrgyzstan"] = 8200,
end
["Country_data_LAT"] = 13000,
end
["Country_data_LIB"] = 2500,
return frame.args[1]
["Country_data_LIE"] = 2700,
end
["Country_data_LIT"] = 2800,
 
["Country_data_LTU"] = 11000,
return coordinates
["Country_data_LUX"] = 9300,
["Country_data_LVA"] = 2200,
["Country_data_Laos"] = 6700,
["Country_data_Latvia"] = 27000,
["Country_data_Lebanon"] = 13000,
["Country_data_Lesotho"] = 4600,
["Country_data_Liberia"] = 6400,
["Country_data_Libya"] = 7800,
["Country_data_Liechtenstein"] = 7000,
["Country_data_Lithuania"] = 27000,
["Country_data_Luxembourg"] = 20000,
["Country_data_MAC"] = 2300,
["Country_data_MAR"] = 10000,
["Country_data_MAS"] = 9800,
["Country_data_MDA"] = 6400,
["Country_data_MEX"] = 28000,
["Country_data_MGL"] = 2300,
["Country_data_MKD"] = 6400,
["Country_data_MLI"] = 3600,
["Country_data_MLT"] = 5000,
["Country_data_MNE"] = 7000,
["Country_data_MON"] = 3100,
["Country_data_MRI"] = 2100,
["Country_data_MYA"] = 3000,
["Country_data_MYS"] = 3900,
["Country_data_Macau"] = 6600,
["Country_data_Macedonia"] = 4900,
["Country_data_Madagascar"] = 7900,
["Country_data_Malawi"] = 4900,
["Country_data_Malaysia"] = 32000,
["Country_data_Maldives"] = 5500,
["Country_data_Mali"] = 9900,
["Country_data_Malta"] = 14000,
["Country_data_Manitoba"] = 2600,
["Country_data_Marshall_Islands"] = 3300,
["Country_data_Martinique"] = 2600,
["Country_data_Maryland"] = 3000,
["Country_data_Massachusetts"] = 2900,
["Country_data_Mauritania"] = 4900,
["Country_data_Mauritius"] = 7400,
["Country_data_Mexico"] = 54000,
["Country_data_Michigan"] = 4000,
["Country_data_Minnesota"] = 3700,
["Country_data_Missouri"] = 2100,
["Country_data_Moldova"] = 15000,
["Country_data_Monaco"] = 8900,
["Country_data_Mongolia"] = 8300,
["Country_data_Montana"] = 2400,
["Country_data_Montenegro"] = 15000,
["Country_data_Montserrat"] = 2500,
["Country_data_Morocco"] = 23000,
["Country_data_Mozambique"] = 6500,
["Country_data_Myanmar"] = 12000,
["Country_data_NAM"] = 3400,
["Country_data_NED"] = 53000,
["Country_data_NEP"] = 2600,
["Country_data_NGA"] = 7000,
["Country_data_NGR"] = 7600,
["Country_data_NIR"] = 8900,
["Country_data_NLD"] = 5700,
["Country_data_NOR"] = 25000,
["Country_data_NZ"] = 2600,
["Country_data_NZL"] = 29000,
["Country_data_Namibia"] = 9100,
["Country_data_Nauru"] = 2100,
["Country_data_Nazi_Germany"] = 8800,
["Country_data_Nepal"] = 14000,
["Country_data_Netherlands"] = 94000,
["Country_data_Netherlands_Antilles"] = 2200,
["Country_data_New_Brunswick"] = 2600,
["Country_data_New_Caledonia"] = 3200,
["Country_data_New_Jersey"] = 4300,
["Country_data_New_South_Wales"] = 5300,
["Country_data_New_York"] = 3900,
["Country_data_New_York_(state)"] = 5800,
["Country_data_New_Zealand"] = 52000,
["Country_data_Newfoundland_and_Labrador"] = 2100,
["Country_data_Nicaragua"] = 8500,
["Country_data_Niger"] = 5000,
["Country_data_Nigeria"] = 28000,
["Country_data_North_Carolina"] = 3400,
["Country_data_North_Korea"] = 11000,
["Country_data_North_Macedonia"] = 14000,
["Country_data_Northern_Ireland"] = 13000,
["Country_data_Northern_Mariana_Islands"] = 2700,
["Country_data_Norway"] = 59000,
["Country_data_Nova_Scotia"] = 2200,
["Country_data_OMA"] = 2400,
["Country_data_Ohio"] = 4900,
["Country_data_Oman"] = 7900,
["Country_data_Ontario"] = 3500,
["Country_data_Ottoman_Empire"] = 2300,
["Country_data_PAK"] = 7400,
["Country_data_PAN"] = 6300,
["Country_data_PAR"] = 9500,
["Country_data_PER"] = 11000,
["Country_data_PHI"] = 11000,
["Country_data_PHL"] = 3000,
["Country_data_PNG"] = 2400,
["Country_data_POL"] = 43000,
["Country_data_POR"] = 27000,
["Country_data_PRC"] = 2900,
["Country_data_PRK"] = 4000,
["Country_data_PRT"] = 2700,
["Country_data_PUR"] = 7900,
["Country_data_Pakistan"] = 25000,
["Country_data_Palau"] = 2600,
["Country_data_Palestine"] = 5900,
["Country_data_Panama"] = 14000,
["Country_data_Papua_New_Guinea"] = 7200,
["Country_data_Paraguay"] = 18000,
["Country_data_Pennsylvania"] = 3400,
["Country_data_People's_Republic_of_China"] = 3100,
["Country_data_Peru"] = 27000,
["Country_data_Philippines"] = 31000,
["Country_data_Poland"] = 131000,
["Country_data_Portugal"] = 54000,
["Country_data_Prussia"] = 2400,
["Country_data_Puerto_Rico"] = 16000,
["Country_data_QAT"] = 6700,
["Country_data_Qatar"] = 15000,
["Country_data_Quebec"] = 3900,
["Country_data_ROC"] = 2100,
["Country_data_ROM"] = 12000,
["Country_data_ROU"] = 22000,
["Country_data_RSA"] = 29000,
["Country_data_RUS"] = 58000,
["Country_data_Republic_of_China"] = 6200,
["Country_data_Republic_of_Ireland"] = 21000,
["Country_data_Republic_of_the_Congo"] = 6600,
["Country_data_Romania"] = 54000,
["Country_data_Russia"] = 99000,
["Country_data_Russian_Empire"] = 4300,
["Country_data_Rwanda"] = 6600,
["Country_data_SAM"] = 2700,
["Country_data_SCG"] = 3000,
["Country_data_SCO"] = 23000,
["Country_data_SEN"] = 6600,
["Country_data_SER"] = 3300,
["Country_data_SIN"] = 6900,
["Country_data_SLO"] = 17000,
["Country_data_SLV"] = 3000,
["Country_data_SMR"] = 2800,
["Country_data_SPA"] = 4100,
["Country_data_SRB"] = 23000,
["Country_data_SRI"] = 4400,
["Country_data_SUI"] = 37000,
["Country_data_SVK"] = 26000,
["Country_data_SVN"] = 5900,
["Country_data_SWE"] = 50000,
["Country_data_SWI"] = 4500,
["Country_data_SYR"] = 3100,
["Country_data_Saint_Kitts_and_Nevis"] = 4400,
["Country_data_Saint_Lucia"] = 4800,
["Country_data_Saint_Vincent_and_the_Grenadines"] = 4500,
["Country_data_Samoa"] = 6900,
["Country_data_San_Marino"] = 7500,
["Country_data_Saskatchewan"] = 3500,
["Country_data_Saudi_Arabia"] = 16000,
["Country_data_Scotland"] = 44000,
["Country_data_Senegal"] = 14000,
["Country_data_Serbia"] = 46000,
["Country_data_Serbia_and_Montenegro"] = 4800,
["Country_data_Seychelles"] = 4700,
["Country_data_Sierra_Leone"] = 6400,
["Country_data_Singapore"] = 23000,
["Country_data_Slovakia"] = 43000,
["Country_data_Slovenia"] = 35000,
["Country_data_Solomon_Islands"] = 4300,
["Country_data_Somalia"] = 5300,
["Country_data_South_Africa"] = 56000,
["Country_data_South_Carolina"] = 3300,
["Country_data_South_Korea"] = 53000,
["Country_data_South_Sudan"] = 3300,
["Country_data_Soviet_Union"] = 29000,
["Country_data_Spain"] = 112000,
["Country_data_Sri_Lanka"] = 17000,
["Country_data_Sudan"] = 7000,
["Country_data_Suriname"] = 5700,
["Country_data_Sweden"] = 86000,
["Country_data_Switzerland"] = 68000,
["Country_data_Syria"] = 13000,
["Country_data_São_Tomé_and_Príncipe"] = 2900,
["Country_data_TAN"] = 2400,
["Country_data_TCH"] = 9400,
["Country_data_THA"] = 19000,
["Country_data_TJK"] = 2200,
["Country_data_TKM"] = 2400,
["Country_data_TPE"] = 13000,
["Country_data_TRI"] = 4700,
["Country_data_TUN"] = 8800,
["Country_data_TUR"] = 23000,
["Country_data_Taiwan"] = 11000,
["Country_data_Tajikistan"] = 7900,
["Country_data_Tanzania"] = 9400,
["Country_data_Texas"] = 5300,
["Country_data_Thailand"] = 37000,
["Country_data_Togo"] = 5900,
["Country_data_Tonga"] = 5800,
["Country_data_Trinidad_and_Tobago"] = 13000,
["Country_data_Tunisia"] = 17000,
["Country_data_Turkey"] = 66000,
["Country_data_Turkmenistan"] = 7000,
["Country_data_Turks_and_Caicos_Islands"] = 2700,
["Country_data_Tuvalu"] = 2500,
["Country_data_U.S."] = 2100,
["Country_data_U.S._Virgin_Islands"] = 4800,
["Country_data_UAE"] = 8000,
["Country_data_UGA"] = 3400,
["Country_data_UK"] = 20000,
["Country_data_UKGBI"] = 2700,
["Country_data_UKR"] = 32000,
["Country_data_URS"] = 11000,
["Country_data_URU"] = 13000,
["Country_data_US"] = 5300,
["Country_data_USA"] = 124000,
["Country_data_USSR"] = 4300,
["Country_data_UZB"] = 9700,
["Country_data_Uganda"] = 11000,
["Country_data_Ukraine"] = 55000,
["Country_data_United_Arab_Emirates"] = 17000,
["Country_data_United_Kingdom"] = 79000,
["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 3900,
["Country_data_United_Nations"] = 3600,
["Country_data_United_States"] = 261000,
["Country_data_United_States_of_America"] = 4700,
["Country_data_Uruguay"] = 25000,
["Country_data_Uzbekistan"] = 17000,
["Country_data_VEN"] = 16000,
["Country_data_VIE"] = 5700,
["Country_data_Vanuatu"] = 4600,
["Country_data_Vatican_City"] = 2200,
["Country_data_Venezuela"] = 29000,
["Country_data_Vietnam"] = 19000,
["Country_data_Virginia"] = 2800,
["Country_data_WAL"] = 15000,
["Country_data_Wales"] = 29000,
["Country_data_Washington"] = 3300,
["Country_data_Washington,_D.C."] = 2200,
["Country_data_Washington_(state)"] = 3500,
["Country_data_West_Germany"] = 19000,
["Country_data_West_Indies"] = 2200,
["Country_data_Wisconsin"] = 5700,
["Country_data_Wyoming"] = 2100,
["Country_data_YUG"] = 8500,
["Country_data_Yemen"] = 6500,
["Country_data_Yugoslavia"] = 15000,
["Country_data_ZAF"] = 4300,
["Country_data_ZAM"] = 2900,
["Country_data_ZIM"] = 7500,
["Country_data_Zambia"] = 8500,
["Country_data_Zimbabwe"] = 15000,
["Country_flagbio"] = 23000,
["Country_name"] = 9200,
["Country_showdata"] = 5600,
["Country_topics"] = 21000,
["County"] = 7300,
["County_(judet)_of_Romania"] = 3300,
["Course_assignment"] = 4300,
["Course_details"] = 4900,
["Cquote"] = 36000,
["Cr"] = 3800,
["Create_taxonomy/link"] = 88000,
["Cricinfo"] = 21000,
["Cricketarchive"] = 3300,
["Crime_opentask"] = 31000,
["Cross"] = 3100,
["Crossreference"] = 2100,
["Crossreference/styles.css"] = 2100,
["Csv"] = 2700,
["Ct"] = 11000,
["Curlie"] = 7000,
["Currency"] = 2300,
["Current_events_footer"] = 6100,
["Current_events_header"] = 7100,
["Currentdate"] = 21000,
["Cvt"] = 93000,
["Cycling_Archives"] = 5500,
["Cycling_archives"] = 3800,
["Cycling_team_link"] = 11000,
["Module:CFB_schedule"] = 22000,
["Module:CallAssert"] = 209000,
["Module:CanElecResTopTest"] = 5000,
["Module:CanadaByProvinceCatNav"] = 9500,
["Module:Cat_main"] = 167000,
["Module:Cat_more_if_exists"] = 43000,
["Module:Catalog_lookup_link"] = 481000,
["Module:Category_described_in_year"] = 5400,
["Module:Category_described_in_year/conf"] = 5400,
["Module:Category_handler"] = 4200000,
["Module:Category_handler/blacklist"] = 4200000,
["Module:Category_handler/config"] = 4200000,
["Module:Category_handler/data"] = 4200000,
["Module:Category_handler/shared"] = 4200000,
["Module:Category_see_also"] = 39000,
["Module:Celestial_object_quadrangle"] = 2500,
["Module:Check_DYK_hook"] = 107000,
["Module:Check_for_clobbered_parameters"] = 587000,
["Module:Check_for_deprecated_parameters"] = 2800,
["Module:Check_for_unknown_parameters"] = 12400000,
["Module:Check_isxn"] = 472000,
["Module:Check_winner_by_scores"] = 11000,
["Module:Chem2"] = 2400,
["Module:Citation/CS1"] = 4980000,
["Module:Citation/CS1/COinS"] = 4980000,
["Module:Citation/CS1/Configuration"] = 4980000,
["Module:Citation/CS1/Date_validation"] = 4980000,
["Module:Citation/CS1/Identifiers"] = 4980000,
["Module:Citation/CS1/Suggestions"] = 30000,
["Module:Citation/CS1/Utilities"] = 4980000,
["Module:Citation/CS1/Whitelist"] = 4980000,
["Module:Citation/CS1/styles.css"] = 5100000,
["Module:Cite_Q"] = 51000,
["Module:Cite_iucn"] = 33000,
["Module:Cite_tweet"] = 23000,
["Module:Cite_web"] = 25000,
["Module:Clade"] = 5800,
["Module:Clickable_button_2"] = 800000,
["Module:Collapsible_list"] = 48000,
["Module:College_color"] = 115000,
["Module:College_color/data"] = 115000,
["Module:Color_contrast"] = 459000,
["Module:Color_contrast/colors"] = 461000,
["Module:Commons_link"] = 220000,
["Module:Complex_date"] = 62000,
["Module:Convert"] = 1130000,
["Module:Convert/data"] = 1130000,
["Module:Convert/helper"] = 6100,
["Module:Convert/text"] = 1130000,
["Module:Convert/wikidata"] = 2500,
["Module:Convert/wikidata/data"] = 2500,
["Module:ConvertNumeric"] = 25000,
["Module:Convert_character_width"] = 2800,
["Module:Convert_character_width/data"] = 2800,
["Module:Coordinates"] = 1270000,
["Module:Coordinates/styles.css"] = 1260000,
["Module:Copied"] = 16000,
["Module:CountryAdjectiveDemonym"] = 41000,
["Module:CountryAdjectiveDemonym/Adjectives"] = 41000,
["Module:CountryAdjectiveDemonym/Demonyms"] = 41000,
["Module:CountryAdjectiveDemonym/The"] = 41000,
["Module:CountryData"] = 18000,
["Module:CountryData/summary"] = 18000,
["Module:Country_adjective"] = 3800,
["Module:Country_alias"] = 49000,
["Module:Country_alias/data"] = 49000,
["Module:Currency"] = 2300,
["Module:Currency/Presentation"] = 2300,
}