コード例 #1
0
 public static function generateEDUCACAO_populacao_adulta($block_populacao_adulta)
 {
     $t_analf25m = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "T_ANALF18M");
     //T_ANALF18M - Mudou variável
     $t_fundin25m = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "T_FUND18M");
     //T_FUND18M  - Mudou variável
     $t_medin25m = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "T_MED18M");
     //T_MED18M  - Mudou variável
     $t_fundin25m_uf = TextBuilder_EN::getVariaveis_Uf(TextBuilder_EN::$idMunicipio, "T_FUND18M");
     //T_FUND18M - Mudou variável
     $t_medin25m_uf = TextBuilder_EN::getVariaveis_Uf(TextBuilder_EN::$idMunicipio, "T_MED18M");
     //T_MED18M - Mudou variável
     $e_anosesperados = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "E_ANOSESTUDO");
     //E_ANOSESTUDO
     $e_anosesperados_uf = TextBuilder_EN::getVariaveis_Uf(TextBuilder_EN::$idMunicipio, "E_ANOSESTUDO");
     //E_ANOSESTUDO
     $uf = TextBuilder_EN::getUf(TextBuilder_EN::$idMunicipio);
     //UF
     $block_populacao_adulta->setData("subtitulo", "Adult population");
     //@Translate
     $block_populacao_adulta->setData("fonte", TextBuilder_EN::$fontePerfil);
     $block_populacao_adulta->setData("info", "");
     //@Translate
     $str = "The educational level of the adult population is an important indicator in terms of access to knowledge – hence, it is part of MHDI Education.\n            <br><br>In 2010, [25_fund_10]% of the population aged 18 years or older had completed primary education and [25_medio_10]%\n            had completed secondary education. In [estado_municipio], [25_fund_10_Estado]% and [25_medio_10_Estado]%.\n            This indicator bears inertia - depending on the weight of the older and less-educated generation.\n            <br><br>The illiteracy rate of the population aged 18 years or older [diminuiu_aumentou] [25_analf_9110] in the last two decades.";
     $texto = new Texto($str);
     $texto->replaceTags("municipio", TextBuilder_EN::$nomeMunicipio);
     $texto->replaceTags("estado_municipio", $uf[0]["nome"]);
     $texto->replaceTags("25_fund_10", Formulas::get25Fund10($t_fundin25m));
     $texto->replaceTags("25_medio_10", Formulas::get25Medio10($t_medin25m));
     $texto->replaceTags("25_fund_10_Estado", Formulas::get25Fund10ESTADO($t_fundin25m_uf));
     $texto->replaceTags("25_medio_10_Estado", Formulas::get25Medio10ESTADO($t_medin25m_uf));
     $dif_analf = Formulas::getDifAnalf($t_analf25m);
     if ($dif_analf > 0) {
         $texto->replaceTags("diminuiu_aumentou", "increased");
         //@Translate
         $texto->replaceTags("25_analf_9110", number_format($dif_analf, 2, ",", ".") . "%");
     } else {
         if ($dif_analf == 0) {
             $texto->replaceTags("diminuiu_aumentou", "remained");
             //@Translate
             $texto->replaceTags("25_analf_9110", "");
         } else {
             if ($dif_analf < 0) {
                 $texto->replaceTags("diminuiu_aumentou", "decreased");
                 //@Translate
                 $texto->replaceTags("25_analf_9110", number_format(abs($dif_analf), 2, ",", ".") . "%");
             }
         }
     }
     $block_populacao_adulta->setData("text", $texto->getTexto());
     $block_populacao_adulta->setData("canvasContent", getChartEscolaridadePopulacao(TextBuilder_EN::$idMunicipio, TextBuilder_EN::$lang));
     $block_populacao_adulta->setData("subtitulo2", "Expected years of schooling");
     //@Translate
     $block_populacao_adulta->setData("info2", "");
     //@Translate
     $str2 = "The expected years of schooling indicates the number of years that a child who starts his/her school life in the reference year tends to attend.\n        In 2010, in [municipio], the expected years of schooling of the population was [e_anosestudo10] years; \n        in 2000, it was [e_anosestudo00] years and, in 1991, [e_anosestudo91] years. \n        The expected years of schooling in [estado_municipio] were [ufe_anosestudo10] years in 2010,\n        [ufe_anosestudo00] years in 2000 and [ufe_anosestudo91] years in 1991.";
     $texto2 = new Texto($str2);
     $texto2->replaceTags("municipio", TextBuilder_EN::$nomeMunicipio);
     $texto2->replaceTags("estado_municipio", $uf[0]["nome"]);
     $texto2->replaceTags("e_anosestudo10", Formulas::getEAnosEstudo10($e_anosesperados));
     $texto2->replaceTags("e_anosestudo00", Formulas::getEAnosEstudo00($e_anosesperados));
     $texto2->replaceTags("e_anosestudo91", Formulas::getEAnosEstudo91($e_anosesperados));
     $texto2->replaceTags("ufe_anosestudo10", Formulas::getEAnosEstudo10ESTADO($e_anosesperados_uf));
     $texto2->replaceTags("ufe_anosestudo00", Formulas::getEAnosEstudo00ESTADO($e_anosesperados_uf));
     $texto2->replaceTags("ufe_anosestudo91", Formulas::getEAnosEstudo91ESTADO($e_anosesperados_uf));
     $block_populacao_adulta->setData("text2", $texto2->getTexto());
 }
コード例 #2
0
 public static function generateEDUCACAO_populacao_adulta($block_populacao_adulta)
 {
     $t_analf25m = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "T_ANALF18M");
     //T_ANALF18M - Mudou variável
     $t_fundin25m = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "T_FUND18M");
     //T_FUND18M  - Mudou variável
     $t_medin25m = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "T_MED18M");
     //T_MED18M  - Mudou variável
     $t_fundin25m_uf = TextBuilder_ES::getVariaveis_Uf(TextBuilder_ES::$idMunicipio, "T_FUND18M");
     //T_FUND18M - Mudou variável
     $t_medin25m_uf = TextBuilder_ES::getVariaveis_Uf(TextBuilder_ES::$idMunicipio, "T_MED18M");
     //T_MED18M - Mudou variável
     $e_anosesperados = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "E_ANOSESTUDO");
     //E_ANOSESTUDO
     $e_anosesperados_uf = TextBuilder_ES::getVariaveis_Uf(TextBuilder_ES::$idMunicipio, "E_ANOSESTUDO");
     //E_ANOSESTUDO
     $uf = TextBuilder_ES::getUf(TextBuilder_ES::$idMunicipio);
     //UF
     $block_populacao_adulta->setData("subtitulo", "Población adulta");
     //@Translate
     $block_populacao_adulta->setData("fonte", TextBuilder_ES::$fontePerfil);
     $block_populacao_adulta->setData("info", "");
     //@Translate
     $str = "La escolaridad de la población adulta es un indicador importante de acceso al conocimiento y compone el IDHM Educación.\n            <br><br>En 2010, el [25_fund_10]% de la población de 18 años o más había terminado la educación primaria y el [25_medio_10]%,\n            la educación secundaria. En [estado_municipio], correspondían al [25_fund_10_Estado]% y al [25_medio_10_Estado]%, respectivamente.\n            Este indicador está sujeto a una gran inercia, debido al peso de las generaciones más antiguas y con menos escolaridad.\n            <br><br>La tasa de analfabetismo de la población de 18 años o más [diminuiu_aumentou] un [25_analf_9110] en las dos últimas décadas.";
     $texto = new Texto($str);
     $texto->replaceTags("municipio", TextBuilder_ES::$nomeMunicipio);
     $texto->replaceTags("estado_municipio", $uf[0]["nome"]);
     $texto->replaceTags("25_fund_10", Formulas::get25Fund10($t_fundin25m));
     $texto->replaceTags("25_medio_10", Formulas::get25Medio10($t_medin25m));
     $texto->replaceTags("25_fund_10_Estado", Formulas::get25Fund10ESTADO($t_fundin25m_uf));
     $texto->replaceTags("25_medio_10_Estado", Formulas::get25Medio10ESTADO($t_medin25m_uf));
     $dif_analf = Formulas::getDifAnalf($t_analf25m);
     if ($dif_analf > 0) {
         $texto->replaceTags("diminuiu_aumentou", "aumentó");
         //@Translate
         $texto->replaceTags("25_analf_9110", number_format($dif_analf, 2, ",", ".") . "%");
     } else {
         if ($dif_analf == 0) {
             $texto->replaceTags("diminuiu_aumentou", "permanecido");
             //@Translate
             $texto->replaceTags("25_analf_9110", "");
         } else {
             if ($dif_analf < 0) {
                 $texto->replaceTags("diminuiu_aumentou", "disminuyó");
                 //@Translate
                 $texto->replaceTags("25_analf_9110", number_format(abs($dif_analf), 2, ",", ".") . "%");
             }
         }
     }
     $block_populacao_adulta->setData("text", $texto->getTexto());
     $block_populacao_adulta->setData("canvasContent", getChartEscolaridadePopulacao(TextBuilder_ES::$idMunicipio, TextBuilder_ES::$lang));
     $block_populacao_adulta->setData("subtitulo2", "Años de estudio esperados");
     //@Translate
     $block_populacao_adulta->setData("info2", "");
     //@Translate
     $str2 = "Los años de estudio esperados indican el número de años que el niño que comienza la vida escolar en el año de referencia tiende a completar.\n        En 2010, [municipio] tenía [e_anosestudo10] años de estudio esperados, mientras que en el 2000 tenía \n        [e_anosestudo00] años y en 1991, [e_anosestudo91] años. \n        En tanto, [estado_municipio] tenía [ufe_anosestudo10] años de estudio esperados en 2010,\n        [ufe_anosestudo00] años en el 2000 y [ufe_anosestudo91] años en 1991.";
     $texto2 = new Texto($str2);
     $texto2->replaceTags("municipio", TextBuilder_ES::$nomeMunicipio);
     $texto2->replaceTags("estado_municipio", $uf[0]["nome"]);
     $texto2->replaceTags("e_anosestudo10", Formulas::getEAnosEstudo10($e_anosesperados));
     $texto2->replaceTags("e_anosestudo00", Formulas::getEAnosEstudo00($e_anosesperados));
     $texto2->replaceTags("e_anosestudo91", Formulas::getEAnosEstudo91($e_anosesperados));
     $texto2->replaceTags("ufe_anosestudo10", Formulas::getEAnosEstudo10ESTADO($e_anosesperados_uf));
     $texto2->replaceTags("ufe_anosestudo00", Formulas::getEAnosEstudo00ESTADO($e_anosesperados_uf));
     $texto2->replaceTags("ufe_anosestudo91", Formulas::getEAnosEstudo91ESTADO($e_anosesperados_uf));
     $block_populacao_adulta->setData("text2", $texto2->getTexto());
 }