Modul:LocationAndCountry/data

De la Wikipedia, enciclopedia liberă
Sari la navigare Sari la căutare

Documentația acestui modul poate fi creată la Modul:LocationAndCountry/data/doc

local ESCALATABLE_LOCATION_ENTITIES = { -- if this is one of the types of the location from Wikidata, then we skip and escalate it to the administrative unit
	'Q16917', --hospital
	'Q608152', --hospice
	'Q1059324', -- university hospital
	'Q702842', --municipal arrondissement (France)
	'Q15921300', --sector of Bucharest
	'Q2755753', --area of London
	'Q211690', --London borough
	'Q518343', -- municipal borough
	'Q879050', --manor house
	'Q47168', --county of USA
	'Q1785071', -- fort
	'Q40357', -- prison
	'Q41176', --building
	'Q256020', --inn
	'Q287414', -- neighborhood
	'Q462667', -- administrative territorial entity of Moscow
}

local ADMIN_UNIT_ATTRACTOR_ENTITY_TYPES = { -- if this is one of the types of the location from Wikidata, then we also pull in the administrative unit
	'Q532', -- village
	'Q659103', -- commune of Romania
	'Q17343829', -- unincorporated community (SUA)
	'Q408804', -- burough of NYC
	'Q55237813', -- village in NY state, USA
	'Q13414757', -- county of NY
	'Q13212489', -- county of CA
	'Q21672098', -- village of Ukraine
	'Q10354598', -- rural settlement
}

local ADMIN_UNIT_ATTRACTOR_COUNTRIES = { -- if the country is one of these, pull at least one unit; this is necessary b/c not all such countries are flagged in Wikidata as federations, e.g. UK, Canada
	'Q145', --UK
	'Q16', --Canada
}

local ADMIN_UNIT_TYPES_TO_SKIP = { -- if this is one of the types of UATs from Wikidata, then skip
	'Q15042037', -- statistical territorial entity
	'Q2661988', -- urban settlement in Russia
	'Q60849925', -- municipal district in Russia
}

local ADMIN_UNITS_TO_SKIP = {-- if this is one of the UATs from Wikidata, then skip
	'Q212429', -- Franța metropolitană
	'Q533534', -- Cisleithania
}

local INVARIANT_LOCATION_NAMES_COUNTRIES = { -- For locations currently in these countries, we don't search for the name in another language
	'Q218', --ro
	'Q217', --md
	'Q230', --Georgia; transliterare problematică
}
local INVARIANT_LOCATION_UATS = {-- For locations currently in these UATs, we don't search for the name in another language
	'Q168856', --regiunea Cernăuți
	'Q103842911', -- raionul Ismail
	'Q103842889', -- raionul Cetatea Albă
	'Q103842904', -- raionul Bolgrad
	'Q428976', -- raionul Teceu
	'Q428963', -- raionul Rahău
	'Q728041', --Banatul de Nord
	'Q425782', --Banatul Central
	'Q720030', --Banatul de Sud
	'Q174994', --Basarabia
}
local INVARIANT_LOCATION_TYPES = { -- For locations of these types, we don't search for the name in another language
	'Q6256', -- țări în general
	'Q3024240', -- țări istorice
	'Q426759', --mandate ale Ligii Națiunilor
	'Q35657', -- statele SUA
	'Q3336843', -- țările UK
	'Q12959600', -- republicile iugoslaviei
	'Q1221156', --landurile Germaniei
	'Q261543', -- landurile Austriei
	'Q209824', -- regiunile Bulgariei
	'Q10742', --comunitățile autonome ale Spaniei
	'Q134390', --provinciile Țărilor de Jos
	'Q150093', -- voievodatele Poloniei
	'Q84582639',
	'Q681026', -- țările coroanei Habsburgice
	'Q83057', --regiunile Belgiei
	'Q236036', --republicile sovietice
	'Q86622', -- guberniile țariste
	'Q836672', -- provinciile Kazahstanului
	'Q188604', -- județele Ungariei
	'Q23058', -- cantoanele Elveției
	'Q3348196', -- regiunile Ucrainei
	'Q41162', -- republicile Rusiei
	'Q687121', -- volostele Rusiei	
	'Q843752', -- entități federale ale Bosniei și Herțegovinei
	'Q1572329', -- raioanele Rusiei
	'Q1267632', -- raioanele Ucrainei
	'Q104251', -- regiunile Albaniei
	'Q182547', -- provinciile romane
	'Q4377540', -- prefecturile pretoriene romane
	'Q852231', -- comitatele Regatului Ungariei
	'Q44753', -- provinciile Argentinei
	'Q207299', -- unitățile administrative ale Greciei
	'Q835714', -- regiunile Rusiei
	'Q3403564', -- principate eclesiastice
	'Q1710033', -- regiuni autonome ale Italiei
}
local SHORT_NAME_LOCATION_TYPES = { -- For locations of these types, we look for the short name rather than official name
	'Q6256', -- țări în general
	'Q236036', --republicile sovietice
	'Q12959600', -- republicile Iugoslaviei
}
local INVARIANT_LOCATION_NAMES_IDS = { -- For these locations, we don't search for the name in another language
	'Q70', --Berna
	'Q71', -- Geneva
	'Q84', --Londra
	'Q270', --Varșovia
	'Q597', --Lisabona
	'Q641', --Veneția
	'Q649', --Moscova
	'Q908', --Rostov pe Don
	'Q1085', --Praga
	'Q1218', --Ierusalim
	'Q1524', --Atena
	'Q1697', -- regiunea Moscova
	'Q1731', --Dresda
	'Q1741', --Viena
	'Q1748', --Copenhaga
	'Q1781', --Budapesta
	'Q1899', --Kiev
	'Q1953', --Erevan
	'Q2044', --Florența
	'Q3711', --Belgrad
	'Q17151', --Salonic
	'Q19689', -- Tirana
	'Q23482', -- Marsilia
	'Q31487', -- Cracovia
	'Q33959', -- Nisa
	'Q36600', -- Haga
	'Q52193', -- Colomeea
	'Q154835', -- Moghilău
	'Q193965', -- Camenița
	'Q210205', -- Pesta
	'Q1653', -- Dunărea
	'Q174994', --Basarabia
	'Q147739', --Ismail
	
	--localități din Ungaria per http://budapesta.mae.ro/node/797
	'Q911667','Q751520','Q791458','Q187303','Q740810','Q178878','Q528338','Q677698','Q1076482','Q654192','Q902272',
	'Q227413','Q214938','Q54808404','Q948356','Q1075840','Q1076475','Q1021811','Q281575','Q1014872','Q81581','Q1185124',
}

local LANGUAGE_ORDER = { -- specify the preferred order of official languages for settlements in a certain region
	['Q5705'] = {'es', 'ca'}, -- Catalonia
	['Q3908'] = {'es', 'gl'}, -- Galicia
	['Q3995'] = {'es', 'eu'}, -- Țara Bascilor
	['Q5720'] = {'es', 'cat', 'ca'}, -- Valencia
	['Q5765'] = {'es', 'ca'}, -- Baleare
	['Q5689'] = {'se', 'fi'}, -- Åland
	['Q33'] = {'fi', 'se'}, -- Finlanda
	['Q184'] = {'be', 'ru'}, -- Belarus
	['Q1250'] = {'it', 'fur', 'sl', 'de'}, -- Friuli-Venezia Giulia
	['Q1237'] = {'it', 'de', 'lld'}, --Trentino-Alto Adige
	['Q1222'] = {'it', 'fr'}, --Valea Aostei
	['Q9337'] = {'nl', 'fr'}, --Flandra
	['Q231'] = {'fr', 'nl'}, --Valonia
	['Q27'] = {'en', 'ga'}, --Irlanda
	['Q22'] = {'en', 'gd', 'sco'}, --Scoția
	['Q25'] = {'en', 'cy'}, --Țara Galilor
	['Q233'] = {'en', 'mt' }, --Malta
	['Q39'] = {'de', 'fr', 'it' }, --Elveția
	['Q12640'] = {'fr', 'de', 'it'}, --Fribourg
	['Q11925'] = {'de', 'rm', 'it'}, --Graubünden
	['Q12724'] = {'it', 'fr', 'de'}, --Ticino
	['Q12771'] = {'fr', 'de', 'it'}, --Vaud
	['Q834'] = {'fr', 'de', 'it'}, --Valais
	['Q12738'] = {'fr', 'de', 'it'}, --Neuchâtel
	['Q11917'] = {'fr', 'de', 'it'}, --Geneva
	['Q12755'] = {'fr', 'de', 'it'}, --Jura
	['Q232'] = {'kk', 'ru'}, --Kazahstan
	['Q170174'] = {'it', 'la'}, -- Statele Papale
	['Q12548'] = {'de', 'la'}, -- Sfântul Imperiu Roman
}

local LOCATION_NAME_OVERRIDES = { -- For these locations, we use the historical names specified here
	['Q406'] = {
		['1930-03-28'] = 'Istanbul',
		['_'] = 'Constantinopol'
	},
	['Q656'] = {
		['1924-01-25'] = 'Leningrad',
		['1914-08-31'] = 'Petrograd',
		['1991-09-07'] = 'Sankt Petersburg',
		['_'] = 'Sankt Petersburg',
	},
	['Q48256'] = {
		['2016-05-19'] = 'Dnipro',
		['1926-07-20'] = 'Dnipropetrovsk',
		['1802'] = 'Ekaterinoslav',
		['_'] = 'Novorosiisk'
	},
	['Q1751495'] = { ['_'] = 'RS Slovacă' },
}
LOCATION_NAME_OVERRIDES['Q16869'] = LOCATION_NAME_OVERRIDES['Q406']

local COUNTRY_NAMES_OVERRIDES = { -- For these countries, we use the name specified here
	['Q30'] = 'SUA',
	['Q145'] = 'Regatul Unit',
	['Q842794'] = 'România',
	['Q2685298'] = 'România',
	['Q203493'] = 'România',
	['Q713750'] = 'RFG',
	['Q16957'] = 'RDG',
	['Q83286'] = 'RSF Iugoslavia',
	['Q15180'] = 'URSS',
	['Q207272'] = 'Polonia',
	['Q1290149'] = 'RFP Iugoslavia',
	['Q83286'] = 'RSF Iugoslavia',
	['Q172107'] = 'Polonia-Lituania',
	['Q62589'] = 'Suedia-Norvegia',
	['Q62651'] = 'Danemarca-Norvegia',
	['Q853348'] = 'Cehoslovacia',
	['Q140359'] = 'Cehoslovacia',
	['Q2010024'] = 'Cehoslovacia',
	['Q2454585'] = 'Cehoslovacia',
	['Q11178782'] = 'Cehoslovacia',
	['Q853348'] = 'Cehoslovacia',
	['Q11177699'] = 'Cehoslovacia',
	['Q1998866'] = 'Cehia și Slovacia',
}

return { 
	escalatableLocationTypes = ESCALATABLE_LOCATION_ENTITIES, 
	adminUnitExpandableLocationTypes = ADMIN_UNIT_ATTRACTOR_ENTITY_TYPES,
	adminUnitExpandableCountries = ADMIN_UNIT_ATTRACTOR_COUNTRIES,
	skippableUatTypes = ADMIN_UNIT_TYPES_TO_SKIP,
	skippableUats = ADMIN_UNITS_TO_SKIP,
	invariantLocations = INVARIANT_LOCATION_NAMES_IDS,
	invariantLocationCountries = INVARIANT_LOCATION_NAMES_COUNTRIES,
	invariantLocationTypes = INVARIANT_LOCATION_TYPES,
	shortNameLocationTypes = SHORT_NAME_LOCATION_TYPES,
	invariantLocationUats = INVARIANT_LOCATION_UATS,
	locationNameOverrides = LOCATION_NAME_OVERRIDES,
	countryNameOverrides = COUNTRY_NAMES_OVERRIDES,
	languageOrder = LANGUAGE_ORDER
}