Implement UC201 - Select Location
-
Review changes -
-
Download -
Patches
-
Plain diff
Merged
João Victor Risso requested to merge 71-simcaq-implementar-backend-uc201-selecionar-localidade into development
Issue
Closes issue simcaq/SCRUM#71
Routes
-
/api/v1/location/sociodemographic
: Sociodemographic data for the whole country. -
/api/v1/location/sociodemographic/region/:id
: Sociodemographic data for a region identified by:id
. -
/api/v1/location/sociodemographic/state/:id
: Sociodemographic data for a state identified by:id
. -
/api/v1/location/sociodemographic/city/:id
: Sociodemographic data for a city identified by:id
. -
/api/v1/location/educational
: Educational data for the whole country. -
/api/v1/location/educational/region/:id
: Educational data for a region identified by:id
. -
/api/v1/location/educational/state/:id
: Educational data for a state identified by:id
-
/api/v1/location/educational/city/:id
: Educational data for a city identified by:id
-
/api/v1/location/educational/school_level
: Educational data grouped by school levels and years -
/api/v1/location/educational/school_level/region/:id
: Educational data grouped by school levels and years for a region identified by:id
. -
/api/v1/location/educational/school_level/state/:id
: Educational data grouped by school levels and years for a state identified by:id
-
/api/v1/location/educational/school_level/city/:id
: Educational data grouped by school levels and years for a city identified by:id
Response Format
/api/v1/sociodemographic/*
routes
Complete result is contained in the result
attribute, as usual.
Each subattribute of result
defines the following:
-
population
: most recent population census -
gdp
: most recent country GDP ('PIB' in Portuguese) survey -
idh
: most recent IDH survey -
analfab
: most recent analfabetism census -
gini
: most recent Gini index census
Example JSON object:
{
"result": {
"population": {
"name":"Brasil",
"population":"203984155",
"census_year":2015
},
"gdp": {
"name":"Brasil",
"gdp_per_capita":17378.46570581903,
"census_year":2013
},
"idh": {
"name":"Brasil",
"idhm":0.6591849721373367,
"census_year":2010
},
"analfab": {
"name":"Brasil",
"analfabetism":16.15446881179219,
"census_year":2010
},
"gini": {
"name":"Brasil",
"gini":0.4943627539097612,
"census_year":2010
}
}
}
/api/v1/educational/*
Complete result is contained in the result
attribute, as usual.
Each subattribute of result
defines the following:
-
school
: most recent school census. -
school_per_location
: most school census, per location. -
enrollment
: enrollments survey -
enrollment_per_adm_dep
: enrollments survey per administrative dependency -
enrollment_per_school_level
: enrollments survey per school (or educational) level
Example JSON object:
{
"result": {
"school": [
{
"name": "Acrelândia",
"location": "Total",
"total": 7,
"census_year": 2015
}
],
"school_per_location": [
{
"name": "Acrelândia",
"location": "Rural",
"total": 7,
"census_year": 2015
}
],
"enrollment": [
{
"name": "Acrelândia",
"total": "4182",
"census_year": 2015
}
],
"enrollment_per_adm_dep": [
{
"name": "Acrelândia",
"total": "1862",
"census_year": 2015,
"adm_dependency": "Estadual"
},
{
"name": "Acrelândia",
"total": "2320",
"census_year": 2015,
"adm_dependency": "Municipal"
}
],
"enrollment_per_school_level": [
{
"name": "Acrelândia",
"total": "288",
"census_year": 2015,
"school_level": "Creche"
},
{
"name": "Acrelândia",
"total": "296",
"census_year": 2015,
"school_level": "EJA"
},
{
"name": "Acrelândia",
"total": "1006",
"census_year": 2015,
"school_level": "Ensino Fundamental - Anos Finais"
},
{
"name": "Acrelândia",
"total": "1451",
"census_year": 2015,
"school_level": "Ensino Fundamental - Anos Iniciais"
},
{
"name": "Acrelândia",
"total": "120",
"census_year": 2015,
"school_level": "Ensino Fundamental multietapa e correção de fluxo"
},
{
"name": "Acrelândia",
"total": "636",
"census_year": 2015,
"school_level": "Ensino Médio"
},
{
"name": "Acrelândia",
"total": "385",
"census_year": 2015,
"school_level": "Pré-Escola"
}
]
}
}
The /api/v1/location/educational/school_level
is an exception, though, for this route the following response format is used:
{
"result": [
{
"degree": "Creche",
"census_year": 2015,
"table": [
{
"title": "Creche",
"value": 2966217
}
]
},
{
"degree": "EI + EF",
"census_year": 2015,
"table": [
{
"title": "Não classificado",
"value": 319208
}
]
},
{
"degree": "EJA",
"census_year": 2015,
"table": [
{
"title": "EJA AI",
"value": 50573
},
{
"title": "Não classificado",
"value": 3377148
}
]
},
{
"degree": "Educação Especial exclusiva + classes especiais",
"census_year": 2015,
"table": [
{
"title": "Creche",
"value": 5164
},
{
"title": "Pré-escola",
"value": 6077
},
{
"title": "1 Ano",
"value": 539
},
{
"title": "2 Ano - 1 Serie",
"value": 10940
},
{
"title": "3 Ano - 2 Serie",
"value": 7757
},
{
"title": "4 Ano - 3 Serie",
"value": 5482
},
{
"title": "5 Ano - 4 Serie",
"value": 6676
},
{
"title": "6 Ano - 5 Serie",
"value": 1493
},
{
"title": "7 Ano - 6 Serie",
"value": 723
},
{
"title": "8 Ano - 7 Serie",
"value": 669
},
{
"title": "9 Ano - 8 Serie",
"value": 1328
},
{
"title": "2 Ano",
"value": 414
},
{
"title": "3 Ano",
"value": 307
},
{
"title": "4 Ano",
"value": 5
},
{
"title": "EP",
"value": 333
},
{
"title": "Não classificado",
"value": 95781
}
]
},
{
"degree": "Educação Infantil Unificada",
"census_year": 2015,
"table": [
{
"title": "Não classificado",
"value": 177984
}
]
},
{
"degree": "Educação Profissional",
"census_year": 2015,
"table": [
{
"title": "EP",
"value": 970112
},
{
"title": "Não classificado",
"value": 330392
}
]
},
{
"degree": "Ensino Fundamental - Anos Finais",
"census_year": 2015,
"table": [
{
"title": "6 Ano - 5 Serie",
"value": 3396116
},
{
"title": "7 Ano - 6 Serie",
"value": 3050495
},
{
"title": "8 Ano - 7 Serie",
"value": 2948056
},
{
"title": "9 Ano - 8 Serie",
"value": 2778677
}
]
},
{
"degree": "Ensino Fundamental - Anos Iniciais",
"census_year": 2015,
"table": [
{
"title": "1 Ano",
"value": 2712767
},
{
"title": "2 Ano - 1 Serie",
"value": 2757733
},
{
"title": "3 Ano - 2 Serie",
"value": 3061560
},
{
"title": "4 Ano - 3 Serie",
"value": 2890353
},
{
"title": "5 Ano - 4 Serie",
"value": 2956770
}
]
},
{
"degree": "Ensino Fundamental multietapa e correção de fluxo",
"census_year": 2015,
"table": [
{
"title": "Não classificado",
"value": 1043714
}
]
},
{
"degree": "Ensino Médio",
"census_year": 2015,
"table": [
{
"title": "1 Ano",
"value": 3230496
},
{
"title": "2 Ano",
"value": 2609223
},
{
"title": "3 Ano",
"value": 2170754
},
{
"title": "4 Ano",
"value": 57113
}
]
},
{
"degree": "Não classificado",
"census_year": 2015,
"table": [
{
"title": "Não classificado",
"value": 23480
}
]
},
{
"degree": "Pré-Escola",
"census_year": 2015,
"table": [
{
"title": "Pré-escola",
"value": 4686197
}
]
}
]
}
Merge request reports
Compare and
- version 21cff5d291
- version 20399320f0
- version 195bdeca3d
- version 186da004e7
- version 1723927270
- version 1668946813
- version 15a6283f34
- version 14e35f4126
- version 13736cdc95
- version 12cce4a300
- version 11aef1ec5e
- version 10c73c2ed7
- version 9f1db5b4c
- version 83e7a27ed
- version 7a0bcb0ed
- version 671db7dcc
- version 5d5aa93b7
- version 45f9c032e
- version 3c31e2259
- version 2488edaa5
- version 1d5e05b00
- development (base)
- latest versioncf9bbe6239 commits,
- version 21cff5d29138 commits,
- version 20399320f037 commits,
- version 195bdeca3d36 commits,
- version 186da004e735 commits,
- version 172392727034 commits,
- version 166894681333 commits,
- version 15a6283f3432 commits,
- version 14e35f412631 commits,
- version 13736cdc9530 commits,
- version 12cce4a30029 commits,
- version 11aef1ec5e28 commits,
- version 10c73c2ed727 commits,
- version 9f1db5b4c26 commits,
- version 83e7a27ed25 commits,
- version 7a0bcb0ed22 commits,
- version 671db7dcc21 commits,
- version 5d5aa93b720 commits,
- version 45f9c032e19 commits,
- version 3c31e225916 commits,
- version 2488edaa515 commits,
- version 1d5e05b0010 commits,
22 files
+ 3577
− 1504
Compare changes
- Side-by-side
- Inline
Some changes are not shown
For a faster browsing experience, some files are collapsed by default.
Files
22+ 1
− 1
Loading