You are on page 1of 17

Unemployment Analysis for Spain

ROBERTO MEDIERO MART ROYA OLYAZADEH January 2012 Universitat Jaume I Spain

1. Introduction 2. Final UML Diagram 3. The resulting logical database model, including its SQL implementation 4. Data and queries used to test of the model 5. Screenshot of queries in GVsig 6. Conclusion and recommendation

1.

Introduction

Recently high ranks of unemployment become a common movement throughout most of the European Union and compare extremely with the relatively low unemployment levels in other developed nations. In this project, we are trying to analyze the causes for the high level of unemployment in Spain. We will compare the Spanish sectors which they were their previous job for unemployed people. High unemployment is currently a problem shared by all the nations of the European Union. In fact, the high level of unemployment in European Union member nations is one of the most important characteristics that distinguishes the economies of these countries from that of the United States. This is problematic because when workers are unemployed, there is an underutilization of resources so the total production of goods and services is less than what it could potentially be. Furthermore, if people cannot find jobs in their country or if the pay is lower than in other countries, they may be tempted to relocate to another country where there is a higher demand for labor and wages are higher. The number registered as unemployed topped 4 million in January 2010 in Spain. Taking into account the entire negative effects that high unemployment can have on the economy and optimism of a nation, it is not surprising that unemployment is currently considered one of the most significant national problems in Spain.
In this project, we are going to use data of population and unemployment in Spain to distinguish the following ideas:

1. To see which area of Spain has the more unemployment

2. To make comparison between different type of unemployment for young and adult. 3. Try to find relation between population and different type of employment.

2. Final UML Diagram


The UML diagram of this project consists of 3 main classes which they are: Province, Population and Unemployment and 5 subclasses for unemployment which they are: Construction, Agriculture, Services, Industry and Without_Previous_Job. Following figure shows the final UML diagram of this project with all attitudes.

Figure1. Final UML Diagram

3. The resulting logical database model, including its SQL implementation 3.1 Logical Database Model
ESP_PROVINCIAS(SRID,Nobmbre99,The_Geom) POPULATION(Id_province,Province_Name,men,women,Total) TOTAL_UNEMPLOYMENT(Srid,Province_name,Total) AGRICULTURA(srid,Province_name,Man_less25,Woman_less25,Man_mor25,Woman_mor25) INDUSTRIA(srid,Province_name,Man_less25,Woman_less25,Man_mor25,Woman_mor25) CONSTRUCCIN(srid,Province_name,Man_less25,Woman_less25,Man_mor25,Woman_mor25) SERVICIOS(srid,Province_name,Man_less25,Woman_less25,Man_mor25,Woman_mor25) SIN_EMPLEO_ANTERIOR(srid,Province_name,Man_less25,Woman_less25,Man_mor25,Woman_m or25)

3.2 SQL implementation


In this part the table we have created in the PGAdmin is presented. The first Table esp_province were a shape file and we imported directly from PGadmin. They can be seen in Figure 2 and 3.

Figure 2: Shape file of Spain

Figure3: Importing Shapefile to PostGIS

All other tables have been created in PosGIS and data has been inserted to them manually. Following you can see implementation of creation of other tables in pgadmin.

Population:
create table population ( id_province integer,

province_name varchar(50), totalPop menPop womenPop integer, integer, integer,

primary key (province_name), foreign key (id_province) references esp_provincias(gid)); insert into population values (1, 'lava', 286387, 142036, 144351);

Part of table Population

Unemployment:
create table total_unemployments ( gid_serial integer,

province_name varchar(50), total integer,

primary key(gid_serial, province_name), foreing Key(province_name) references population(province_name)); insert into total_unemployments values (1, 'lava', 22445);

Part of table Unemployment

Construction:
create table Construccion ( gid_serial integer,

province_name varchar(50), sector men_less25 varchar(50), integer,

women_less25 integer, men_more25 integer,

women_more25 integer, total integer,

primary key(gid_serial, province_name), foreign key (province_name) references population(province_name)); insert into Construccion values (52, 'Melilla', 'CONSTRUCCION ', 84, 14, 1005, 100, 1203);

Part of table Construction

Industry:
create table Industria ( gid_serial integer,

province_name varchar(50), sector men_less25 varchar(50), integer,

women_less25 integer, men_more25 integer,

women_more25 integer,

total

integer,

primary key(gid_serial, province_name), foreign key (province_name) references population(province_name)); insert into Industria values (52, 'Melilla', 'INDUSTRIA ', 27, 12, 116, 47, 202);

Part of table Industry

Services:
create table Servicios ( gid_serial integer,

province_name varchar(50), sector men_less25 varchar(50), integer,

women_less25 integer, men_more25 integer,

women_more25 integer, total integer,

primary key(gid_serial, province_name), foreign key (province_name) references population(province_name)); insert into Servicios values (52, 'Melilla', 'SERVICIOS ', 479, 566, 1977, 3853, 6875);

Part of table Services

Without Previous job:


create table Sin_empleo_anterior ( gid_serial integer,

province_name varchar(50), sector men_less25 varchar(50), integer,

women_less25 integer,

men_more25

integer,

women_more25 integer, total integer,

primary key(gid_serial, province_name), foreign key (province_name) references population(province_name));

insert into Sin_empleo_anterior values (52, 'Melilla', 'SIN EMPLEO ANTERIOR ', 534, 588, 171, 974, 2267);

Part of table Without_previous_job

Agriculture:
create table Agricultura (

gid_serial

integer,

province_name varchar(50), sector men_less25 varchar(50), integer,

women_less25 integer, men_more25 integer,

women_more25 integer, total integer,

primary key(gid_serial, province_name), foreign key (province_name) references population(province_name)); insert into Agricultura values (52, 'Melilla', 'AGRICULTURA ', 2, 4, 44, 22, 72);

Part of table Agriculture

4. Data and queries

The data we found: 1. Shape file of spain andit is imported to Pgadmin. 2. 3. Table of population (Statistical on web page of Spain ) Tables of unemployment for diffrente sectors per province in Spain (web page of Instituto Nacional de Empleo )

Queries:

1. Provinces with more than 2000 men older than 25 years old unemployed in the agriculture sector in Spain. 2. Percentage of unemployed population in each province and classification of quantity of unemployment. 3. View that shows the percentage of unemployment of women who are more older than 25 years old in the servicios sector.

5. Screenshot of queries in GVsig

ONE:
Provinces with more than 2000 men older than 25 years old unemployed in the agriculture sector in Spain.

CREATE VIEW unmeployment_agri_men_more25 AS SELECT province_name, men_more25, the_geom FROM agricultura a, esp_provincias es WHERE a.province_name = es.nombre99 AND a.men_more25>2000; INSERT INTO geometry_columns values ('', 'public', 'unmeployment_agri_men_more25','the_geom', 2, -1, 'MULTIPOLYGON');

Figure4: unmeplo_agri_menmore25 Two:

Percentage of unemployed population in each province and classification of quantity of unemployments.

CREATE VIEW percentage_total_unemployment AS select u.total, u.province_name, round((u.total/p.totalpop::numeric)*100) AS percent_unemployments, es.the_geom FROM total_unemployments u, population p, esp_provincias es WHERE u.province_name = p.province_name AND p.province_name=es.nombre99; INSERT INTO geometry_columns values ('', 'public', 'percentage_total_unemployment','the_geom', 2, -1, 'MULTIPOLYGON');

Figure5: percent_unemployment3

Three:

View that shows the percentage of unemployment of women who are more than 25 years old limit by 10 in servicios sector.

CREATE VIEW percent_women_serv_unemploy AS Select s.province_name, s.women_more25, round((s.women_more25/s.total::numeric)*100) AS percent_womenUnemployment, es.the_geom FROM servicios s, esp_provincias es WHERE s.province_name = es.nombre99 ORDER BY 3 DESC LIMIT 10; INSERT INTO geometry_columns values ('', 'public', 'percent_women_serv_unemploy','the_geom', 2, -1, 'MULTIPOLYGON');

Figure6: percent_women_serv_unemploy

6. Conclusion Recommendation
We would need more data from employed people and also immigration to conclude for better result. We can do more queries for finding the unemployment on each sector.

References 1.
http://www.uam.es/departamentos/economicas/analecon/especifica/mimeo/wp20092.pdf

2.
http://economics.stanford.edu/files/Theses/Theses_2004/Garcia-Rubiales.pdf

3.
http://www.gvsig.org/web/

4
http://www.pgadmin.org/

You might also like