-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revisar #22
base: master
Are you sure you want to change the base?
Revisar #22
Changes from all commits
7d0d1e6
a39f21e
363f4ed
a690898
7b33d34
ab0e657
83f99cd
cc7be4e
2f95833
e6808f3
283a942
6f390cc
2094d15
bb7e210
573eedf
4d429e3
5caee79
283b599
1fec52e
c685917
32796c6
1337c3c
0d7d917
2765144
784cf75
0755906
46d84a8
e72c3b0
4d2632a
25e5910
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ coverage/ | |
node_modules/ | ||
.DS_Store | ||
*.swp | ||
package-lock.json | ||
package-lock.json | ||
src/data.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
import data from './data/worldbank/worldbank.js'; | ||
|
||
export { educación, empleo, negocios, población, salud, violencia}; | ||
|
||
|
||
//Filtro que proporciona los indicadores de "Mujeres y Educación" | ||
|
||
function educación(countryData){ | ||
let newdataEducacion=[]; | ||
let indicatorEducacion=[]; | ||
newdataEducacion = countryData.indicators.filter(indicators=> | ||
{ | ||
return indicators.indicatorName.includes("mujeres") && (indicators.indicatorName.includes("alfabetización") | ||
| indicators.indicatorName.includes("alfabetizados")|| indicators.indicatorName.includes("escolar") | ||
| indicators.indicatorName.includes("escuela")| indicators.indicatorName.includes("instrucción") | ||
| indicators.indicatorName.includes("Educación")| indicators.indicatorName.includes("inscripciones") | ||
| indicators.indicatorName.includes("ingreso")) | ||
}) | ||
|
||
|
||
// función que retorna los nombres de los indicadores de "Mujeres y Educación" | ||
for (var i = 0; i < newdataEducacion.length; i++) | ||
{ | ||
indicatorEducacion.push(newdataEducacion[i].indicatorName) | ||
|
||
} | ||
|
||
return indicatorEducacion; | ||
} | ||
|
||
|
||
//Filtro que proporciona los indicadores de "Mujeres y Empleo" | ||
function empleo (countryData){ | ||
let newdataEmpleo=[]; | ||
let indicatorEmpleo=[]; | ||
newdataEmpleo = countryData.indicators.filter(indicators=> | ||
{ | ||
return indicators.indicatorName.includes("mujeres") && indicators.indicatorName.includes("empleo") | ||
| indicators.indicatorName.includes("desempleadas")| indicators.indicatorName.includes("laboral") | ||
|
||
}) | ||
//Funcion que proporciona el nombre de los indicadores | ||
for (var i = 0; i < newdataEmpleo.length; i++) { | ||
indicatorEmpleo.push(newdataEmpleo[i].indicatorName) | ||
} | ||
return indicatorEmpleo; | ||
} | ||
|
||
|
||
|
||
// //Filtro que proporciona los indicadores de "Mujeres y Población" | ||
|
||
function población(countryData){ | ||
let newdataPoblacion=[]; | ||
let indicatorPoblacion=[]; | ||
newdataPoblacion = countryData.indicators.filter(indicators=> | ||
{ | ||
return indicators.indicatorName.includes("mujeres") && indicators.indicatorName.includes("población") | ||
|
||
}) | ||
|
||
// función que retorna los nombres de los indicadores de "Mujeres y Población" | ||
for (var i = 0; i < newdataPoblacion.length; i++) | ||
{ | ||
indicatorPoblacion.push(newdataPoblacion[i].indicatorName) | ||
|
||
} | ||
return indicatorPoblacion; | ||
} | ||
|
||
//Filtro que proporciona los indicadores de "Mujeres y Negocios" | ||
function negocios(countryData){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nombres de funciones en ingles |
||
let newdataNegocios=[]; | ||
let indicatorNegocios=[]; | ||
|
||
newdataNegocios =countryData.indicators.filter(indicators=> | ||
{ | ||
return indicators.indicatorName.includes("mujeres") && (indicators.indicatorName.includes("iniciar") | ||
| indicators.indicatorName.includes("Independientes")| indicators.indicatorName.includes("propiedad")) | ||
}) | ||
|
||
// función que retorna los nombres de los indicadores para Brasil "Mujeres y Negocios" | ||
for (var i = 0; i < newdataNegocios.length; i++) | ||
{ | ||
indicatorNegocios.push(newdataNegocios[i].indicatorName) | ||
|
||
} | ||
return indicatorNegocios; | ||
} | ||
|
||
|
||
//Filtro que proporciona los indicadores de "Mujeres y Salud" | ||
function salud (countryData){ | ||
let newdataSalud=[]; | ||
let indicatorSalud=[]; | ||
|
||
newdataSalud = countryData.indicators.filter(indicators=> | ||
{ | ||
return indicators.indicatorName.includes("mujeres") && (indicators.indicatorName.includes("Prevalencia") | ||
| indicators.indicatorName.includes("nacer") || indicators.indicatorName.includes("anticoncepción")) | ||
}) | ||
|
||
// función que retorna los nombres de los indicadores de"Mujeres y Salud" | ||
for (var i = 0; i < newdataSalud.length; i++) | ||
{ | ||
indicatorSalud.push(newdataSalud[i].indicatorName) | ||
} | ||
return indicatorSalud; | ||
} | ||
|
||
//Filtro que proporciona los indicadores de "Mujeres y violencia" | ||
function violencia (countryData){ | ||
let newdataViolencia =[]; | ||
let indicatorViolencia =[]; | ||
|
||
newdataViolencia = countryData.indicators.filter(indicators=> | ||
{ | ||
return (indicators.indicatorName.includes("mujeres")|indicators.indicatorName.includes("Mujeres")) && (indicators.indicatorName.includes("violencia") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Muy bien el trabajo con la discriinación de data |
||
| indicators.indicatorName.includes("casaron")| indicators.indicatorName.includes("golpee")) | ||
}) | ||
|
||
// función que retorna los nombres de los indicadores para Brasil "Mujeres y violencia" | ||
for (var i = 0; i < newdataViolencia.length; i++) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preferible usar forEach o map |
||
{ | ||
indicatorViolencia.push(newdataViolencia[i].indicatorName) | ||
} | ||
return indicatorViolencia; | ||
} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Los nombres de variables, fnuciones, id, clases ya no serán tolerables en español en el próximo proyecto.