Property talk:P772
Documentation
identifier for Spanish municipalities, by the Spanish Statistical Office (INE)
(0[1-9]|[1-4][0-9]|5[0-2])(|\d{3}|\d{5}|\d{9})
”: value must be formatted using this pattern (PCRE syntax). (Help)List of violations of this constraint: Database reports/Constraint violations/P772#Format, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P772#Item P625, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P772#Single value, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P772#Unique value, SPARQL (every item), SPARQL (by value)
List of violations of this constraint: Database reports/Constraint violations/P772#Item P131, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P772#Type Q3183364, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P772#Entity types
This property is being used by: it:Template:Divisione amministrativa, it:Modulo:Codice statistico
Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
|
Property:P772 format
[edit]The Property:P772 format is set to \d{5} but there are three types of valid formats: \d{2}, \d{5} and \d{11}. this "format" violations are correct. --Kizar (talk) 09:43, 24 August 2014 (UTC)
- Kizar I updated the regular expression (same edit as this one). On the next update run, the list should be a bit shorter. Multichill (talk) 10:00, 24 August 2014 (UTC)
- Thank u so much! --Kizar (talk) 10:30, 24 August 2014 (UTC)
- Let's see if it works first :-) Multichill (talk) 21:25, 24 August 2014 (UTC)
- Thank u so much! --Kizar (talk) 10:30, 24 August 2014 (UTC)
- Is this for municipality codes or just any INE code?
- I don't think \d{2} is a valid format for municipalities. --- Jura 11:42, 17 November 2014 (UTC)
- See also Talk:Q17417920. It seems that the label in Spanish has a meaning different from that of other languages. --- Jura 11:27, 18 November 2014 (UTC)
6 digits
[edit]In [1] the INE code has 6 digits: 2 (CPRO) + 3 (CMUN) + 1 (DC). This is different from the description that all INE codes have 2, 5 or 11 digits. Is the DC digit a checksum? --Pasleim (talk) 10:10, 18 August 2015 (UTC)
Is P1566 restriction really needed?
[edit]We have some thousands elements without GeoNames ID (P1566). Now I wonder what's the need to be a mandatory constraint (Q21502408) for P772. I would consider to remove this restriction or, at least, to change as suggestion constraint (Q62026391). —Ismael Olea (talk) 18:56, 6 December 2021 (UTC)
- Notified participants of WikiProject Spain, any opinion here? —Ismael Olea (talk) 10:15, 24 July 2023 (UTC)
- I guess it isn't. strakhov (talk) 15:40, 24 July 2023 (UTC)
- Sometimes there is no Geonames ID corresponding to the INE code. Davileci (talk) 10:38, 30 July 2023 (UTC)
- So, is it fine to remove the restriction at all? —Ismael Olea (talk) 09:25, 31 July 2023 (UTC)
- Yes, it is. Davileci (talk) 14:44, 31 July 2023 (UTC)
- So, is it fine to remove the restriction at all? —Ismael Olea (talk) 09:25, 31 July 2023 (UTC)
- Sometimes there is no Geonames ID corresponding to the INE code. Davileci (talk) 10:38, 30 July 2023 (UTC)
- I guess it isn't. strakhov (talk) 15:40, 24 July 2023 (UTC)
IneLink
[edit]local function ineLink ( id, link, parameter )
-- representación especial del INE, enlace no estándar con cinco parámetros utilizados
local ineMainRE, ineTailRE = '^(%d%d)(%d%d%d)', '(%d%d)(%d%d)(%d%d)'
local codProv, codMuni, codEC, codES, codNUC = string.match( id, ineMainRE .. ineTailRE .. '$' )
if not codEC or not codES or not codNUC then
codProv, codMuni = string.match( id, ineMainRE .. '$' )
if codProv and codMuni then
codEC, codES, codNUC = '00', '00', '00'
else
codProv, codMuni = string.match( id, ineMainRE )
codEC, codES, codNUC = '', '', ''
end
end
if codProv and codMuni then
link = 'http://www.ine.es/nomen2/inicio_a.do?accion=busquedaAvanzada&inicio=inicio_a&subaccion=&botonBusquedaAvanzada=Consultar+selecci%C3%B3n&numPag=0&ordenAnios=ASC&comunidad=00&entidad_amb=no&poblacion_amb=T&poblacion_op=%3D&poblacion_txt=&denominacion_op=like&denominacion_txt=&codProv=$1&codMuni=$2&codEC=$3&codES=$4&codNUC=$5'
link = link:gsub('$1', codProv):gsub('$2', codMuni):gsub('$3', codEC):gsub('$4', codES):gsub('$5', codNUC)
return generic( id, link, parameter )
end
return id
end
Davileci (talk) 08:16, 29 July 2022 (UTC)
- @Davileci: I do not know if this is an attempt to fix the link however I know it does not currently work. Maundwiki (talk) 14:22, 25 August 2022 (UTC)
- @Maundwiki: Yes, it is. At the Spanish Wikipedia it functions and I wonder why not at Wikidata. Davileci (talk) 15:40, 25 August 2022 (UTC)
- @Davileci: Ok, do I have to report the issue on wikidata? Maundwiki (talk) 15:46, 25 August 2022 (UTC)
- @Maundwiki: Yes, please. Thank you! Davileci (talk) 15:50, 25 August 2022 (UTC)
This does not work at Wikidata: http://www.ine.es/nomen2/inicio_a.do?accion=busquedaAvanzada&inicio=inicio_a&subaccion=&botonBusquedaAvanzada=Consultar+selecci%C3%B3n&numPag=0&ordenAnios=ASC&comunidad=00&entidad_amb=no&poblacion_amb=T&poblacion_op=%3D&poblacion_txt=&denominacion_op=like&denominacion_txt=&codProv=42071000100&codMuni=$2&codEC=$3&codES=$4&codNUC=$5
However, this does work at Spanish Wikipedia: http://www.ine.es/nomen2/inicio_a.do?accion=busquedaAvanzada&inicio=inicio_a&subaccion=&botonBusquedaAvanzada=Consultar+selecci%C3%B3n&numPag=0&ordenAnios=ASC&comunidad=00&entidad_amb=no&poblacion_amb=T&poblacion_op=%3D&poblacion_txt=&denominacion_op=like&denominacion_txt=&codProv=42&codMuni=071&codEC=00&codES=01&codNUC=00 Davileci (talk) 15:45, 25 August 2022 (UTC)
- I've removed the formatter url. That link in es.wikipedia uses 5 different ID's. This can't work in Wikidata as far as I know. strakhov (talk) 15:42, 24 July 2023 (UTC)
- Thanks! —Ismael Olea (talk) 10:46, 25 July 2023 (UTC)
- I've removed the formatter url. That link in es.wikipedia uses 5 different ID's. This can't work in Wikidata as far as I know. strakhov (talk) 15:42, 24 July 2023 (UTC)
Do we really want postal code (P281)?
[edit]Hi:
We had 5167 violations for the P281 property restriction. Checking in Geographic Nomenclature of Municipalities and Population Entities (Q95877977) there is no postal code column and now I can't remember any other database relating INE code with postal code. If we have this information the violations can be fixed. If not, well, I don't see the point using P281 as a restriction.
Any opinion against removing the postal code (P281) restriction?
Notified participants of WikiProject Spain —Ismael Olea (talk) 09:36, 2 August 2023 (UTC)
- I removed it after waiting some weeks. FYI —Ismael Olea (talk) 11:55, 27 August 2023 (UTC)
- Spain-related properties
- All Properties
- Properties with external-id-datatype
- Properties used on 10000+ items
- Properties with format constraints
- Properties with constraints on items using them
- Properties with single value constraints
- Properties with unique value constraints
- Properties with constraints on type
- Properties with scope constraints
- Properties with entity type constraints