Skip to content
Snippets Groups Projects
Commit e2d0dbae authored by lgtg20's avatar lgtg20
Browse files

Merge branch 'ente_federativo' into 'development'

Ente federativo

See merge request !420
parents 3e321f87 12651034
No related branches found
No related tags found
3 merge requests!434Homologa,!422Development,!420Ente federativo
/*
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of simcaq-node.
simcaq-node is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
simcaq-node is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = function ageRangeEntity(id) {
switch (id) {
case 1:
return 'Até 24 anos';
case 2:
return '25 a 29 anos';
case 3:
return '30 a 39 anos';
case 4:
return '40 a 49 anos';
case 5:
return '50 a 54 anos';
case 6:
return '55 a 59 anos';
case 7:
return '60 anos ou mais';
default:
return 'Não declarada';
}
};
/*
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of simcaq-node.
simcaq-node is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
simcaq-node is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = function educationLevelShort(id) {
switch (id) {
case 1:
return 'Creche';
case 2:
return 'Pré-Escola';
case 3:
return 'Ensino Fundamental - anos iniciais';
case 4:
return 'Ensino Fundamental - anos finais';
case 5:
return 'Ensino Médio Propedêutico';
case 6:
return 'Ensino Médio Normal Magistério';
case 7:
return 'Ensino Médio Integrado';
case 8:
return 'Educação Profissional Técnica - Associado ao Nível Médio';
case 9:
return 'Educação Profissional Técnica - Concomitante';
case 10:
return 'Educação Profissional Técnica - Subsequente';
case 11:
return 'Educação Profissional - Misto';
case 12:
return 'Educação Profissional FIC Concomitante';
case 13:
return 'Educacao Profissional FIC Integrado EJA';
case 14:
return 'EJA Ensino Fundamental';
case 15:
return 'EJA Ensino Médio';
default:
return 'Não classificada';
}
};
/*
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of simcaq-node.
simcaq-node is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
simcaq-node is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = function educationLevelShort(id) {
switch (id) {
case 1:
return 'Educação Infantil';
case 2:
return 'Ensino Fundamental';
case 3:
return 'Ensino Médio';
case 4:
return 'Educação Profissional';
case 5:
return 'Educação Profissional Técnica de Nível Médio';
case 6:
return 'Educação Profissional FIC';
case 7:
return 'EJA';
default:
return 'Não classificada';
}
};
/*
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of simcaq-node.
simcaq-node is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
simcaq-node is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = function ageRange(id) {
switch (id) {
case 1:
return 'Pós-Graduação Especialização';
case 2:
return 'Pós-Graduação Mestrado';
case 3:
return 'Pós-Graduação Doutorado';
default:
return '';
}
};
......@@ -22,7 +22,16 @@ const convert = {
modality_integral_time: 'educationLevelBasic',
special_education: 'specialEducation',
special_education_doc: 'specialEducationDoc',
education_level_mod_doc: 'educationLevelModDoc'
education_level_mod_doc: 'educationLevelModDoc',
education_level_mod_entity_seg: 'educationLevelModEntitySeg',
education_level_mod_entity_agg: 'educationLevelModEntityAgg',
adm_dependency_entity_agg: 'newPnadAdmDependency',
adm_dependency_entity: 'admDependency',
location_entity: 'location',
gender_entity: 'gender',
age_range_entity: 'ageRangeEntity',
post_graduation_entity: 'postGraduationEntity',
contract_type_entity: 'contractType'
}
function aggregateData(req, res, next) {
......@@ -38,7 +47,16 @@ function aggregateData(req, res, next) {
'period_agg',
'modality_integral_time',
'special_education',
'special_education_doc'
'special_education_doc',
'education_level_mod_entity_seg',
'education_level_mod_entity_agg',
'adm_dependency_entity_agg',
'adm_dependency_entity',
'location_entity',
'gender_entity',
'age_range_entity',
'post_graduation_entity',
'contract_type_entity'
]
let id;
const fields = req.query.dims.split(',');
......
......@@ -119,7 +119,10 @@ const ageRangeAggregate = require(`${libs}/convert/ageRangeAggregate`);
const specialEducation = require(`${libs}/convert/specialEducation`);
const specialEducationDoc = require(`${libs}/convert/specialEducationDoc`);
const educationLevelModDoc = require(`${libs}/convert/educationLevelModDoc`);
const educationLevelModEntitySeg = require(`${libs}/convert/educationLevelModEntitySeg`);
const educationLevelModEntityAgg = require(`${libs}/convert/educationLevelModEntityAgg`);
const ageRangeEntity = require(`${libs}/convert/ageRangeEntity`);
const postGraduationEntity = require(`${libs}/convert/postGraduationEntity`);
const ids = {
gender_id: gender,
......@@ -231,7 +234,11 @@ const ids = {
income_range_id: incomeRange,
special_education: specialEducation,
special_education_doc: specialEducationDoc,
education_level_mod_doc: educationLevelModDoc
education_level_mod_doc: educationLevelModDoc,
education_level_mod_entity_seg: educationLevelModEntitySeg,
education_level_mod_entity_agg: educationLevelModEntityAgg,
age_range_entity: ageRangeEntity,
post_graduation_entity: postGraduationEntity
};
function transform(removeId=false) {
......@@ -365,5 +372,9 @@ module.exports = {
incomeRange,
specialEducation,
specialEducationDoc,
educationLevelModDoc
educationLevelModDoc,
educationLevelModEntitySeg,
educationLevelModEntityAgg,
ageRangeEntity,
postGraduationEntity
};
......@@ -149,6 +149,8 @@ const enrollmentAggregate = require(`${libs}/routes_v1/enrollmentAggregate`);
const employeesAggregate = require(`${libs}/routes_v1/employeesAggregate`);
const federativeEntity = require(`${libs}/routes_v1/federativeEntity`);
const email = require(`${libs}/routes_v1/email`);
api.get('/', (req, res) => {
......@@ -214,6 +216,7 @@ api.use('/new_pnad', newPnad);
api.use('/rate_school_new', rateSchoolNew)
api.use('/enrollmentAggregate', enrollmentAggregate);
api.use('/employeesAggregate', employeesAggregate);
api.use('/federativeEntity', federativeEntity);
//Publication
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment