2026-03-17 17:34:34 +01:00
|
|
|
export function createFormation(raw) {
|
2026-03-18 12:45:44 +01:00
|
|
|
let taux = 0
|
|
|
|
|
|
|
|
|
|
if (raw.voe_tot && raw.voe_tot > 0) {
|
|
|
|
|
taux = Math.round((raw.acc_tot / raw.voe_tot) * 100)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
id: raw.cod_uai + "-" + raw.lib_for_voe_ins,
|
2026-03-18 13:25:23 +01:00
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
nom: raw.lib_for_voe_ins,
|
|
|
|
|
etablissement: raw.g_ea_lib_vx,
|
|
|
|
|
ville: raw.ville_etab,
|
|
|
|
|
departement: raw.dep,
|
2026-03-18 13:25:23 +01:00
|
|
|
departementLib: raw.dep_lib,
|
|
|
|
|
region: raw.region_etab_aff,
|
|
|
|
|
academie: raw.acad_mies,
|
|
|
|
|
contrat: raw.contrat_etab,
|
|
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
filiere: raw.fili,
|
|
|
|
|
selectivite: raw.select_form,
|
2026-03-18 13:25:23 +01:00
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
capacite: raw.capa_fin,
|
|
|
|
|
candidats: raw.voe_tot,
|
|
|
|
|
admis: raw.acc_tot,
|
|
|
|
|
tauxAcces: taux,
|
2026-03-18 13:25:23 +01:00
|
|
|
|
|
|
|
|
latitude: raw.g_olocalisation_des_formations
|
|
|
|
|
? raw.g_olocalisation_des_formations.lat
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
|
|
longitude: raw.g_olocalisation_des_formations
|
|
|
|
|
? raw.g_olocalisation_des_formations.lon
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
|
|
// profils admis
|
|
|
|
|
pctFemmes: raw.pct_f,
|
|
|
|
|
pctBoursiers: raw.pct_bours,
|
|
|
|
|
pctNeoBac: raw.pct_neobac,
|
|
|
|
|
|
|
|
|
|
pctGeneral: raw.pct_bg,
|
|
|
|
|
pctTechno: raw.pct_bt,
|
|
|
|
|
pctPro: raw.pct_bp,
|
|
|
|
|
|
|
|
|
|
pctSansMention: raw.pct_sansmention,
|
|
|
|
|
pctAB: raw.pct_ab,
|
|
|
|
|
pctB: raw.pct_b,
|
|
|
|
|
pctTB: raw.pct_tb,
|
|
|
|
|
pctTBF: raw.pct_tbf,
|
|
|
|
|
|
|
|
|
|
// vitesse de remplissage / phase principale
|
|
|
|
|
pctDebutPhase: raw.pct_acc_debutpp,
|
|
|
|
|
pctDateBac: raw.pct_acc_datebac,
|
|
|
|
|
pctFinPhase: raw.pct_acc_finpp,
|
|
|
|
|
|
|
|
|
|
// chiffres bruts utiles
|
|
|
|
|
admisDebutPhase: raw.acc_debutpp,
|
|
|
|
|
admisDateBac: raw.acc_datebac,
|
|
|
|
|
admisFinPhase: raw.acc_finpp,
|
|
|
|
|
|
|
|
|
|
admisGeneral: raw.acc_bg,
|
|
|
|
|
admisTechno: raw.acc_bt,
|
|
|
|
|
admisPro: raw.acc_bp,
|
|
|
|
|
admisAutres: raw.acc_at
|
2026-03-18 12:45:44 +01:00
|
|
|
}
|
|
|
|
|
}
|