HomeEurope

Spain

Kingdom of Spain

National

')}b=[];for(var c= 0;ca?-1:this.popCols[a]};cp.charts.DataContainer.prototype.getNumberOfValueColumns=function(){return this.popCols.length}; cp.charts.DataContainer.prototype.getValueColumnIndex=function(a){return this.popCols[a]};cp.charts.DataContainer.prototype.getAdmColumnIndex=function(){return this.admCol};cp.charts.DataContainer.prototype.getAreaColumnIndex=function(){return this.areaCol};cp.charts.DataContainer.prototype.getNumberOfRows=function(){return this.data.getNumberOfRows()};cp.charts.DataContainer.prototype.getValue=function(a,b){return this.data.getValue(a,b)}; cp.charts.DataContainer.prototype.getID=function(a){return this.data.getValue(a,this.idCol)};cp.charts.DataContainer.prototype.getAllIDs=function(){for(var a=[],b=0;b
");c+= '";1!=e&&1
");c+="";c=c+('
");c=c+('
";c=c+('
");c=c+('
";c+='
";for(l=1;l<=g;l++)c+='
';c+="
";a=document.createElement("div");a.id="cp_chart_dialog_div_"+b;a.className="ui-corner-all ui-widget ui-widget-content";a.innerHTML=c;document.getElementsByTagName("body")[0].appendChild(a);this.activeTab=0;var p=this;$("#cp_chart_tabs_"+b).tabs({activate:function(a, b){p.activeTab=$(this).tabs("option","active");p.draw()}});$("#cp_chart_selalldates_but_"+b).button().click(function(a){p.selectAllIn(cp.charts.ChartDialog.DATE_SELECT);p.draw()});$("#cp_chart_unselalldates_but_"+b).button().click(function(a){p.unselectAllIn(cp.charts.ChartDialog.DATE_SELECT);p.draw()});$("#cp_chart_selallplaces_but_"+b).button().click(function(a){p.selectAllIn(cp.charts.ChartDialog.PLACE_SELECT);p.draw()});$("#cp_chart_unselallplaces_but_"+b).button().click(function(a){p.unselectAllIn(cp.charts.ChartDialog.PLACE_SELECT); p.draw()});$(a).dialog({dialogClass:"chartDialog",width:cp.getVizValue(750,320),minWidth:cp.getVizValue(538,320),height:cp.getVizValue(500,460),minHeight:cp.getVizValue(470,460),resizable:!0,title:void 0==d?cp.getLoc("Population_Chart"):d,autoOpen:!1,resizeStop:function(a,b){p.resizeTab()}});cp.isTouchDevice()&&$(".chartDialog .ui-dialog-titlebar-close").mousedown(function(){$("#cp_chart_dialog_div_"+b).dialog("close")});$("#cp_chart_logo_"+b).click(function(a){p.close()});$("#cp_chart_date_select_"+ b).change(function(a){p.sort()});$("#cp_chart_sort_select_"+b).change(function(a){p.sort()});$("#cp_chart_place_select_"+b).change(function(a){p.draw()})};cp.charts.ChartDialog.CITY_DATA=1;cp.charts.ChartDialog.ADM_DATA=2;cp.charts.ChartDialog.prototype.getData=function(){return this.data};cp.charts.ChartDialog.DATE_SELECT="date";cp.charts.ChartDialog.REF_SELECT="date";cp.charts.ChartDialog.SORT_SELECT="sort";cp.charts.ChartDialog.PLACE_SELECT="place"; cp.charts.ChartDialog.prototype.selectAllIn=function(a){$("#cp_chart_"+a+"_select_"+this.dataType+" option").prop("selected",!0)};cp.charts.ChartDialog.prototype.unselectAllIn=function(a){$("#cp_chart_"+a+"_select_"+this.dataType+" option").prop("selected",!1)}; cp.charts.ChartDialog.prototype.getSelectedIn=function(a,b){var c=[];$("#cp_chart_"+a+"_select_"+this.dataType+" option").each(function(){$(this).prop("selected")&&(0==b?c.push($(this).attr("value")):c.push(parseInt($(this).attr("value"))))});return c};cp.charts.ChartDialog.prototype.setSelectedIn=function(a,b,c){$("#cp_chart_"+a+"_opt_"+this.dataType+"_"+b).prop("selected",c)};cp.charts.ChartDialog.SIZE_CHART=1;cp.charts.ChartDialog.PORTION_CHART=2;cp.charts.ChartDialog.CHANGE_CHART=3; cp.charts.ChartDialog.DEVELOPMENT_CHART=4;cp.charts.ChartDialog.ALL_PLACES="all";cp.charts.ChartDialog.ONE_PLACE="one";cp.charts.ChartDialog.ADD_PLACE="add";cp.charts.ChartDialog.SORT_NAME=0;cp.charts.ChartDialog.SORT_POP=1;cp.charts.ChartDialog.SORT_ADM=2; cp.charts.ChartDialog.prototype.resizeTab=function(){var a=$("#cp_chart_tabs_"+this.dataType).height(),b=$("#cp_chart_tab_"+this.dataType+"-"+(this.activeTab+1)).position().top;$("#cp_chart_tab_"+this.dataType+"-"+(this.activeTab+1)+" div").height(a-b)}; cp.charts.ChartDialog.prototype.sort=function(){var a=this.getSelectedIn(cp.charts.ChartDialog.SORT_SELECT,!0);if(a==cp.charts.ChartDialog.SORT_NAME)this.data.sortByName();else if(a==cp.charts.ChartDialog.SORT_POP){a=this.getSelectedIn(cp.charts.ChartDialog.DATE_SELECT,!0);if(0==a.length){this.setSelectedIn(cp.charts.ChartDialog.SORT_SELECT,cp.charts.ChartDialog.SORT_NAME,!0);return}this.data.sortByPop(a[a.length-1])}else this.data.sortByAdmin();this.draw()}; cp.charts.ChartDialog.prototype.showMessage=function(a){$("#cp_chart_tab_"+this.dataType+"-"+(this.activeTab+1)).html('

'+a+"

")}; cp.charts.ChartDialog.prototype.draw=function(a,b,c){void 0!=b&&(b==cp.charts.ChartDialog.ALL_PLACES?this.selectAllIn(cp.charts.ChartDialog.PLACE_SELECT):(b!=cp.charts.ChartDialog.ADD_PLACE&&this.unselectAllIn(cp.charts.ChartDialog.PLACE_SELECT),this.setSelectedIn(cp.charts.ChartDialog.PLACE_SELECT,c,!0)));void 0!=a&&$("#cp_chart_tabs_"+this.dataType).tabs("option","active",a-1);var d=this.getSelectedIn(cp.charts.ChartDialog.DATE_SELECT,!0);if(0==d.length)this.showMessage(cp.getLoc("No_reference_selected")); else if(1cp.charts.ChartDialog.PORTION_CHART)this.showMessage(cp.getLoc("Select_more_dates"));else{var g=this.getSelectedIn(cp.charts.ChartDialog.PLACE_SELECT,!1);if(0==g.length)this.showMessage(cp.getLoc("No_place_selected"));else{a=[];for(b=0;bq){e=!1;break}}if(!e)break}e&&this.data.getColumnProperty(c[1],cp.charts.COLTYPE_PROP)!=cp.charts.DIVVAL_COL?(a=550,a={width:a,height:1E3,colors:cp.charts.colors,fontSize:11,sliceVisibilityThreshold:.02,pieResidueSliceLabel:cp.getLoc("Others"),is3D:!0,chartArea:{top:20,height:290,left:20, width:a-20}},b=new google.visualization.PieChart(document.getElementById("cp_chart_tab_"+this.dataType+"-"+(this.activeTab+1))),b.draw(h,a)):this.showMessage(cp.getLoc("Visualization_not_reasonable"))}else if(this.activeTab+1==cp.charts.ChartDialog.CHANGE_CHART){h=new google.visualization.DataView(h);m=[0];for(b=1;b0) && (v2>0)) ? cp.data.computeAnnualChange('"+e.toISOString().substr(0,10)+"','"+f.toISOString().substr(0,10)+"',v1,v2) : null }");e={calc:eval("cp.charts.ChartDialog.change"+b+(b+1)),type:"number",label:e.getFullYear()+" \u2192 "+f.getFullYear()+" (%/"+cp.getLoc("year")+")"};m.push(e)}h.setColumns(m);h.setRows(0,a.length-1);e=f=!0;for(m=1;mq&&(f=!1);0=d.length?25:15;a=200+a*g.length*(d.length-1);a={width:a,height:1E3,colors:cp.charts.colors,fontSize:11,bar:{groupWidth:"75%"},chartArea:{top:20,height:180,left:80,width:a-200},vAxis:{},hAxis:{textStyle:{fontSize:11},slantedText:!0,slantedTextAngle:45,maxTextLines:1}};e?a.vAxis.minValue=0:f&&(a.vAxis.maxValue=0);b=new google.visualization.ColumnChart(document.getElementById("cp_chart_tab_"+this.dataType+"-"+(this.activeTab+ 1)));b.draw(h,a)}else if(this.activeTab+1==cp.charts.ChartDialog.DEVELOPMENT_CHART){d=new google.visualization.DataTable;d.addColumn({type:"date",label:cp.getLoc("Date"),pattern:"yyyy-MM-dd"});g=this.getSelectedIn(cp.charts.ChartDialog.SORT_SELECT,!0);for(b=0;b
  • Spain Major Cities

    Major Cities

    The regions (comunidades autónomas) and all cities exceeding 50,000 inhabitants.

    1981, 1991, 2001, 2011, 2021 census, 2025 evaluation

  • Spain Administrative Division

    Administrative Division

    The population of the Spanish regions (comunidades autónomas) and provinces.

    1981, 1991, 2001, 2011, 2021 census, 2025 evaluation

  • Spain Urban Areas

    Urban Areas

    The population of urban areas with at least 5,000 inhabitants computed by using locality data.

    2010, 2015, 2020, 2024 estimate

  • Top 10 Cities in Spain and Spainish regions

    Top 10 Cities

    The top 10 cities of Spain and of the Spanish regions.

    2025 evaluation

  • Search
  • Regions (Comunidades Autónomas)

    • Major Cities: all cities and municipalities with a population of 15,000 or more – 1981, 1991, 2001, 2011, 2021 census, 2025 evaluation
    • All Cities and Municipalities: all cities and municipalities of the region – 1981, 1991, 2001, 2011, 2021 census, 2025 evaluation
    • Provinces: the provinces of the region – 1981, 1991, 2001, 2011, 2021 census, 2025 evaluation
    • Localities: all localities in a region or province with 20 inhabitants or more – 2010, 2015, 2020, 2024 estimate