public static function generateIDH_evolucao($block_evolucao)
 {
     $idhm = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM");
     //IDHM
     $idhm_uf = TextBuilder_EN::getVariaveis_Uf(TextBuilder_EN::$idMunicipio, "IDHM");
     //IDHM do Estado
     $idhm_brasil = TextBuilder_EN::getVariaveis_Brasil(TextBuilder_EN::$idMunicipio, "IDHM");
     //IDHM do Brasil
     $block_evolucao->setData("subtitulo", "Evolution");
     //@Translate
     $block_evolucao->setData("fonte", TextBuilder_EN::$fontePerfil);
     //----------------------------------------------------------------------------------------
     //Evolução entre os anos de 2000 e 2010
     $block_evolucao->setData("info1", "");
     //@Translate
     $str1 = "<b>Between 2000 and 2010</b><br>\n            The MHDI increased from [IDHM2000] in 2000 to [IDHM2010] in 2010 - growth rate being [Tx_crescimento_0010]%.\n            The gap of human development, in other words, the distance between the MHDI of the municipality and the maximum index value of 1, was\n            [reduzido_aumentado] em [reducao_hiato_0010]% between the years 2000 and 2010.<br><br>";
     $texto1 = new Texto($str1);
     $texto1->replaceTags("municipio", TextBuilder_EN::$nomeMunicipio);
     $texto1->replaceTags("IDHM2000", Formulas::getIDH2000($idhm));
     $texto1->replaceTags("IDHM2010", Formulas::getIDH2010($idhm));
     $texto1->replaceTags("Tx_crescimento_0010", Formulas::getTaxaCrescimento0010($idhm));
     //Cálculo do HIATO
     //$reducao_hiato_0010 = (($idhm[2]["valor"] - $idhm[1]["valor"]) / (1 - $idhm[1]["valor"])) * 100;
     $texto1->replaceTags("reducao_hiato_0010", Formulas::getReducaoHiato0010($idhm));
     if (Formulas::getReducaoHiato0010puro($idhm) >= 0) {
         $texto1->replaceTags("reduzido_aumentado", "reduced");
     } else {
         $texto1->replaceTags("reduzido_aumentado", "increased");
     }
     //@Translate
     $block_evolucao->setData("text1", $texto1->getTexto());
     //----------------------------------------------------------------------------------------
     //Evolução entre os anos de 1991 e 2000
     $block_evolucao->setData("info2", "");
     //@Translate
     $str2 = "<b>Between 1991 and 2000</b><br>\n            The MHDI increased from [IDHM1991] in 1991 to [IDHM2000] in 2000 - the growth rate being [Tx_crescimento_9100]%.\n            The human development gap, in other words, the distance between the MHDI of the municipality and the maximum index value of 1, was\n            [reduzido_aumentado] by [reducao_hiato_9100]% between the years 1991 and 2000.<br><br>";
     $texto2 = new Texto($str2);
     $texto2->replaceTags("municipio", TextBuilder_EN::$nomeMunicipio);
     $texto2->replaceTags("IDHM1991", Formulas::getIDH1991($idhm));
     $texto2->replaceTags("IDHM2000", Formulas::getIDH2000($idhm));
     $texto2->replaceTags("Tx_crescimento_9100", Formulas::getTaxaCrescimento9100($idhm));
     //Cálculo do HIATO
     //$reducao_hiato_9100 = (($idhm[1]["valor"] - $idhm[0]["valor"]) / (1 - $idhm[0]["valor"])) * 100;
     $texto2->replaceTags("reducao_hiato_9100", Formulas::getReducaoHiato9100($idhm));
     if (Formulas::getReducaoHiato9100puro($idhm) >= 0) {
         $texto2->replaceTags("reduzido_aumentado", "reduced");
     } else {
         $texto2->replaceTags("reduzido_aumentado", "increased");
     }
     //@Translate
     $block_evolucao->setData("text2", $texto2->getTexto());
     //----------------------------------------------------------------------------------------
     //Evolução entre os anos de 1991 e 2010
     $block_evolucao->setData("info3", "");
     //@Translate
     $str3 = "<b>Between 1991 and 2010</b><br>\n            The MHDI of [municipio] increased [Tx_crescimento_9110]% in the last two decades which was\n            [abaixo_acima] the average national growth ([tx_cresc_Brasil9110]%) and [abaixo_acima_uf] the average state growth ([tx_cresc_Estado9110]%).\n            The human development gap, in other words, the distance between the MHDI of the municipality and the maximum index (which is 1) was\n            [reduzido_aumentado] by [reducao_hiato_9110]% between 1991 and 2010.";
     $texto3 = new Texto($str3);
     $texto3->replaceTags("municipio", TextBuilder_EN::$nomeMunicipio);
     //Taxa de Crescimento
     $tx_cresc_9110 = Formulas::getTaxaCrescimento9110($idhm);
     $texto3->replaceTags("Tx_crescimento_9110", $tx_cresc_9110);
     //----------------------------------------
     //Taxa de Crescimento em relação ao BRASIL
     $tx_cresc_Brasil9110 = Formulas::getTaxaCrescimento9110BRASIL($idhm_brasil);
     if ($tx_cresc_Brasil9110 < $tx_cresc_9110) {
         $texto3->replaceTags("tx_cresc_Brasil9110", abs($tx_cresc_Brasil9110));
         $texto3->replaceTags("abaixo_acima", "above");
         //@Translate
     } else {
         if ($tx_cresc_Brasil9110 == $tx_cresc_9110) {
             $texto3->replaceTags("tx_cresc_Brasil9110", abs($tx_cresc_Brasil9110));
             $texto3->replaceTags("abaixo_acima", "equal to");
             //@Translate
         } else {
             if ($tx_cresc_Brasil9110 > $tx_cresc_9110) {
                 $texto3->replaceTags("tx_cresc_Brasil9110", abs($tx_cresc_Brasil9110));
                 $texto3->replaceTags("abaixo_acima", "below");
                 //@Translate
             }
         }
     }
     //----------------------------------------
     //Taxa de Crescimento em relação ao ESTADO
     $tx_cresc_Estado9110 = Formulas::getTaxaCrescimento9110ESTADO($idhm_uf);
     if ($tx_cresc_Estado9110 < $tx_cresc_9110) {
         $texto3->replaceTags("abaixo_acima_uf", "above");
         //@Translate
         $texto3->replaceTags("tx_cresc_Estado9110", abs($tx_cresc_Estado9110));
     } else {
         if ($tx_cresc_Estado9110 == $tx_cresc_9110) {
             $texto3->replaceTags("tx_cresc_Estado9110", abs($tx_cresc_Estado9110));
             $texto3->replaceTags("abaixo_acima_uf", "equal to");
             //@Translate
         } else {
             if ($tx_cresc_Estado9110 > $tx_cresc_9110) {
                 $texto3->replaceTags("abaixo_acima_uf", "below");
                 //@Translate
                 $texto3->replaceTags("tx_cresc_Estado9110", abs($tx_cresc_Estado9110));
             }
         }
     }
     //Cálculo do HIATO
     //$reducao_hiato_9110 = (($idhm[2]["valor"] - $idhm[0]["valor"]) / (1 - $idhm[0]["valor"])) * 100;
     $texto3->replaceTags("reducao_hiato_9110", Formulas::getReducaoHiato9110($idhm));
     if (Formulas::getReducaoHiato9110puro($idhm) >= 0) {
         $texto3->replaceTags("reduzido_aumentado", "reduced");
     } else {
         $texto3->replaceTags("reduzido_aumentado", "increased");
     }
     //@Translate
     $block_evolucao->setData("text3", $texto3->getTexto());
     if (TextBuilder_EN::$print) {
         $block_evolucao->setData("quebra", "<div style='page-break-after: always'></div>");
     } else {
         $block_evolucao->setData("quebra", "");
     }
     $block_evolucao->setData("canvasContent", getChartEvolucao(TextBuilder_EN::$idMunicipio, TextBuilder_EN::$lang));
 }
 public static function generateIDH_evolucao($block_evolucao)
 {
     $idhm = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM");
     //IDHM
     $idhm_uf = TextBuilder_ES::getVariaveis_Uf(TextBuilder_ES::$idMunicipio, "IDHM");
     //IDHM do Estado
     $idhm_brasil = TextBuilder_ES::getVariaveis_Brasil(TextBuilder_ES::$idMunicipio, "IDHM");
     //IDHM do Brasil
     $block_evolucao->setData("subtitulo", "Evolución");
     //@Translate
     $block_evolucao->setData("fonte", TextBuilder_ES::$fontePerfil);
     //----------------------------------------------------------------------------------------
     //Evolução entre os anos de 2000 e 2010
     $block_evolucao->setData("info1", "");
     //@Translate
     $str1 = "<b>Entre el 2000 y 2010</b><br>\n            El IDHM pasó de [IDHM2000] en el 2000 a [IDHM2010] en 2010 - un crecimiento de [Tx_crescimento_0010]%.\n            La brecha de desarrollo humano, es decir, la distancia entre el IDHM del municipio y el límite máximo del índice, equivalente a 1,\n            se [reduzido_aumentado] un [reducao_hiato_0010]% entre el 2000 y 2010.<br><br>";
     $texto1 = new Texto($str1);
     $texto1->replaceTags("municipio", TextBuilder_ES::$nomeMunicipio);
     $texto1->replaceTags("IDHM2000", Formulas::getIDH2000($idhm));
     $texto1->replaceTags("IDHM2010", Formulas::getIDH2010($idhm));
     $texto1->replaceTags("Tx_crescimento_0010", Formulas::getTaxaCrescimento0010($idhm));
     //Cálculo do HIATO
     //$reducao_hiato_0010 = (($idhm[2]["valor"] - $idhm[1]["valor"]) / (1 - $idhm[1]["valor"])) * 100;
     $texto1->replaceTags("reducao_hiato_0010", Formulas::getReducaoHiato0010($idhm));
     if (Formulas::getReducaoHiato0010puro($idhm) >= 0) {
         $texto1->replaceTags("reduzido_aumentado", "redujo");
     } else {
         $texto1->replaceTags("reduzido_aumentado", "creció");
     }
     //@Translate
     $block_evolucao->setData("text1", $texto1->getTexto());
     //----------------------------------------------------------------------------------------
     //Evolução entre os anos de 1991 e 2000
     $block_evolucao->setData("info2", "");
     //@Translate
     $str2 = "<b>Entre 1991 y el 2000</b><br>\n            El IDHM pasó de [IDHM1991] en el 1991 a [IDHM2000] en el 2000 - un crecimiento de [Tx_crescimento_9100]%.\n            La brecha de desarrollo humano, es decir, la distancia entre el IDHM del municipio y el límite máximo del índice, equivalente a 1,\n            se [reduzido_aumentado] un [reducao_hiato_9100]% entre 1991 y el 2000.<br><br>";
     $texto2 = new Texto($str2);
     $texto2->replaceTags("municipio", TextBuilder_ES::$nomeMunicipio);
     $texto2->replaceTags("IDHM1991", Formulas::getIDH1991($idhm));
     $texto2->replaceTags("IDHM2000", Formulas::getIDH2000($idhm));
     $texto2->replaceTags("Tx_crescimento_9100", Formulas::getTaxaCrescimento9100($idhm));
     //Cálculo do HIATO
     //$reducao_hiato_9100 = (($idhm[1]["valor"] - $idhm[0]["valor"]) / (1 - $idhm[0]["valor"])) * 100;
     $texto2->replaceTags("reducao_hiato_9100", Formulas::getReducaoHiato9100($idhm));
     if (Formulas::getReducaoHiato9100puro($idhm) >= 0) {
         $texto2->replaceTags("reduzido_aumentado", "redujo");
     } else {
         $texto2->replaceTags("reduzido_aumentado", "creció");
     }
     //@Translate
     $block_evolucao->setData("text2", $texto2->getTexto());
     //----------------------------------------------------------------------------------------
     //Evolução entre os anos de 1991 e 2010
     $block_evolucao->setData("info3", "");
     //@Translate
     $str3 = "<b>Entre 1991 y 2010</b><br>\n            El IDHM de [municipio] aumentó un [Tx_crescimento_9110]% en las dos últimas décadas,\n            porcentaje [abaixo_acima] al crecimiento promedio nacional ([tx_cresc_Brasil9110]%) y [abaixo_acima_uf] al crecimiento promedio estadual ([tx_cresc_Estado9110]%).\n            La brecha de desarrollo humano, es decir, la distancia entre el IDHM del municipio y el límite máximo del índice, equivalente a 1,\n            se [reduzido_aumentado] un [reducao_hiato_9110]% entre 1991 y 2010.";
     $texto3 = new Texto($str3);
     $texto3->replaceTags("municipio", TextBuilder_ES::$nomeMunicipio);
     //Taxa de Crescimento
     $tx_cresc_9110 = Formulas::getTaxaCrescimento9110($idhm);
     $texto3->replaceTags("Tx_crescimento_9110", $tx_cresc_9110);
     //----------------------------------------
     //Taxa de Crescimento em relação ao BRASIL
     $tx_cresc_Brasil9110 = Formulas::getTaxaCrescimento9110BRASIL($idhm_brasil);
     if ($tx_cresc_Brasil9110 < $tx_cresc_9110) {
         $texto3->replaceTags("tx_cresc_Brasil9110", abs($tx_cresc_Brasil9110));
         $texto3->replaceTags("abaixo_acima", "aumentó");
         //@Translate
     } else {
         if ($tx_cresc_Brasil9110 == $tx_cresc_9110) {
             $texto3->replaceTags("tx_cresc_Brasil9110", abs($tx_cresc_Brasil9110));
             $texto3->replaceTags("abaixo_acima", "igual");
             //@Translate
         } else {
             if ($tx_cresc_Brasil9110 > $tx_cresc_9110) {
                 $texto3->replaceTags("tx_cresc_Brasil9110", abs($tx_cresc_Brasil9110));
                 $texto3->replaceTags("abaixo_acima", "disminuyó");
                 //@Translate
             }
         }
     }
     //----------------------------------------
     //Taxa de Crescimento em relação ao ESTADO
     $tx_cresc_Estado9110 = Formulas::getTaxaCrescimento9110ESTADO($idhm_uf);
     if ($tx_cresc_Estado9110 < $tx_cresc_9110) {
         $texto3->replaceTags("abaixo_acima_uf", "aumentó");
         //@Translate
         $texto3->replaceTags("tx_cresc_Estado9110", abs($tx_cresc_Estado9110));
     } else {
         if ($tx_cresc_Estado9110 == $tx_cresc_9110) {
             $texto3->replaceTags("tx_cresc_Estado9110", abs($tx_cresc_Estado9110));
             $texto3->replaceTags("abaixo_acima_uf", "igual");
             //@Translate
         } else {
             if ($tx_cresc_Estado9110 > $tx_cresc_9110) {
                 $texto3->replaceTags("abaixo_acima_uf", "disminuyó");
                 //@Translate
                 $texto3->replaceTags("tx_cresc_Estado9110", abs($tx_cresc_Estado9110));
             }
         }
     }
     //Cálculo do HIATO
     //$reducao_hiato_9110 = (($idhm[2]["valor"] - $idhm[0]["valor"]) / (1 - $idhm[0]["valor"])) * 100;
     $texto3->replaceTags("reducao_hiato_9110", Formulas::getReducaoHiato9110($idhm));
     if (Formulas::getReducaoHiato9110puro($idhm) >= 0) {
         $texto3->replaceTags("reduzido_aumentado", "redujo");
     } else {
         $texto3->replaceTags("reduzido_aumentado", "creció");
     }
     //@Translate
     $block_evolucao->setData("text3", $texto3->getTexto());
     if (TextBuilder_ES::$print) {
         $block_evolucao->setData("quebra", "<div style='page-break-after: always'></div>");
     } else {
         $block_evolucao->setData("quebra", "");
     }
     $block_evolucao->setData("canvasContent", getChartEvolucao(TextBuilder_ES::$idMunicipio, TextBuilder_ES::$lang));
 }