{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Cartografia"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Visualizações cartográficas mapeiam dados em posições reais no globo. Aplicações comuns incluem localizações, rotas e trajetórias na superfície do planeta. Para \"planificar\" uma esfera tridimensional em um plano bidimensional, nós devemos mapear pares de $(longitude, latitude)$ em coordenadas $(x,y)$.\n",
    "\n",
    "<p align=\"justify\" style=\"text-align: justify;\">Projeções são como uma escala, mapeando um domínio espacial para uma variável visual, comumente posição. Vamos aprender como relacionar esse domínio novo com os dados que estão relacionados com eles utilizando Altair. </p>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Nesse notebook vamos focar em Técnicas de Geo-Visualização, como pontos, símbolos e Mapas Choropleth."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import altair as alt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "url = \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/completo.csv\"\n",
    "meta_url = \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/metadados.csv\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv(\"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/dados.csv\")\n",
    "meta_df = pd.read_csv(meta_url)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "para_geo = \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\"\n",
    "para_topo = \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_topo.json\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Criando um mapa"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<p align=\"justify\" style=\"text-align: justify;\">Até agora vimos dados em formatos tabulares, descrito em termo de linhas e colunas, que não é um formato comum para mapas. Para criar mapas vamos utilizar formatos específicos que descrevem as regiões geográficas e trajetórias. <a href=\"https://en.wikipedia.org/wiki/GeoJSON\">GeoJSON</a> e <a href=\"https://github.com/topojson/topojson\">TopoJSON</a> são formatos que descrevem características geográficas, extendendo o formato JSON, utilizando campos como <em>features</em>, <em>latitude</em> e <em>longitude</em>. </p>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<p align=\"justify\" style=\"text-align: justify;\">Vamos usar um arquivo TopoJSON, do repositório <a href=\"https://github.com/marcelodeandrade/topojson-brasil\">TopoJSON - Brasil</a>, com as cidades do estado do Pará. Abra o arquivo e veja a estrutura dele, como organiza em arcos. Procure o atribute <b>objects</b>, e dentro dele tem a informação sobre cidades no atributo 15 (referente ao código do estado). Vamos precisar desse atributo para criar nosso mapa. </p>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Vamos criar um mapa usando `mark_geoshape()`. No lugar dos dados, vamos utilizar a função `alt.topo_feature` para utilizar a especificação no formato correto. Vamos indicar o `15` como o atributo que contém nossas cidades."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-89c8d946cd9249f4a6988523d0ccd678\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-89c8d946cd9249f4a6988523d0ccd678\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-89c8d946cd9249f4a6988523d0ccd678\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_topo.json\", \"format\": {\"feature\": \"15\", \"type\": \"topojson\"}}, \"mark\": \"geoshape\", \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\"}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.Chart(...)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alt.Chart(alt.topo_feature(para_topo,\"15\")).mark_geoshape()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<p align=\"justify\" style=\"text-align: justify;\">Abrindo esse arquivo vemos que não tem informação alguma sobre as cidades, só a descrição da topologia. Enquanto é plausível usar ele para visualizar o mapa como está, vamos usar um GeoJSON para conseguir ligar nossos dados pelo nome das cidades. O GeoJSON que vamos usar é do repositório <a href=\"https://github.com/tbrugz/geodata-br\"> Geodata BR - Brasil</a>, que além da informação regional, também tem o nome das cidades.</p>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Usando esse GeoJSON não precisamos fazer nenhuma modificação extra para carregar nosso mapa."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-b22339328ab7468183be00bb1a3a604a\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-b22339328ab7468183be00bb1a3a604a\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-b22339328ab7468183be00bb1a3a604a\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\"}, \"mark\": \"geoshape\", \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\"}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.Chart(...)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alt.Chart(para_geo).mark_geoshape()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Não temos as bordas municipais, mas vamos mexer um pouco no estilo com `stroke` e `fill` para fazer tudo ficar vísivel."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-ab5987714f0d423ab24643ed6243d706\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-ab5987714f0d423ab24643ed6243d706\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-ab5987714f0d423ab24643ed6243d706\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\"}, \"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#ddd\", \"strokeWidth\": 0.3}, \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\"}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.Chart(...)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alt.Chart(para_geo).mark_geoshape(\n",
    "    stroke=\"#ddd\",\n",
    "    strokeWidth=0.3,\n",
    "    color=\"darkgrey\",\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<p align=\"justify\" style=\"text-align: justify;\"> Além dos variáveis visuais que já vimos, Altair conta com as variáveis $(latitude,longitude)$ que respeita a projeção do mapa, e podem ser mapeados sem a necessidade de uma marca visual específica. Mesmo utilizando mapas descritos em formatos geográficos, muitos conjuntos de dados tabulares contém informação geográfica na forma de coordenadas $(latitude, longitude)$ ou referências para regiões geográficas, como nome de países, nome de cidades, código postal, que podem ser mapeados para coordenadas usando um serviço de geolocalização.</p> Em alguns casos, é suficiente projetar os dados tabelados, sem um mapa servindo como base."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Vamos mostrar as cidades sem carregar o arquivo com a topologia dos mapas."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-f46634be29314e79a5f02346c3ebec57\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-f46634be29314e79a5f02346c3ebec57\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-f46634be29314e79a5f02346c3ebec57\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"data\": {\"name\": \"data-3373d2081460d8423013c25780e6c9fa\"}, \"mark\": {\"type\": \"circle\", \"size\": 50}, \"encoding\": {\"latitude\": {\"field\": \"LATITUDE\", \"type\": \"quantitative\"}, \"longitude\": {\"field\": \"LONGITUDE\", \"type\": \"quantitative\"}}, \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\", \"datasets\": {\"data-3373d2081460d8423013c25780e6c9fa\": [{\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Bel\\u00e9m\", \"CODIGO (WMO)\": \"A201\", \"LATITUDE\": -1.411228, \"LONGITUDE\": -48.439512, \"ALTITUDE\": 21.17, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"20/01/03\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Castanhal\", \"CODIGO (WMO)\": \"A202\", \"LATITUDE\": -1.300875, \"LONGITUDE\": -47.947967, \"ALTITUDE\": 47.13, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"24/01/03\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Medicil\\u00e2ndia\", \"CODIGO (WMO)\": \"A209\", \"LATITUDE\": -3.510943, \"LONGITUDE\": -52.96345, \"ALTITUDE\": 251.68, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"17/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Pacaj\\u00e1\", \"CODIGO (WMO)\": \"A210\", \"LATITUDE\": -3.8436111, \"LONGITUDE\": -50.63805555, \"ALTITUDE\": 89.02, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"27/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Placas\", \"CODIGO (WMO)\": \"A211\", \"LATITUDE\": -3.86404, \"LONGITUDE\": -54.216416, \"ALTITUDE\": 100.45, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"14/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Paragominas\", \"CODIGO (WMO)\": \"A212\", \"LATITUDE\": -2.99027777, \"LONGITUDE\": -47.40777777, \"ALTITUDE\": 113.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"18/10/07\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Tom\\u00e9-A\\u00e7u\", \"CODIGO (WMO)\": \"A213\", \"LATITUDE\": -2.59249999, \"LONGITUDE\": -48.36055555, \"ALTITUDE\": 42.95, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"14/10/07\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Rondon do Par\\u00e1\", \"CODIGO (WMO)\": \"A214\", \"LATITUDE\": -4.827501, \"LONGITUDE\": -48.173556, \"ALTITUDE\": 203.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"17/04/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Salin\\u00f3polis\", \"CODIGO (WMO)\": \"A215\", \"LATITUDE\": -0.618884, \"LONGITUDE\": -47.356596, \"ALTITUDE\": 23.18, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"14/06/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"S\\u00e3o F\\u00e9lix do Xingu\", \"CODIGO (WMO)\": \"A216\", \"LATITUDE\": -6.639622, \"LONGITUDE\": -51.956966, \"ALTITUDE\": 211.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"15/11/16\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Bragan\\u00e7a\", \"CODIGO (WMO)\": \"A226\", \"LATITUDE\": -1.047258, \"LONGITUDE\": -46.78579000000001, \"ALTITUDE\": 41.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"11/03/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Soure\", \"CODIGO (WMO)\": \"A227\", \"LATITUDE\": -0.72777777, \"LONGITUDE\": -48.51583333, \"ALTITUDE\": 12.54, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"27/04/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Breves\", \"CODIGO (WMO)\": \"A228\", \"LATITUDE\": -1.680251, \"LONGITUDE\": -50.478139, \"ALTITUDE\": 11.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"20/10/17\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Tucuru\\u00ed\", \"CODIGO (WMO)\": \"A229\", \"LATITUDE\": -3.82276, \"LONGITUDE\": -49.674956, \"ALTITUDE\": 137.94, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"01/03/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"SERRA DOS CARAJAS\", \"CODIGO (WMO)\": \"A230\", \"LATITUDE\": -6.077426999999999, \"LONGITUDE\": -50.142265, \"ALTITUDE\": 707.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"03/09/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Itaituba\", \"CODIGO (WMO)\": \"A231\", \"LATITUDE\": -4.27694443, \"LONGITUDE\": -55.99305555, \"ALTITUDE\": 24.46, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"17/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"\\u00d3bidos\", \"CODIGO (WMO)\": \"A232\", \"LATITUDE\": -1.880789, \"LONGITUDE\": -55.519856, \"ALTITUDE\": 89.64, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"05/07/12\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Santana do Araguaia\", \"CODIGO (WMO)\": \"A233\", \"LATITUDE\": -9.338611, \"LONGITUDE\": -50.35028, \"ALTITUDE\": 176.75, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"30/05/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Tucum\\u00e3\", \"CODIGO (WMO)\": \"A234\", \"LATITUDE\": -6.743208, \"LONGITUDE\": -51.141899, \"ALTITUDE\": 320.93, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"18/07/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Novo Repartimento\", \"CODIGO (WMO)\": \"A235\", \"LATITUDE\": -4.243989, \"LONGITUDE\": -49.939308, \"ALTITUDE\": 100.76, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"23/07/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Camet\\u00e1\", \"CODIGO (WMO)\": \"A236\", \"LATITUDE\": -2.239653, \"LONGITUDE\": -49.499827, \"ALTITUDE\": 9.92, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"20/06/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Monte Alegre\", \"CODIGO (WMO)\": \"A239\", \"LATITUDE\": -2.000054, \"LONGITUDE\": -54.076479000000006, \"ALTITUDE\": 100.53, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"06/07/12\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Marab\\u00e1\", \"CODIGO (WMO)\": \"A240\", \"LATITUDE\": -5.366447, \"LONGITUDE\": -49.051166, \"ALTITUDE\": 116.58, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"25/06/09\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Concei\\u00e7\\u00e3o do Araguaia\", \"CODIGO (WMO)\": \"A241\", \"LATITUDE\": -8.30361, \"LONGITUDE\": -49.28277, \"ALTITUDE\": 175.74, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"04/09/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"MINA DO PALITO\", \"CODIGO (WMO)\": \"A246\", \"LATITUDE\": -6.320067, \"LONGITUDE\": -55.787783, \"ALTITUDE\": 259.88, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"28/09/10\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Xinguara\", \"CODIGO (WMO)\": \"A247\", \"LATITUDE\": -7.110517999999999, \"LONGITUDE\": -49.926072, \"ALTITUDE\": 245.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"11/09/16\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Capit\\u00e3o Po\\u00e7o\", \"CODIGO (WMO)\": \"A248\", \"LATITUDE\": -1.734766, \"LONGITUDE\": -47.0575, \"ALTITUDE\": 79.1, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"18/04/11\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Santar\\u00e9m\", \"CODIGO (WMO)\": \"A250\", \"LATITUDE\": -2.502572, \"LONGITUDE\": -54.72027900000001, \"ALTITUDE\": 137.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"02/09/15\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Dom Eliseu\", \"CODIGO (WMO)\": \"A252\", \"LATITUDE\": -4.280556, \"LONGITUDE\": -47.563972, \"ALTITUDE\": 251.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"08/03/18\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Altamira\", \"CODIGO (WMO)\": \"A253\", \"LATITUDE\": -3.27027777, \"LONGITUDE\": -52.39472221, \"ALTITUDE\": 191.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"25/10/18\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Reden\\u00e7\\u00e3o\", \"CODIGO (WMO)\": \"A254\", \"LATITUDE\": -8.04333333, \"LONGITUDE\": -50.00694444, \"ALTITUDE\": 199.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"11/07/19\"}]}}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.Chart(...)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alt.Chart(meta_df).mark_circle(size=50).encode(\n",
    "    latitude=\"LATITUDE:Q\",\n",
    "    longitude=\"LONGITUDE:Q\"\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Mapas de Símbolos"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Usando os dois tipos de mapas que já vimos, conseguimos juntar ambos por meio de camadas, criando um mapa de símbolos."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-be29b411c7414ed0985534c735ce4035\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-be29b411c7414ed0985534c735ce4035\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-be29b411c7414ed0985534c735ce4035\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300, \"strokeWidth\": 0}}, \"layer\": [{\"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\"}, \"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#ddd\", \"strokeWidth\": 0.3}}, {\"data\": {\"name\": \"data-3373d2081460d8423013c25780e6c9fa\"}, \"mark\": {\"type\": \"circle\", \"size\": 50}, \"encoding\": {\"latitude\": {\"field\": \"LATITUDE\", \"type\": \"quantitative\"}, \"longitude\": {\"field\": \"LONGITUDE\", \"type\": \"quantitative\"}}}], \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\", \"datasets\": {\"data-3373d2081460d8423013c25780e6c9fa\": [{\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Bel\\u00e9m\", \"CODIGO (WMO)\": \"A201\", \"LATITUDE\": -1.411228, \"LONGITUDE\": -48.439512, \"ALTITUDE\": 21.17, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"20/01/03\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Castanhal\", \"CODIGO (WMO)\": \"A202\", \"LATITUDE\": -1.300875, \"LONGITUDE\": -47.947967, \"ALTITUDE\": 47.13, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"24/01/03\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Medicil\\u00e2ndia\", \"CODIGO (WMO)\": \"A209\", \"LATITUDE\": -3.510943, \"LONGITUDE\": -52.96345, \"ALTITUDE\": 251.68, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"17/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Pacaj\\u00e1\", \"CODIGO (WMO)\": \"A210\", \"LATITUDE\": -3.8436111, \"LONGITUDE\": -50.63805555, \"ALTITUDE\": 89.02, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"27/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Placas\", \"CODIGO (WMO)\": \"A211\", \"LATITUDE\": -3.86404, \"LONGITUDE\": -54.216416, \"ALTITUDE\": 100.45, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"14/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Paragominas\", \"CODIGO (WMO)\": \"A212\", \"LATITUDE\": -2.99027777, \"LONGITUDE\": -47.40777777, \"ALTITUDE\": 113.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"18/10/07\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Tom\\u00e9-A\\u00e7u\", \"CODIGO (WMO)\": \"A213\", \"LATITUDE\": -2.59249999, \"LONGITUDE\": -48.36055555, \"ALTITUDE\": 42.95, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"14/10/07\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Rondon do Par\\u00e1\", \"CODIGO (WMO)\": \"A214\", \"LATITUDE\": -4.827501, \"LONGITUDE\": -48.173556, \"ALTITUDE\": 203.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"17/04/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Salin\\u00f3polis\", \"CODIGO (WMO)\": \"A215\", \"LATITUDE\": -0.618884, \"LONGITUDE\": -47.356596, \"ALTITUDE\": 23.18, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"14/06/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"S\\u00e3o F\\u00e9lix do Xingu\", \"CODIGO (WMO)\": \"A216\", \"LATITUDE\": -6.639622, \"LONGITUDE\": -51.956966, \"ALTITUDE\": 211.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"15/11/16\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Bragan\\u00e7a\", \"CODIGO (WMO)\": \"A226\", \"LATITUDE\": -1.047258, \"LONGITUDE\": -46.78579000000001, \"ALTITUDE\": 41.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"11/03/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Soure\", \"CODIGO (WMO)\": \"A227\", \"LATITUDE\": -0.72777777, \"LONGITUDE\": -48.51583333, \"ALTITUDE\": 12.54, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"27/04/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Breves\", \"CODIGO (WMO)\": \"A228\", \"LATITUDE\": -1.680251, \"LONGITUDE\": -50.478139, \"ALTITUDE\": 11.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"20/10/17\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Tucuru\\u00ed\", \"CODIGO (WMO)\": \"A229\", \"LATITUDE\": -3.82276, \"LONGITUDE\": -49.674956, \"ALTITUDE\": 137.94, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"01/03/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"SERRA DOS CARAJAS\", \"CODIGO (WMO)\": \"A230\", \"LATITUDE\": -6.077426999999999, \"LONGITUDE\": -50.142265, \"ALTITUDE\": 707.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"03/09/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Itaituba\", \"CODIGO (WMO)\": \"A231\", \"LATITUDE\": -4.27694443, \"LONGITUDE\": -55.99305555, \"ALTITUDE\": 24.46, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"17/02/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"\\u00d3bidos\", \"CODIGO (WMO)\": \"A232\", \"LATITUDE\": -1.880789, \"LONGITUDE\": -55.519856, \"ALTITUDE\": 89.64, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"05/07/12\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Santana do Araguaia\", \"CODIGO (WMO)\": \"A233\", \"LATITUDE\": -9.338611, \"LONGITUDE\": -50.35028, \"ALTITUDE\": 176.75, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"30/05/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Tucum\\u00e3\", \"CODIGO (WMO)\": \"A234\", \"LATITUDE\": -6.743208, \"LONGITUDE\": -51.141899, \"ALTITUDE\": 320.93, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"18/07/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Novo Repartimento\", \"CODIGO (WMO)\": \"A235\", \"LATITUDE\": -4.243989, \"LONGITUDE\": -49.939308, \"ALTITUDE\": 100.76, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"23/07/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Camet\\u00e1\", \"CODIGO (WMO)\": \"A236\", \"LATITUDE\": -2.239653, \"LONGITUDE\": -49.499827, \"ALTITUDE\": 9.92, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"20/06/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Monte Alegre\", \"CODIGO (WMO)\": \"A239\", \"LATITUDE\": -2.000054, \"LONGITUDE\": -54.076479000000006, \"ALTITUDE\": 100.53, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"06/07/12\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Marab\\u00e1\", \"CODIGO (WMO)\": \"A240\", \"LATITUDE\": -5.366447, \"LONGITUDE\": -49.051166, \"ALTITUDE\": 116.58, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"25/06/09\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Concei\\u00e7\\u00e3o do Araguaia\", \"CODIGO (WMO)\": \"A241\", \"LATITUDE\": -8.30361, \"LONGITUDE\": -49.28277, \"ALTITUDE\": 175.74, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"04/09/08\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"MINA DO PALITO\", \"CODIGO (WMO)\": \"A246\", \"LATITUDE\": -6.320067, \"LONGITUDE\": -55.787783, \"ALTITUDE\": 259.88, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"28/09/10\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Xinguara\", \"CODIGO (WMO)\": \"A247\", \"LATITUDE\": -7.110517999999999, \"LONGITUDE\": -49.926072, \"ALTITUDE\": 245.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"11/09/16\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Capit\\u00e3o Po\\u00e7o\", \"CODIGO (WMO)\": \"A248\", \"LATITUDE\": -1.734766, \"LONGITUDE\": -47.0575, \"ALTITUDE\": 79.1, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"18/04/11\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Santar\\u00e9m\", \"CODIGO (WMO)\": \"A250\", \"LATITUDE\": -2.502572, \"LONGITUDE\": -54.72027900000001, \"ALTITUDE\": 137.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"02/09/15\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Dom Eliseu\", \"CODIGO (WMO)\": \"A252\", \"LATITUDE\": -4.280556, \"LONGITUDE\": -47.563972, \"ALTITUDE\": 251.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"08/03/18\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Altamira\", \"CODIGO (WMO)\": \"A253\", \"LATITUDE\": -3.27027777, \"LONGITUDE\": -52.39472221, \"ALTITUDE\": 191.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"25/10/18\"}, {\"REGI\\u00c3O\": \"N\", \"UF\": \"PA\", \"ESTA\\u00c7\\u00c3O\": \"Reden\\u00e7\\u00e3o\", \"CODIGO (WMO)\": \"A254\", \"LATITUDE\": -8.04333333, \"LONGITUDE\": -50.00694444, \"ALTITUDE\": 199.0, \"DATA DE FUNDA\\u00c7\\u00c3O\": \"11/07/19\"}]}}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.LayerChart(...)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alt.layer(\n",
    "    alt.Chart(para_geo).mark_geoshape(\n",
    "        stroke=\"#ddd\",\n",
    "        strokeWidth=0.3,\n",
    "        color=\"darkgrey\",\n",
    "    ),\n",
    "    alt.Chart(meta_df).mark_circle(size=50).encode(\n",
    "        latitude=\"LATITUDE:Q\",\n",
    "        longitude=\"LONGITUDE:Q\"\n",
    "    )\n",
    ").configure_view(\n",
    "    strokeWidth=0 # adicionando pra evitar que o frame da visualização apareça\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "O nosso símbolo de exemplo aqui é um círculo, e com os dois mapas conectados, vamos tirar o arquivo de metadados e usar o nosso conjunto de sensores. Para isso, vamos usar uma transformação que conecta dois conjunto de dados."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Usando `transform_lookup` podemos definir um campo ($lookup$) na lista de cidades com suas posições, que serve como chave primária para conectar em outro conjunto de dados, o nosso conjutno de sensores. A __ordem das transformações__ importa muito, usando a agregação primeiro e a ligação depois.\n",
    "\n",
    "Vamos aplicar essas transformações e ver nosso novo mapa conectado."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-1e4d8c23d2a5431ab3ae9bdf99adb0ca\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-1e4d8c23d2a5431ab3ae9bdf99adb0ca\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-1e4d8c23d2a5431ab3ae9bdf99adb0ca\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300, \"strokeWidth\": 0}}, \"concat\": [{\"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\"}, \"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#ddd\", \"strokeWidth\": 0.3}}, {\"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/completo.csv\"}, \"mark\": \"circle\", \"encoding\": {\"latitude\": {\"field\": \"LATITUDE\", \"type\": \"quantitative\"}, \"longitude\": {\"field\": \"LONGITUDE\", \"type\": \"quantitative\"}, \"tooltip\": [{\"type\": \"nominal\", \"field\": \"Cidade\"}, {\"type\": \"quantitative\", \"field\": \"valor\"}]}, \"transform\": [{\"filter\": \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"}, {\"aggregate\": [{\"op\": \"average\", \"field\": \"Precipita\\u00e7\\u00e3o\", \"as\": \"valor\"}], \"groupby\": [\"Cidade\"]}, {\"lookup\": \"Cidade\", \"from\": {\"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/metadados.csv\"}, \"key\": \"ESTA\\u00c7\\u00c3O\", \"fields\": [\"REGI\\u00c3O\", \"UF\", \"ESTA\\u00c7\\u00c3O\", \"CODIGO (WMO)\", \"LATITUDE\", \"LONGITUDE\", \"ALTITUDE\", \"DATA DE FUNDA\\u00c7\\u00c3O\"]}}]}], \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\"}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.ConcatChart(...)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alt.concat(\n",
    "    alt.Chart(para_geo).mark_geoshape(\n",
    "        stroke=\"#ddd\", strokeWidth=0.3, color=\"darkgrey\",\n",
    "    ),\n",
    "    alt.Chart(url).mark_circle().transform_filter(\n",
    "        \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\" # tirando da análise lugares que não são cidades\n",
    "    ).transform_aggregate(\n",
    "        groupby=[\"Cidade\"],\n",
    "        valor=\"average(Precipitação)\"\n",
    "    ).transform_lookup(\n",
    "        lookup=\"Cidade\",\n",
    "        from_=alt.LookupData(data=meta_url, key='ESTAÇÃO', fields=list(meta_df.columns))\n",
    "    ).encode(\n",
    "        latitude=\"LATITUDE:Q\",\n",
    "        longitude=\"LONGITUDE:Q\",\n",
    "        tooltip=['Cidade:N', 'valor:Q']\n",
    "    )\n",
    ").configure_view(\n",
    "    strokeWidth=0\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Agora podemos escolher um atributo e mapear para o tamanho dos nossos círculos."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-b386f811fcbf47a6a8276df19e1f39e9\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-b386f811fcbf47a6a8276df19e1f39e9\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-b386f811fcbf47a6a8276df19e1f39e9\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300, \"strokeWidth\": 0}}, \"layer\": [{\"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\"}, \"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#ddd\", \"strokeWidth\": 0.3}}, {\"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/completo.csv\"}, \"mark\": \"circle\", \"encoding\": {\"latitude\": {\"field\": \"LATITUDE\", \"type\": \"quantitative\"}, \"longitude\": {\"field\": \"LONGITUDE\", \"type\": \"quantitative\"}, \"size\": {\"type\": \"quantitative\", \"field\": \"valor\", \"legend\": null, \"scale\": {\"range\": [0, 1000]}}, \"tooltip\": [{\"type\": \"nominal\", \"field\": \"Cidade\"}, {\"type\": \"quantitative\", \"field\": \"valor\"}]}, \"transform\": [{\"filter\": \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"}, {\"aggregate\": [{\"op\": \"average\", \"field\": \"Precipita\\u00e7\\u00e3o\", \"as\": \"valor\"}], \"groupby\": [\"Cidade\"]}, {\"lookup\": \"Cidade\", \"from\": {\"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/metadados.csv\"}, \"key\": \"ESTA\\u00c7\\u00c3O\", \"fields\": [\"REGI\\u00c3O\", \"UF\", \"ESTA\\u00c7\\u00c3O\", \"CODIGO (WMO)\", \"LATITUDE\", \"LONGITUDE\", \"ALTITUDE\", \"DATA DE FUNDA\\u00c7\\u00c3O\"]}}]}], \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\"}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.LayerChart(...)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alt.layer(\n",
    "    alt.Chart(para_geo).mark_geoshape(\n",
    "        stroke=\"#ddd\", strokeWidth=0.3, color=\"darkgrey\",\n",
    "    ),\n",
    "    alt.Chart(url).mark_circle().transform_filter(\n",
    "        \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"\n",
    "    ).transform_aggregate(\n",
    "        groupby=[\"Cidade\"],\n",
    "        valor=\"average(Precipitação)\"\n",
    "    ).transform_lookup(\n",
    "        lookup=\"Cidade\",\n",
    "        from_=alt.LookupData(data=meta_url, key='ESTAÇÃO', fields=list(meta_df.columns))\n",
    "    ).encode(\n",
    "        latitude=\"LATITUDE:Q\",\n",
    "        longitude=\"LONGITUDE:Q\",\n",
    "        tooltip=['Cidade:N', 'valor:Q'],\n",
    "        size=alt.Size('valor:Q', scale=alt.Scale(range=[0, 1000]), legend=None)\n",
    "    )\n",
    ").configure_view(\n",
    "    strokeWidth=0\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "_Conseguimos ver alguns pontos maiores no nordeste paraense, indicando maior precipitação._"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Mapas Choropleth"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<p align=\"justify\" style=\"text-align: justify;\">Um Mapa Choropleth usa core ou texturas diretamente sobre regiões para mapear valores. Mesmo que um mapa de símbolos na maioria das vezes seja mais eficiente, mapas choropleth são muito populares, e úteis quando muitos há muitos símbolos no mapa atrapalhando a percepção.</p>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<p align=\"justify\" style=\"text-align: justify;\">O modo em que o Altair trata os formatos geográficos pede que os dados passem por processamento antes de criar a especificação. Vamos criar um novo dataframe, já com as médias dos valores calculadas. </p>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_completo = pd.read_csv(url)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_aggr = df_completo.groupby([\"Cidade\"]).mean() # agrupar pela média\n",
    "df_aggr.reset_index(level=0, inplace=True) # criar uma coluna de cidade, tirando cidade do indíce"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Temos que adicionar informação em como o GeoJSON tem que ser interpretado, adicionando no cabeçaçho dos dados o formato correto de leitura. Criamos um atalho também, usando `transform_calculate`, para indicar o nome da cidade dentro do GeoJSON. \n",
    "\n",
    "Vamos apresentar o nosso Mapa Choropleth."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-542fdd06b8384cc698fda1f0ba614e1a\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-542fdd06b8384cc698fda1f0ba614e1a\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-542fdd06b8384cc698fda1f0ba614e1a\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300, \"strokeWidth\": 0}}, \"layer\": [{\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"height\": 500, \"transform\": [{\"calculate\": \"datum.properties.name\", \"as\": \"nome\"}, {\"lookup\": \"nome\", \"from\": {\"data\": {\"name\": \"data-b0404002fce03bd67150978ebb6c4b7a\"}, \"key\": \"Cidade\", \"fields\": [\"Cidade\", \"Precipita\\u00e7\\u00e3o\", \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\", \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\", \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\", \"Radia\\u00e7\\u00e3o Global\", \"Temperatura do ar - bulbo seco\", \"Temperatura do ponto de orvalho\", \"Temperatura m\\u00e1xima\", \"Temperatura m\\u00ednima\", \"Temperatura orvalho m\\u00e1xima\", \"Temperatura orvalho m\\u00ednima\", \"Umidade Relativa m\\u00e1xima\", \"Umidade Relativa m\\u00ednima\", \"Umidade Relativa do Ar\", \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\", \"Rajada M\\u00e1xima de Vento\", \"Velocidade Hor\\u00e1ria do Vento\"]}}, {\"filter\": \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"}], \"width\": 650}, {\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"color\": {\"type\": \"quantitative\", \"field\": \"Precipita\\u00e7\\u00e3o\"}, \"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"height\": 500, \"transform\": [{\"calculate\": \"datum.properties.name\", \"as\": \"nome\"}, {\"lookup\": \"nome\", \"from\": {\"data\": {\"name\": \"data-b0404002fce03bd67150978ebb6c4b7a\"}, \"key\": \"Cidade\", \"fields\": [\"Cidade\", \"Precipita\\u00e7\\u00e3o\", \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\", \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\", \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\", \"Radia\\u00e7\\u00e3o Global\", \"Temperatura do ar - bulbo seco\", \"Temperatura do ponto de orvalho\", \"Temperatura m\\u00e1xima\", \"Temperatura m\\u00ednima\", \"Temperatura orvalho m\\u00e1xima\", \"Temperatura orvalho m\\u00ednima\", \"Umidade Relativa m\\u00e1xima\", \"Umidade Relativa m\\u00ednima\", \"Umidade Relativa do Ar\", \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\", \"Rajada M\\u00e1xima de Vento\", \"Velocidade Hor\\u00e1ria do Vento\"]}}, {\"filter\": \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"}], \"width\": 650}], \"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\", \"format\": {\"property\": \"features\", \"type\": \"json\"}}, \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\", \"datasets\": {\"data-b0404002fce03bd67150978ebb6c4b7a\": [{\"Cidade\": \"Altamira\", \"Precipita\\u00e7\\u00e3o\": 0.20530710282511797, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 989.9399062106858, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 990.2417362461454, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 989.6382019901637, \"Radia\\u00e7\\u00e3o Global\": 1074.2224043715846, \"Temperatura do ar - bulbo seco\": 26.035456936978154, \"Temperatura do ponto de orvalho\": 22.72755347134844, \"Temperatura m\\u00e1xima\": 26.61011094589944, \"Temperatura m\\u00ednima\": 25.50756033398146, \"Temperatura orvalho m\\u00e1xima\": 23.218837927484792, \"Temperatura orvalho m\\u00ednima\": 22.302950932174376, \"Umidade Relativa m\\u00e1xima\": 86.16012810248199, \"Umidade Relativa m\\u00ednima\": 80.40032025620496, \"Umidade Relativa do Ar\": 83.34782111403409, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 130.3518094365552, \"Rajada M\\u00e1xima de Vento\": 2.9547130912839275, \"Velocidade Hor\\u00e1ria do Vento\": 0.8987978016945245}, {\"Cidade\": \"Bel\\u00e9m\", \"Precipita\\u00e7\\u00e3o\": 0.4879387218474888, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1009.166136961242, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1009.4562364239182, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1008.8733508631577, \"Radia\\u00e7\\u00e3o Global\": 616.1213215959762, \"Temperatura do ar - bulbo seco\": 26.80990280160102, \"Temperatura do ponto de orvalho\": 23.095586049170915, \"Temperatura m\\u00e1xima\": 27.38919382504293, \"Temperatura m\\u00ednima\": 26.23517438536311, \"Temperatura orvalho m\\u00e1xima\": 23.54133790737559, \"Temperatura orvalho m\\u00ednima\": 22.62925100057173, \"Umidade Relativa m\\u00e1xima\": 83.64136275294386, \"Umidade Relativa m\\u00ednima\": 78.58385732251058, \"Umidade Relativa do Ar\": 81.24171049622684, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 115.4560420715674, \"Rajada M\\u00e1xima de Vento\": 3.1993026180404702, \"Velocidade Hor\\u00e1ria do Vento\": 0.7239853664113426}, {\"Cidade\": \"Bragan\\u00e7a\", \"Precipita\\u00e7\\u00e3o\": 0.42165881926837867, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1007.9344802607745, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1008.20281434956, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1007.6670491605232, \"Radia\\u00e7\\u00e3o Global\": 187.18268955650925, \"Temperatura do ar - bulbo seco\": 26.863419051068476, \"Temperatura do ponto de orvalho\": 23.223522286821755, \"Temperatura m\\u00e1xima\": 27.474719168981856, \"Temperatura m\\u00ednima\": 26.29153279381571, \"Temperatura orvalho m\\u00e1xima\": 23.670564711584962, \"Temperatura orvalho m\\u00ednima\": 22.806725642268617, \"Umidade Relativa m\\u00e1xima\": 83.90826466311198, \"Umidade Relativa m\\u00ednima\": 79.55368395540475, \"Umidade Relativa do Ar\": 81.78439922480621, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 89.49933598937584, \"Rajada M\\u00e1xima de Vento\": 4.783665579316162, \"Velocidade Hor\\u00e1ria do Vento\": 1.4402631896655806}, {\"Cidade\": \"Breves\", \"Precipita\\u00e7\\u00e3o\": 0.2742237442922375, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1010.5498630137002, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1010.8545319634711, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1010.2454337899554, \"Radia\\u00e7\\u00e3o Global\": 1296.2817546090323, \"Temperatura do ar - bulbo seco\": 26.56365296803654, \"Temperatura do ponto de orvalho\": 22.91944063926939, \"Temperatura m\\u00e1xima\": 27.1389726027398, \"Temperatura m\\u00ednima\": 26.02631278538818, \"Temperatura orvalho m\\u00e1xima\": 23.426152968036643, \"Temperatura orvalho m\\u00ednima\": 22.48727168949759, \"Umidade Relativa m\\u00e1xima\": 84.43858447488584, \"Umidade Relativa m\\u00ednima\": 78.96849315068494, \"Umidade Relativa do Ar\": 81.73481735159817, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 103.99885727345446, \"Rajada M\\u00e1xima de Vento\": 3.1943493150684783, \"Velocidade Hor\\u00e1ria do Vento\": 0.9568721461187243}, {\"Cidade\": \"Camet\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.3655479452054787, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1010.7019292237488, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1011.0087557077654, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1010.3974885844783, \"Radia\\u00e7\\u00e3o Global\": 1401.0148133359996, \"Temperatura do ar - bulbo seco\": 27.6492237442922, \"Temperatura do ponto de orvalho\": 22.528618721461246, \"Temperatura m\\u00e1xima\": 28.1624429223744, \"Temperatura m\\u00ednima\": 27.17224885844761, \"Temperatura orvalho m\\u00e1xima\": 22.964623287671337, \"Temperatura orvalho m\\u00ednima\": 22.120970319634623, \"Umidade Relativa m\\u00e1xima\": 77.0343607305936, \"Umidade Relativa m\\u00ednima\": 72.60993150684932, \"Umidade Relativa do Ar\": 74.88812785388127, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 126.18093607305936, \"Rajada M\\u00e1xima de Vento\": 4.68071917808219, \"Velocidade Hor\\u00e1ria do Vento\": 1.8276141552511433}, {\"Cidade\": \"Capit\\u00e3o Po\\u00e7o\", \"Precipita\\u00e7\\u00e3o\": 0.29052511415524995, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1002.8590867579904, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1003.149965753426, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1002.5670319634692, \"Radia\\u00e7\\u00e3o Global\": 1366.6408618449543, \"Temperatura do ar - bulbo seco\": 25.82224885844753, \"Temperatura do ponto de orvalho\": 22.365776255707807, \"Temperatura m\\u00e1xima\": 26.455662100456628, \"Temperatura m\\u00ednima\": 25.224121004566264, \"Temperatura orvalho m\\u00e1xima\": 22.858458904109607, \"Temperatura orvalho m\\u00ednima\": 21.909337899543495, \"Umidade Relativa m\\u00e1xima\": 85.32819634703196, \"Umidade Relativa m\\u00ednima\": 80.2189497716895, \"Umidade Relativa do Ar\": 82.85, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 112.6296253997259, \"Rajada M\\u00e1xima de Vento\": 4.244828767123282, \"Velocidade Hor\\u00e1ria do Vento\": 1.6448858447488555}, {\"Cidade\": \"Castanhal\", \"Precipita\\u00e7\\u00e3o\": 0.2965265512775232, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1006.5351583657159, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1006.8245614035136, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1006.2443306252229, \"Radia\\u00e7\\u00e3o Global\": 1163.1273506151158, \"Temperatura do ar - bulbo seco\": 26.47220063581767, \"Temperatura do ponto de orvalho\": 22.781078535264285, \"Temperatura m\\u00e1xima\": 26.94876957494404, \"Temperatura m\\u00ednima\": 26.03506417049336, \"Temperatura orvalho m\\u00e1xima\": 23.167561521252907, \"Temperatura orvalho m\\u00ednima\": 22.422065230189563, \"Umidade Relativa m\\u00e1xima\": 83.55704697986577, \"Umidade Relativa m\\u00ednima\": 79.20098904980573, \"Umidade Relativa do Ar\": 81.46238078417521, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 97.11362298363358, \"Rajada M\\u00e1xima de Vento\": 2.4045920169551436, \"Velocidade Hor\\u00e1ria do Vento\": 0.11382314847521562}, {\"Cidade\": \"Concei\\u00e7\\u00e3o do Araguaia\", \"Precipita\\u00e7\\u00e3o\": 0.18479433984890317, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 991.8736299316479, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 992.1775992325231, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 991.5690610384925, \"Radia\\u00e7\\u00e3o Global\": 1430.7701766152468, \"Temperatura do ar - bulbo seco\": 26.378294759563516, \"Temperatura do ponto de orvalho\": 20.575644561698017, \"Temperatura m\\u00e1xima\": 26.9390814246313, \"Temperatura m\\u00ednima\": 25.8351840748292, \"Temperatura orvalho m\\u00e1xima\": 21.124991006115888, \"Temperatura orvalho m\\u00ednima\": 20.02648117054452, \"Umidade Relativa m\\u00e1xima\": 76.77994963424871, \"Umidade Relativa m\\u00ednima\": 71.0997841208923, \"Umidade Relativa do Ar\": 73.99736179398009, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 186.8140148788097, \"Rajada M\\u00e1xima de Vento\": 3.4764635316698733, \"Velocidade Hor\\u00e1ria do Vento\": 1.3578164367126544}, {\"Cidade\": \"Dom Eliseu\", \"Precipita\\u00e7\\u00e3o\": 0.18876712328767173, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 982.6208675799074, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 982.9113470319635, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 982.3287785388102, \"Radia\\u00e7\\u00e3o Global\": 1370.590555555555, \"Temperatura do ar - bulbo seco\": 26.027933789954304, \"Temperatura do ponto de orvalho\": 21.345181978515306, \"Temperatura m\\u00e1xima\": 26.654018264840133, \"Temperatura m\\u00ednima\": 25.450639269406352, \"Temperatura orvalho m\\u00e1xima\": 21.76454950652656, \"Temperatura orvalho m\\u00ednima\": 20.9197102372234, \"Umidade Relativa m\\u00e1xima\": 79.17873481621707, \"Umidade Relativa m\\u00ednima\": 73.23698327548122, \"Umidade Relativa do Ar\": 76.59676126342794, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 110.66811279826464, \"Rajada M\\u00e1xima de Vento\": 4.449086549440508, \"Velocidade Hor\\u00e1ria do Vento\": 1.8475054229934949}, {\"Cidade\": \"Itaituba\", \"Precipita\\u00e7\\u00e3o\": 0.21015000000000084, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1008.1437557182078, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1008.4663311985358, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1007.820402561757, \"Radia\\u00e7\\u00e3o Global\": 770.663655077767, \"Temperatura do ar - bulbo seco\": 27.336219121683374, \"Temperatura do ponto de orvalho\": 22.4776075022873, \"Temperatura m\\u00e1xima\": 27.856804666056707, \"Temperatura m\\u00ednima\": 26.84950823421759, \"Temperatura orvalho m\\u00e1xima\": 22.93858645928638, \"Temperatura orvalho m\\u00ednima\": 22.03951280878317, \"Umidade Relativa m\\u00e1xima\": 78.79974839890211, \"Umidade Relativa m\\u00ednima\": 73.57822506861848, \"Umidade Relativa do Ar\": 76.25034309240623, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 158.35166971637693, \"Rajada M\\u00e1xima de Vento\": 2.834389295516926, \"Velocidade Hor\\u00e1ria do Vento\": 0.778007776761213}, {\"Cidade\": \"MINA DO PALITO\", \"Precipita\\u00e7\\u00e3o\": 0.15310546060858707, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 980.3516673614001, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 980.6566277615673, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 980.0447269695708, \"Radia\\u00e7\\u00e3o Global\": 697.0325760733642, \"Temperatura do ar - bulbo seco\": 26.0782409337224, \"Temperatura do ponto de orvalho\": 21.275552313463958, \"Temperatura m\\u00e1xima\": 26.609899958315957, \"Temperatura m\\u00ednima\": 25.57328053355573, \"Temperatura orvalho m\\u00e1xima\": 21.724364318466037, \"Temperatura orvalho m\\u00ednima\": 20.848270112546924, \"Umidade Relativa m\\u00e1xima\": 77.9005835764902, \"Umidade Relativa m\\u00ednima\": 75.3720300125052, \"Umidade Relativa do Ar\": 76.65214672780326, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 159.1556898707795, \"Rajada M\\u00e1xima de Vento\": 2.878428511879941, \"Velocidade Hor\\u00e1ria do Vento\": 0.9575031263026264}, {\"Cidade\": \"Marab\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.21315789473684238, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 998.2889016018303, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 998.5905606407329, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 997.9875858123544, \"Radia\\u00e7\\u00e3o Global\": 1395.2190134907264, \"Temperatura do ar - bulbo seco\": 26.53455377574376, \"Temperatura do ponto de orvalho\": 21.622299771167146, \"Temperatura m\\u00e1xima\": 27.175652173913125, \"Temperatura m\\u00ednima\": 25.95032036613279, \"Temperatura orvalho m\\u00e1xima\": 22.149164759725434, \"Temperatura orvalho m\\u00ednima\": 21.155320366132717, \"Umidade Relativa m\\u00e1xima\": 79.387528604119, \"Umidade Relativa m\\u00ednima\": 73.7383295194508, \"Umidade Relativa do Ar\": 76.6062929061785, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 190.391548327989, \"Rajada M\\u00e1xima de Vento\": 3.4695627289377193, \"Velocidade Hor\\u00e1ria do Vento\": 1.2917276887871816}, {\"Cidade\": \"Medicil\\u00e2ndia\", \"Precipita\\u00e7\\u00e3o\": 0.14630256162397298, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 982.1363943934261, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 982.4335267101767, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 981.8400531786326, \"Radia\\u00e7\\u00e3o Global\": 1292.8603280141838, \"Temperatura do ar - bulbo seco\": 26.211696471725443, \"Temperatura do ponto de orvalho\": 21.59838941616343, \"Temperatura m\\u00e1xima\": 26.9084118926758, \"Temperatura m\\u00ednima\": 25.58416727096929, \"Temperatura orvalho m\\u00e1xima\": 22.30485948477757, \"Temperatura orvalho m\\u00ednima\": 20.96416861826698, \"Umidade Relativa m\\u00e1xima\": 77.96930722011108, \"Umidade Relativa m\\u00ednima\": 70.07892429114294, \"Umidade Relativa do Ar\": 74.28041415012942, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 137.44755920734656, \"Rajada M\\u00e1xima de Vento\": 2.508701957940533, \"Velocidade Hor\\u00e1ria do Vento\": 0.3135089415176398}, {\"Cidade\": \"Monte Alegre\", \"Precipita\\u00e7\\u00e3o\": 0.3289519064954978, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 999.7250837365095, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1000.0500472679165, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 999.4259973529997, \"Radia\\u00e7\\u00e3o Global\": 1658.81261205564, \"Temperatura do ar - bulbo seco\": 27.204858375539278, \"Temperatura do ponto de orvalho\": 22.57430125679987, \"Temperatura m\\u00e1xima\": 27.6474904942965, \"Temperatura m\\u00ednima\": 26.707034220532286, \"Temperatura orvalho m\\u00e1xima\": 23.013859315589386, \"Temperatura orvalho m\\u00ednima\": 22.185741444866963, \"Umidade Relativa m\\u00e1xima\": 79.12927756653993, \"Umidade Relativa m\\u00ednima\": 75.056463878327, \"Umidade Relativa do Ar\": 76.92027762145939, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 71.0978707508405, \"Rajada M\\u00e1xima de Vento\": 5.699962070927336, \"Velocidade Hor\\u00e1ria do Vento\": 2.7657078819574186}, {\"Cidade\": \"Novo Repartimento\", \"Precipita\\u00e7\\u00e3o\": 0.2468659942363116, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1001.1351945244953, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1001.4373153153141, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1000.8339459459465, \"Radia\\u00e7\\u00e3o Global\": 1236.579856584093, \"Temperatura do ar - bulbo seco\": 26.448657899477613, \"Temperatura do ponto de orvalho\": 18.99551432174384, \"Temperatura m\\u00e1xima\": 26.869345828077194, \"Temperatura m\\u00ednima\": 26.048567309425152, \"Temperatura orvalho m\\u00e1xima\": 19.511227248152792, \"Temperatura orvalho m\\u00ednima\": 18.502468913317728, \"Umidade Relativa m\\u00e1xima\": 69.0621733645702, \"Umidade Relativa m\\u00ednima\": 64.46188502432871, \"Umidade Relativa do Ar\": 66.77247342821113, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 149.89013732833956, \"Rajada M\\u00e1xima de Vento\": 3.5483750000000045, \"Velocidade Hor\\u00e1ria do Vento\": 1.330922693266831}, {\"Cidade\": \"Pacaj\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.19065030033951474, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1001.3919034699429, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1001.706152077045, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1001.0846198073915, \"Radia\\u00e7\\u00e3o Global\": 1036.3207325268806, \"Temperatura do ar - bulbo seco\": 26.930615450521316, \"Temperatura do ponto de orvalho\": 21.911952020562673, \"Temperatura m\\u00e1xima\": 27.566422308466322, \"Temperatura m\\u00ednima\": 26.318686215322696, \"Temperatura orvalho m\\u00e1xima\": 22.451990800632466, \"Temperatura orvalho m\\u00ednima\": 21.43373580566334, \"Umidade Relativa m\\u00e1xima\": 78.62986919649273, \"Umidade Relativa m\\u00ednima\": 73.28489291361218, \"Umidade Relativa do Ar\": 75.95501927745252, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 236.0, \"Rajada M\\u00e1xima de Vento\": 0.0, \"Velocidade Hor\\u00e1ria do Vento\": 0.0}, {\"Cidade\": \"Paragominas\", \"Precipita\\u00e7\\u00e3o\": 0.54252936356187, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 996.9312442922374, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 997.2299315068472, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 996.6318150684907, \"Radia\\u00e7\\u00e3o Global\": 1397.239711115763, \"Temperatura do ar - bulbo seco\": 26.338276255707843, \"Temperatura do ponto de orvalho\": 22.747300415320744, \"Temperatura m\\u00e1xima\": 27.006358447488623, \"Temperatura m\\u00ednima\": 25.703858447488585, \"Temperatura orvalho m\\u00e1xima\": 23.267455714061672, \"Temperatura orvalho m\\u00ednima\": 22.213497413387742, \"Umidade Relativa m\\u00e1xima\": 81.09364234262449, \"Umidade Relativa m\\u00ednima\": 73.41794550579392, \"Umidade Relativa do Ar\": 77.63374865405322, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 123.87100456621005, \"Rajada M\\u00e1xima de Vento\": 4.037237442922386, \"Velocidade Hor\\u00e1ria do Vento\": 1.3676484018264916}, {\"Cidade\": \"Placas\", \"Precipita\\u00e7\\u00e3o\": 0.22150701647346002, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 999.7871873093353, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1000.062643239115, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 999.4513674560752, \"Radia\\u00e7\\u00e3o Global\": 1154.4400558485893, \"Temperatura do ar - bulbo seco\": 26.220256253813247, \"Temperatura do ponto de orvalho\": 13.134843834627173, \"Temperatura m\\u00e1xima\": 26.788831168831024, \"Temperatura m\\u00ednima\": 25.68559205500379, \"Temperatura orvalho m\\u00e1xima\": 13.758992677263844, \"Temperatura orvalho m\\u00ednima\": 12.603261470425632, \"Umidade Relativa m\\u00e1xima\": 54.03461210571185, \"Umidade Relativa m\\u00ednima\": 53.06644880174292, \"Umidade Relativa do Ar\": 54.083911111111114, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 112.16870042708969, \"Rajada M\\u00e1xima de Vento\": 2.102981651376141, \"Velocidade Hor\\u00e1ria do Vento\": 0.48046064673581196}, {\"Cidade\": \"Reden\\u00e7\\u00e3o\", \"Precipita\\u00e7\\u00e3o\": 0.1613136923448444, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 987.7356194156026, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 988.0363285024174, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 987.4314492753638, \"Radia\\u00e7\\u00e3o Global\": 1468.1352038579575, \"Temperatura do ar - bulbo seco\": 27.772591161555095, \"Temperatura do ponto de orvalho\": 18.80153749607784, \"Temperatura m\\u00e1xima\": 28.46797101449272, \"Temperatura m\\u00ednima\": 27.103743961352606, \"Temperatura orvalho m\\u00e1xima\": 19.329631959735785, \"Temperatura orvalho m\\u00ednima\": 18.288361119849014, \"Umidade Relativa m\\u00e1xima\": 64.66656191074796, \"Umidade Relativa m\\u00ednima\": 58.35386549340038, \"Umidade Relativa do Ar\": 61.469720740508315, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 182.94397488529341, \"Rajada M\\u00e1xima de Vento\": 4.001256038647333, \"Velocidade Hor\\u00e1ria do Vento\": 1.5588263704419196}, {\"Cidade\": \"Rondon do Par\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.14129338902491742, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 986.7915598444491, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 987.0808152095652, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 986.5033126890402, \"Radia\\u00e7\\u00e3o Global\": 1333.4955621301767, \"Temperatura do ar - bulbo seco\": 25.781751404292066, \"Temperatura do ponto de orvalho\": 20.78329252484516, \"Temperatura m\\u00e1xima\": 26.453233472562236, \"Temperatura m\\u00ednima\": 25.157194296413625, \"Temperatura orvalho m\\u00e1xima\": 21.301166642661695, \"Temperatura orvalho m\\u00ednima\": 20.28012386576416, \"Umidade Relativa m\\u00e1xima\": 79.2520524269048, \"Umidade Relativa m\\u00ednima\": 73.82298718133372, \"Umidade Relativa do Ar\": 76.61846464064526, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 166.52052426904797, \"Rajada M\\u00e1xima de Vento\": 3.4490566037735912, \"Velocidade Hor\\u00e1ria do Vento\": 1.2850640933314175}, {\"Cidade\": \"SERRA DOS CARAJAS\", \"Precipita\\u00e7\\u00e3o\": 0.17052092228864255, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 933.1423740392852, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 933.4040739472808, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 932.8851249572033, \"Radia\\u00e7\\u00e3o Global\": 1332.5162219527017, \"Temperatura do ar - bulbo seco\": 24.813834329632733, \"Temperatura do ponto de orvalho\": 18.781810418445794, \"Temperatura m\\u00e1xima\": 25.378688805203605, \"Temperatura m\\u00ednima\": 24.30938034919546, \"Temperatura orvalho m\\u00e1xima\": 19.222920232797026, \"Temperatura orvalho m\\u00ednima\": 18.361263266004787, \"Umidade Relativa m\\u00e1xima\": 73.34132146525162, \"Umidade Relativa m\\u00ednima\": 68.41492639507018, \"Umidade Relativa do Ar\": 70.96122971818959, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 173.52237786129143, \"Rajada M\\u00e1xima de Vento\": 5.536435304198769, \"Velocidade Hor\\u00e1ria do Vento\": 2.636675777246326}, {\"Cidade\": \"Salin\\u00f3polis\", \"Precipita\\u00e7\\u00e3o\": 0.3854794121926368, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1008.9354430379742, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1009.200495988329, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1008.6676732312175, \"Radia\\u00e7\\u00e3o Global\": 1179.2050063211132, \"Temperatura do ar - bulbo seco\": 26.973388622144533, \"Temperatura do ponto de orvalho\": 23.153135457587595, \"Temperatura m\\u00e1xima\": 27.414923413566626, \"Temperatura m\\u00ednima\": 26.5760758570387, \"Temperatura orvalho m\\u00e1xima\": 23.555025528811147, \"Temperatura orvalho m\\u00ednima\": 22.78414296134212, \"Umidade Relativa m\\u00e1xima\": 81.94412837345004, \"Umidade Relativa m\\u00ednima\": 78.13362509117432, \"Umidade Relativa do Ar\": 80.11799796304379, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 77.1168509895227, \"Rajada M\\u00e1xima de Vento\": 6.359524157057375, \"Velocidade Hor\\u00e1ria do Vento\": 1.638853317811406}, {\"Cidade\": \"Santana do Araguaia\", \"Precipita\\u00e7\\u00e3o\": 0.1896768299646002, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 991.1070001141976, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 991.4926222019194, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 990.6026496116996, \"Radia\\u00e7\\u00e3o Global\": 1345.8996836777708, \"Temperatura do ar - bulbo seco\": 26.860111910471513, \"Temperatura do ponto de orvalho\": 19.875459632294145, \"Temperatura m\\u00e1xima\": 27.638602101416005, \"Temperatura m\\u00ednima\": 26.121596619460846, \"Temperatura orvalho m\\u00e1xima\": 20.412768387391566, \"Temperatura orvalho m\\u00ednima\": 19.334559159433564, \"Umidade Relativa m\\u00e1xima\": 72.91731384193696, \"Umidade Relativa m\\u00ednima\": 66.79830973047054, \"Umidade Relativa do Ar\": 69.92611624985726, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 188.88260819915496, \"Rajada M\\u00e1xima de Vento\": 3.6424280493375836, \"Velocidade Hor\\u00e1ria do Vento\": 1.3050131323512688}, {\"Cidade\": \"Santar\\u00e9m\", \"Precipita\\u00e7\\u00e3o\": 0.3819406392694053, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 994.7430365296813, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 995.0462442922408, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 994.4405936073057, \"Radia\\u00e7\\u00e3o Global\": 1391.315915789475, \"Temperatura do ar - bulbo seco\": 26.271335616438343, \"Temperatura do ponto de orvalho\": 22.963881278538786, \"Temperatura m\\u00e1xima\": 26.631267123287603, \"Temperatura m\\u00ednima\": 25.927180365296802, \"Temperatura orvalho m\\u00e1xima\": 23.32062785388125, \"Temperatura orvalho m\\u00ednima\": 22.60237442922382, \"Umidade Relativa m\\u00e1xima\": 84.8230593607306, \"Umidade Relativa m\\u00ednima\": 80.78333333333333, \"Umidade Relativa do Ar\": 82.88801369863013, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 137.27678061049502, \"Rajada M\\u00e1xima de Vento\": 3.5485812356979225, \"Velocidade Hor\\u00e1ria do Vento\": 1.1803085714285617}, {\"Cidade\": \"Soure\", \"Precipita\\u00e7\\u00e3o\": 0.21275418453451525, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1010.3953525825392, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1010.6716783618991, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1010.1191303347509, \"Radia\\u00e7\\u00e3o Global\": 1360.3784109816959, \"Temperatura do ar - bulbo seco\": 27.333797308178962, \"Temperatura do ponto de orvalho\": 22.96133670769572, \"Temperatura m\\u00e1xima\": 27.78824341424134, \"Temperatura m\\u00ednima\": 26.919590475094935, \"Temperatura orvalho m\\u00e1xima\": 23.37960427930516, \"Temperatura orvalho m\\u00ednima\": 22.582020016104895, \"Umidade Relativa m\\u00e1xima\": 79.39042908086967, \"Umidade Relativa m\\u00ednima\": 75.76670884619809, \"Umidade Relativa do Ar\": 77.64293109398366, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 85.09916024387438, \"Rajada M\\u00e1xima de Vento\": 6.635683883584508, \"Velocidade Hor\\u00e1ria do Vento\": 2.5635683883584455}, {\"Cidade\": \"S\\u00e3o F\\u00e9lix do Xingu\", \"Precipita\\u00e7\\u00e3o\": 0.17305319326329874, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 988.1314490578623, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 990.8391195597802, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 985.5444055361015, \"Radia\\u00e7\\u00e3o Global\": 947.819497928346, \"Temperatura do ar - bulbo seco\": 25.89378022344508, \"Temperatura do ponto de orvalho\": 21.719443054860744, \"Temperatura m\\u00e1xima\": 26.50416875104217, \"Temperatura m\\u00ednima\": 25.307236951809312, \"Temperatura orvalho m\\u00e1xima\": 22.23958645989663, \"Temperatura orvalho m\\u00ednima\": 21.23139903284977, \"Umidade Relativa m\\u00e1xima\": 83.24328831082208, \"Umidade Relativa m\\u00ednima\": 77.40803735200934, \"Umidade Relativa do Ar\": 80.37818909454727, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 171.5767883941971, \"Rajada M\\u00e1xima de Vento\": 3.403885923949294, \"Velocidade Hor\\u00e1ria do Vento\": 1.5109721527430302}, {\"Cidade\": \"Tom\\u00e9-A\\u00e7u\", \"Precipita\\u00e7\\u00e3o\": 0.2307441481308966, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1006.3444663116438, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1006.6542843909181, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1006.0404469661869, \"Radia\\u00e7\\u00e3o Global\": 1290.511635969665, \"Temperatura do ar - bulbo seco\": 26.401099791618478, \"Temperatura do ponto de orvalho\": 22.950706181986597, \"Temperatura m\\u00e1xima\": 26.88288559518284, \"Temperatura m\\u00ednima\": 25.92641269106075, \"Temperatura orvalho m\\u00e1xima\": 23.387227883279387, \"Temperatura orvalho m\\u00ednima\": 22.540076424270463, \"Umidade Relativa m\\u00e1xima\": 85.46723019916628, \"Umidade Relativa m\\u00ednima\": 80.30314960629921, \"Umidade Relativa do Ar\": 82.91502662653392, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 149.88122250520954, \"Rajada M\\u00e1xima de Vento\": 2.8401459008800365, \"Velocidade Hor\\u00e1ria do Vento\": 0.6961449409585568}, {\"Cidade\": \"Tucum\\u00e3\", \"Precipita\\u00e7\\u00e3o\": 0.2189726027397268, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 975.7158561643847, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 976.0138812785385, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 975.4150342465729, \"Radia\\u00e7\\u00e3o Global\": 1246.6054031236843, \"Temperatura do ar - bulbo seco\": 25.364988584474766, \"Temperatura do ponto de orvalho\": 21.806426940639138, \"Temperatura m\\u00e1xima\": 26.07593607305939, \"Temperatura m\\u00ednima\": 24.71291095890402, \"Temperatura orvalho m\\u00e1xima\": 22.35799086757988, \"Temperatura orvalho m\\u00ednima\": 21.31140410958903, \"Umidade Relativa m\\u00e1xima\": 86.0898401826484, \"Umidade Relativa m\\u00ednima\": 80.33264840182649, \"Umidade Relativa do Ar\": 83.27819634703197, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 151.0306242638398, \"Rajada M\\u00e1xima de Vento\": 3.2187868080094235, \"Velocidade Hor\\u00e1ria do Vento\": 1.0947879858657261}, {\"Cidade\": \"Tucuru\\u00ed\", \"Precipita\\u00e7\\u00e3o\": 0.1453360768175582, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 994.6556543837355, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 994.9335108649339, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 994.3600979974449, \"Radia\\u00e7\\u00e3o Global\": 1299.49794222398, \"Temperatura do ar - bulbo seco\": 27.086446421008056, \"Temperatura do ponto de orvalho\": 21.979088983050808, \"Temperatura m\\u00e1xima\": 27.734299105240645, \"Temperatura m\\u00ednima\": 26.515786109927525, \"Temperatura orvalho m\\u00e1xima\": 22.572010232359794, \"Temperatura orvalho m\\u00ednima\": 21.400127904497914, \"Umidade Relativa m\\u00e1xima\": 78.93242379023663, \"Umidade Relativa m\\u00ednima\": 72.06480494564059, \"Umidade Relativa do Ar\": 75.63834745762712, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 202.57930449533504, \"Rajada M\\u00e1xima de Vento\": 3.007100213219608, \"Velocidade Hor\\u00e1ria do Vento\": 0.48390585241730116}, {\"Cidade\": \"Xinguara\", \"Precipita\\u00e7\\u00e3o\": 0.20817538250742237, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 984.013473395754, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 984.3078556748102, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 983.7193423155998, \"Radia\\u00e7\\u00e3o Global\": 1426.0036060733892, \"Temperatura do ar - bulbo seco\": 26.141185202100967, \"Temperatura do ponto de orvalho\": 21.310069722253914, \"Temperatura m\\u00e1xima\": 26.896072162594155, \"Temperatura m\\u00ednima\": 25.437896780086813, \"Temperatura orvalho m\\u00e1xima\": 21.91806348481384, \"Temperatura orvalho m\\u00ednima\": 20.756279972596467, \"Umidade Relativa m\\u00e1xima\": 80.4496460379082, \"Umidade Relativa m\\u00ednima\": 74.55800411052752, \"Umidade Relativa do Ar\": 77.60406903646131, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 143.53488372093022, \"Rajada M\\u00e1xima de Vento\": 3.3163375224416507, \"Velocidade Hor\\u00e1ria do Vento\": 1.2731663685152053}, {\"Cidade\": \"\\u00d3bidos\", \"Precipita\\u00e7\\u00e3o\": 0.2148630136986311, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1001.1944748858413, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1001.5013584474863, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1000.8873059360735, \"Radia\\u00e7\\u00e3o Global\": 1288.5399999999986, \"Temperatura do ar - bulbo seco\": 26.218424657534317, \"Temperatura do ponto de orvalho\": 22.492271689497716, \"Temperatura m\\u00e1xima\": 26.86950913242014, \"Temperatura m\\u00ednima\": 25.607431506849373, \"Temperatura orvalho m\\u00e1xima\": 22.975171232876672, \"Temperatura orvalho m\\u00ednima\": 22.039726027397215, \"Umidade Relativa m\\u00e1xima\": 84.45502283105023, \"Umidade Relativa m\\u00ednima\": 78.65707762557078, \"Umidade Relativa do Ar\": 81.6689497716895, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 238.61655251141553, \"Rajada M\\u00e1xima de Vento\": 0.0, \"Velocidade Hor\\u00e1ria do Vento\": 0.0}]}}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.LayerChart(...)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "base = alt.Chart(alt.Data(url=para_geo, format=alt.DataFormat(property='features',type='json'))).mark_geoshape(\n",
    "        stroke=\"#555\", strokeWidth=0.3, color=\"darkgrey\",\n",
    "    ).transform_calculate(\n",
    "        nome=\"datum.properties.name\"\n",
    "    ).transform_lookup(\n",
    "        lookup=\"nome\",\n",
    "        from_=alt.LookupData(data=df_aggr, key='Cidade', fields=list(df_aggr.columns))\n",
    "    ).transform_filter(\n",
    "        \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"\n",
    "    ).encode(\n",
    "        tooltip=alt.Tooltip([\"nome:N\"]),\n",
    "    ).properties(\n",
    "        width=650,\n",
    "        height=500\n",
    "    )\n",
    "\n",
    "alt.layer(\n",
    "    base, base.encode(color='Precipitação:Q')\n",
    ").configure_view(\n",
    "    strokeWidth=0\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Um dos maiores problemas com mapas choropleth é a escolha de cores. No mapa acima não mudamos nada em relação ao esquema padrão de cores (`yellowgreenblue`) do Altair, mas na utilização de mapas essa é uma questão importante."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Vamos refazer o mapa, agora trocando esquemas de cores. Vamos testar um esquema de matiz única (`teals`), que varia somente a iluminação, um esquema multi matiz (`viridis`), que varia matiz e iluminação e um esquema divergente (`blueorange`), que usa um ponto médio."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<div id=\"altair-viz-e17156ef1fc546b0992e81df965a2909\"></div>\n",
       "<script type=\"text/javascript\">\n",
       "  (function(spec, embedOpt){\n",
       "    let outputDiv = document.currentScript.previousElementSibling;\n",
       "    if (outputDiv.id !== \"altair-viz-e17156ef1fc546b0992e81df965a2909\") {\n",
       "      outputDiv = document.getElementById(\"altair-viz-e17156ef1fc546b0992e81df965a2909\");\n",
       "    }\n",
       "    const paths = {\n",
       "      \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
       "      \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
       "      \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.8.1?noext\",\n",
       "      \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
       "    };\n",
       "\n",
       "    function loadScript(lib) {\n",
       "      return new Promise(function(resolve, reject) {\n",
       "        var s = document.createElement('script');\n",
       "        s.src = paths[lib];\n",
       "        s.async = true;\n",
       "        s.onload = () => resolve(paths[lib]);\n",
       "        s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      });\n",
       "    }\n",
       "\n",
       "    function showError(err) {\n",
       "      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
       "      throw err;\n",
       "    }\n",
       "\n",
       "    function displayChart(vegaEmbed) {\n",
       "      vegaEmbed(outputDiv, spec, embedOpt)\n",
       "        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
       "    }\n",
       "\n",
       "    if(typeof define === \"function\" && define.amd) {\n",
       "      requirejs.config({paths});\n",
       "      require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
       "    } else if (typeof vegaEmbed === \"function\") {\n",
       "      displayChart(vegaEmbed);\n",
       "    } else {\n",
       "      loadScript(\"vega\")\n",
       "        .then(() => loadScript(\"vega-lite\"))\n",
       "        .then(() => loadScript(\"vega-embed\"))\n",
       "        .catch(showError)\n",
       "        .then(() => displayChart(vegaEmbed));\n",
       "    }\n",
       "  })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300, \"strokeWidth\": 0}}, \"concat\": [{\"layer\": [{\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"width\": 280}, {\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"color\": {\"type\": \"quantitative\", \"field\": \"Precipita\\u00e7\\u00e3o\", \"legend\": null, \"scale\": {\"scheme\": \"tealblues\"}}, \"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"width\": 280}]}, {\"layer\": [{\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"width\": 280}, {\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"color\": {\"type\": \"quantitative\", \"field\": \"Precipita\\u00e7\\u00e3o\", \"legend\": null, \"scale\": {\"scheme\": \"viridis\"}}, \"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"width\": 280}]}, {\"layer\": [{\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"width\": 280}, {\"mark\": {\"type\": \"geoshape\", \"color\": \"darkgrey\", \"stroke\": \"#555\", \"strokeWidth\": 0.3}, \"encoding\": {\"color\": {\"type\": \"quantitative\", \"field\": \"Precipita\\u00e7\\u00e3o\", \"legend\": null, \"scale\": {\"scheme\": \"blueorange\"}}, \"tooltip\": [{\"type\": \"nominal\", \"field\": \"nome\"}]}, \"width\": 280}]}], \"data\": {\"url\": \"https://raw.githubusercontent.com/tiagodavi70/vl-altair-tutorial/master/datasets/para_geo.json\", \"format\": {\"property\": \"features\", \"type\": \"json\"}}, \"resolve\": {\"scale\": {\"color\": \"independent\"}}, \"transform\": [{\"calculate\": \"datum.properties.name\", \"as\": \"nome\"}, {\"lookup\": \"nome\", \"from\": {\"data\": {\"name\": \"data-b0404002fce03bd67150978ebb6c4b7a\"}, \"key\": \"Cidade\", \"fields\": [\"Cidade\", \"Precipita\\u00e7\\u00e3o\", \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\", \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\", \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\", \"Radia\\u00e7\\u00e3o Global\", \"Temperatura do ar - bulbo seco\", \"Temperatura do ponto de orvalho\", \"Temperatura m\\u00e1xima\", \"Temperatura m\\u00ednima\", \"Temperatura orvalho m\\u00e1xima\", \"Temperatura orvalho m\\u00ednima\", \"Umidade Relativa m\\u00e1xima\", \"Umidade Relativa m\\u00ednima\", \"Umidade Relativa do Ar\", \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\", \"Rajada M\\u00e1xima de Vento\", \"Velocidade Hor\\u00e1ria do Vento\"]}}, {\"filter\": \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"}], \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.8.1.json\", \"datasets\": {\"data-b0404002fce03bd67150978ebb6c4b7a\": [{\"Cidade\": \"Altamira\", \"Precipita\\u00e7\\u00e3o\": 0.20530710282511797, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 989.9399062106858, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 990.2417362461454, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 989.6382019901637, \"Radia\\u00e7\\u00e3o Global\": 1074.2224043715846, \"Temperatura do ar - bulbo seco\": 26.035456936978154, \"Temperatura do ponto de orvalho\": 22.72755347134844, \"Temperatura m\\u00e1xima\": 26.61011094589944, \"Temperatura m\\u00ednima\": 25.50756033398146, \"Temperatura orvalho m\\u00e1xima\": 23.218837927484792, \"Temperatura orvalho m\\u00ednima\": 22.302950932174376, \"Umidade Relativa m\\u00e1xima\": 86.16012810248199, \"Umidade Relativa m\\u00ednima\": 80.40032025620496, \"Umidade Relativa do Ar\": 83.34782111403409, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 130.3518094365552, \"Rajada M\\u00e1xima de Vento\": 2.9547130912839275, \"Velocidade Hor\\u00e1ria do Vento\": 0.8987978016945245}, {\"Cidade\": \"Bel\\u00e9m\", \"Precipita\\u00e7\\u00e3o\": 0.4879387218474888, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1009.166136961242, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1009.4562364239182, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1008.8733508631577, \"Radia\\u00e7\\u00e3o Global\": 616.1213215959762, \"Temperatura do ar - bulbo seco\": 26.80990280160102, \"Temperatura do ponto de orvalho\": 23.095586049170915, \"Temperatura m\\u00e1xima\": 27.38919382504293, \"Temperatura m\\u00ednima\": 26.23517438536311, \"Temperatura orvalho m\\u00e1xima\": 23.54133790737559, \"Temperatura orvalho m\\u00ednima\": 22.62925100057173, \"Umidade Relativa m\\u00e1xima\": 83.64136275294386, \"Umidade Relativa m\\u00ednima\": 78.58385732251058, \"Umidade Relativa do Ar\": 81.24171049622684, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 115.4560420715674, \"Rajada M\\u00e1xima de Vento\": 3.1993026180404702, \"Velocidade Hor\\u00e1ria do Vento\": 0.7239853664113426}, {\"Cidade\": \"Bragan\\u00e7a\", \"Precipita\\u00e7\\u00e3o\": 0.42165881926837867, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1007.9344802607745, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1008.20281434956, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1007.6670491605232, \"Radia\\u00e7\\u00e3o Global\": 187.18268955650925, \"Temperatura do ar - bulbo seco\": 26.863419051068476, \"Temperatura do ponto de orvalho\": 23.223522286821755, \"Temperatura m\\u00e1xima\": 27.474719168981856, \"Temperatura m\\u00ednima\": 26.29153279381571, \"Temperatura orvalho m\\u00e1xima\": 23.670564711584962, \"Temperatura orvalho m\\u00ednima\": 22.806725642268617, \"Umidade Relativa m\\u00e1xima\": 83.90826466311198, \"Umidade Relativa m\\u00ednima\": 79.55368395540475, \"Umidade Relativa do Ar\": 81.78439922480621, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 89.49933598937584, \"Rajada M\\u00e1xima de Vento\": 4.783665579316162, \"Velocidade Hor\\u00e1ria do Vento\": 1.4402631896655806}, {\"Cidade\": \"Breves\", \"Precipita\\u00e7\\u00e3o\": 0.2742237442922375, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1010.5498630137002, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1010.8545319634711, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1010.2454337899554, \"Radia\\u00e7\\u00e3o Global\": 1296.2817546090323, \"Temperatura do ar - bulbo seco\": 26.56365296803654, \"Temperatura do ponto de orvalho\": 22.91944063926939, \"Temperatura m\\u00e1xima\": 27.1389726027398, \"Temperatura m\\u00ednima\": 26.02631278538818, \"Temperatura orvalho m\\u00e1xima\": 23.426152968036643, \"Temperatura orvalho m\\u00ednima\": 22.48727168949759, \"Umidade Relativa m\\u00e1xima\": 84.43858447488584, \"Umidade Relativa m\\u00ednima\": 78.96849315068494, \"Umidade Relativa do Ar\": 81.73481735159817, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 103.99885727345446, \"Rajada M\\u00e1xima de Vento\": 3.1943493150684783, \"Velocidade Hor\\u00e1ria do Vento\": 0.9568721461187243}, {\"Cidade\": \"Camet\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.3655479452054787, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1010.7019292237488, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1011.0087557077654, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1010.3974885844783, \"Radia\\u00e7\\u00e3o Global\": 1401.0148133359996, \"Temperatura do ar - bulbo seco\": 27.6492237442922, \"Temperatura do ponto de orvalho\": 22.528618721461246, \"Temperatura m\\u00e1xima\": 28.1624429223744, \"Temperatura m\\u00ednima\": 27.17224885844761, \"Temperatura orvalho m\\u00e1xima\": 22.964623287671337, \"Temperatura orvalho m\\u00ednima\": 22.120970319634623, \"Umidade Relativa m\\u00e1xima\": 77.0343607305936, \"Umidade Relativa m\\u00ednima\": 72.60993150684932, \"Umidade Relativa do Ar\": 74.88812785388127, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 126.18093607305936, \"Rajada M\\u00e1xima de Vento\": 4.68071917808219, \"Velocidade Hor\\u00e1ria do Vento\": 1.8276141552511433}, {\"Cidade\": \"Capit\\u00e3o Po\\u00e7o\", \"Precipita\\u00e7\\u00e3o\": 0.29052511415524995, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1002.8590867579904, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1003.149965753426, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1002.5670319634692, \"Radia\\u00e7\\u00e3o Global\": 1366.6408618449543, \"Temperatura do ar - bulbo seco\": 25.82224885844753, \"Temperatura do ponto de orvalho\": 22.365776255707807, \"Temperatura m\\u00e1xima\": 26.455662100456628, \"Temperatura m\\u00ednima\": 25.224121004566264, \"Temperatura orvalho m\\u00e1xima\": 22.858458904109607, \"Temperatura orvalho m\\u00ednima\": 21.909337899543495, \"Umidade Relativa m\\u00e1xima\": 85.32819634703196, \"Umidade Relativa m\\u00ednima\": 80.2189497716895, \"Umidade Relativa do Ar\": 82.85, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 112.6296253997259, \"Rajada M\\u00e1xima de Vento\": 4.244828767123282, \"Velocidade Hor\\u00e1ria do Vento\": 1.6448858447488555}, {\"Cidade\": \"Castanhal\", \"Precipita\\u00e7\\u00e3o\": 0.2965265512775232, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1006.5351583657159, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1006.8245614035136, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1006.2443306252229, \"Radia\\u00e7\\u00e3o Global\": 1163.1273506151158, \"Temperatura do ar - bulbo seco\": 26.47220063581767, \"Temperatura do ponto de orvalho\": 22.781078535264285, \"Temperatura m\\u00e1xima\": 26.94876957494404, \"Temperatura m\\u00ednima\": 26.03506417049336, \"Temperatura orvalho m\\u00e1xima\": 23.167561521252907, \"Temperatura orvalho m\\u00ednima\": 22.422065230189563, \"Umidade Relativa m\\u00e1xima\": 83.55704697986577, \"Umidade Relativa m\\u00ednima\": 79.20098904980573, \"Umidade Relativa do Ar\": 81.46238078417521, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 97.11362298363358, \"Rajada M\\u00e1xima de Vento\": 2.4045920169551436, \"Velocidade Hor\\u00e1ria do Vento\": 0.11382314847521562}, {\"Cidade\": \"Concei\\u00e7\\u00e3o do Araguaia\", \"Precipita\\u00e7\\u00e3o\": 0.18479433984890317, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 991.8736299316479, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 992.1775992325231, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 991.5690610384925, \"Radia\\u00e7\\u00e3o Global\": 1430.7701766152468, \"Temperatura do ar - bulbo seco\": 26.378294759563516, \"Temperatura do ponto de orvalho\": 20.575644561698017, \"Temperatura m\\u00e1xima\": 26.9390814246313, \"Temperatura m\\u00ednima\": 25.8351840748292, \"Temperatura orvalho m\\u00e1xima\": 21.124991006115888, \"Temperatura orvalho m\\u00ednima\": 20.02648117054452, \"Umidade Relativa m\\u00e1xima\": 76.77994963424871, \"Umidade Relativa m\\u00ednima\": 71.0997841208923, \"Umidade Relativa do Ar\": 73.99736179398009, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 186.8140148788097, \"Rajada M\\u00e1xima de Vento\": 3.4764635316698733, \"Velocidade Hor\\u00e1ria do Vento\": 1.3578164367126544}, {\"Cidade\": \"Dom Eliseu\", \"Precipita\\u00e7\\u00e3o\": 0.18876712328767173, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 982.6208675799074, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 982.9113470319635, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 982.3287785388102, \"Radia\\u00e7\\u00e3o Global\": 1370.590555555555, \"Temperatura do ar - bulbo seco\": 26.027933789954304, \"Temperatura do ponto de orvalho\": 21.345181978515306, \"Temperatura m\\u00e1xima\": 26.654018264840133, \"Temperatura m\\u00ednima\": 25.450639269406352, \"Temperatura orvalho m\\u00e1xima\": 21.76454950652656, \"Temperatura orvalho m\\u00ednima\": 20.9197102372234, \"Umidade Relativa m\\u00e1xima\": 79.17873481621707, \"Umidade Relativa m\\u00ednima\": 73.23698327548122, \"Umidade Relativa do Ar\": 76.59676126342794, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 110.66811279826464, \"Rajada M\\u00e1xima de Vento\": 4.449086549440508, \"Velocidade Hor\\u00e1ria do Vento\": 1.8475054229934949}, {\"Cidade\": \"Itaituba\", \"Precipita\\u00e7\\u00e3o\": 0.21015000000000084, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1008.1437557182078, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1008.4663311985358, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1007.820402561757, \"Radia\\u00e7\\u00e3o Global\": 770.663655077767, \"Temperatura do ar - bulbo seco\": 27.336219121683374, \"Temperatura do ponto de orvalho\": 22.4776075022873, \"Temperatura m\\u00e1xima\": 27.856804666056707, \"Temperatura m\\u00ednima\": 26.84950823421759, \"Temperatura orvalho m\\u00e1xima\": 22.93858645928638, \"Temperatura orvalho m\\u00ednima\": 22.03951280878317, \"Umidade Relativa m\\u00e1xima\": 78.79974839890211, \"Umidade Relativa m\\u00ednima\": 73.57822506861848, \"Umidade Relativa do Ar\": 76.25034309240623, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 158.35166971637693, \"Rajada M\\u00e1xima de Vento\": 2.834389295516926, \"Velocidade Hor\\u00e1ria do Vento\": 0.778007776761213}, {\"Cidade\": \"MINA DO PALITO\", \"Precipita\\u00e7\\u00e3o\": 0.15310546060858707, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 980.3516673614001, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 980.6566277615673, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 980.0447269695708, \"Radia\\u00e7\\u00e3o Global\": 697.0325760733642, \"Temperatura do ar - bulbo seco\": 26.0782409337224, \"Temperatura do ponto de orvalho\": 21.275552313463958, \"Temperatura m\\u00e1xima\": 26.609899958315957, \"Temperatura m\\u00ednima\": 25.57328053355573, \"Temperatura orvalho m\\u00e1xima\": 21.724364318466037, \"Temperatura orvalho m\\u00ednima\": 20.848270112546924, \"Umidade Relativa m\\u00e1xima\": 77.9005835764902, \"Umidade Relativa m\\u00ednima\": 75.3720300125052, \"Umidade Relativa do Ar\": 76.65214672780326, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 159.1556898707795, \"Rajada M\\u00e1xima de Vento\": 2.878428511879941, \"Velocidade Hor\\u00e1ria do Vento\": 0.9575031263026264}, {\"Cidade\": \"Marab\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.21315789473684238, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 998.2889016018303, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 998.5905606407329, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 997.9875858123544, \"Radia\\u00e7\\u00e3o Global\": 1395.2190134907264, \"Temperatura do ar - bulbo seco\": 26.53455377574376, \"Temperatura do ponto de orvalho\": 21.622299771167146, \"Temperatura m\\u00e1xima\": 27.175652173913125, \"Temperatura m\\u00ednima\": 25.95032036613279, \"Temperatura orvalho m\\u00e1xima\": 22.149164759725434, \"Temperatura orvalho m\\u00ednima\": 21.155320366132717, \"Umidade Relativa m\\u00e1xima\": 79.387528604119, \"Umidade Relativa m\\u00ednima\": 73.7383295194508, \"Umidade Relativa do Ar\": 76.6062929061785, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 190.391548327989, \"Rajada M\\u00e1xima de Vento\": 3.4695627289377193, \"Velocidade Hor\\u00e1ria do Vento\": 1.2917276887871816}, {\"Cidade\": \"Medicil\\u00e2ndia\", \"Precipita\\u00e7\\u00e3o\": 0.14630256162397298, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 982.1363943934261, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 982.4335267101767, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 981.8400531786326, \"Radia\\u00e7\\u00e3o Global\": 1292.8603280141838, \"Temperatura do ar - bulbo seco\": 26.211696471725443, \"Temperatura do ponto de orvalho\": 21.59838941616343, \"Temperatura m\\u00e1xima\": 26.9084118926758, \"Temperatura m\\u00ednima\": 25.58416727096929, \"Temperatura orvalho m\\u00e1xima\": 22.30485948477757, \"Temperatura orvalho m\\u00ednima\": 20.96416861826698, \"Umidade Relativa m\\u00e1xima\": 77.96930722011108, \"Umidade Relativa m\\u00ednima\": 70.07892429114294, \"Umidade Relativa do Ar\": 74.28041415012942, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 137.44755920734656, \"Rajada M\\u00e1xima de Vento\": 2.508701957940533, \"Velocidade Hor\\u00e1ria do Vento\": 0.3135089415176398}, {\"Cidade\": \"Monte Alegre\", \"Precipita\\u00e7\\u00e3o\": 0.3289519064954978, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 999.7250837365095, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1000.0500472679165, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 999.4259973529997, \"Radia\\u00e7\\u00e3o Global\": 1658.81261205564, \"Temperatura do ar - bulbo seco\": 27.204858375539278, \"Temperatura do ponto de orvalho\": 22.57430125679987, \"Temperatura m\\u00e1xima\": 27.6474904942965, \"Temperatura m\\u00ednima\": 26.707034220532286, \"Temperatura orvalho m\\u00e1xima\": 23.013859315589386, \"Temperatura orvalho m\\u00ednima\": 22.185741444866963, \"Umidade Relativa m\\u00e1xima\": 79.12927756653993, \"Umidade Relativa m\\u00ednima\": 75.056463878327, \"Umidade Relativa do Ar\": 76.92027762145939, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 71.0978707508405, \"Rajada M\\u00e1xima de Vento\": 5.699962070927336, \"Velocidade Hor\\u00e1ria do Vento\": 2.7657078819574186}, {\"Cidade\": \"Novo Repartimento\", \"Precipita\\u00e7\\u00e3o\": 0.2468659942363116, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1001.1351945244953, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1001.4373153153141, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1000.8339459459465, \"Radia\\u00e7\\u00e3o Global\": 1236.579856584093, \"Temperatura do ar - bulbo seco\": 26.448657899477613, \"Temperatura do ponto de orvalho\": 18.99551432174384, \"Temperatura m\\u00e1xima\": 26.869345828077194, \"Temperatura m\\u00ednima\": 26.048567309425152, \"Temperatura orvalho m\\u00e1xima\": 19.511227248152792, \"Temperatura orvalho m\\u00ednima\": 18.502468913317728, \"Umidade Relativa m\\u00e1xima\": 69.0621733645702, \"Umidade Relativa m\\u00ednima\": 64.46188502432871, \"Umidade Relativa do Ar\": 66.77247342821113, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 149.89013732833956, \"Rajada M\\u00e1xima de Vento\": 3.5483750000000045, \"Velocidade Hor\\u00e1ria do Vento\": 1.330922693266831}, {\"Cidade\": \"Pacaj\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.19065030033951474, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1001.3919034699429, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1001.706152077045, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1001.0846198073915, \"Radia\\u00e7\\u00e3o Global\": 1036.3207325268806, \"Temperatura do ar - bulbo seco\": 26.930615450521316, \"Temperatura do ponto de orvalho\": 21.911952020562673, \"Temperatura m\\u00e1xima\": 27.566422308466322, \"Temperatura m\\u00ednima\": 26.318686215322696, \"Temperatura orvalho m\\u00e1xima\": 22.451990800632466, \"Temperatura orvalho m\\u00ednima\": 21.43373580566334, \"Umidade Relativa m\\u00e1xima\": 78.62986919649273, \"Umidade Relativa m\\u00ednima\": 73.28489291361218, \"Umidade Relativa do Ar\": 75.95501927745252, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 236.0, \"Rajada M\\u00e1xima de Vento\": 0.0, \"Velocidade Hor\\u00e1ria do Vento\": 0.0}, {\"Cidade\": \"Paragominas\", \"Precipita\\u00e7\\u00e3o\": 0.54252936356187, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 996.9312442922374, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 997.2299315068472, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 996.6318150684907, \"Radia\\u00e7\\u00e3o Global\": 1397.239711115763, \"Temperatura do ar - bulbo seco\": 26.338276255707843, \"Temperatura do ponto de orvalho\": 22.747300415320744, \"Temperatura m\\u00e1xima\": 27.006358447488623, \"Temperatura m\\u00ednima\": 25.703858447488585, \"Temperatura orvalho m\\u00e1xima\": 23.267455714061672, \"Temperatura orvalho m\\u00ednima\": 22.213497413387742, \"Umidade Relativa m\\u00e1xima\": 81.09364234262449, \"Umidade Relativa m\\u00ednima\": 73.41794550579392, \"Umidade Relativa do Ar\": 77.63374865405322, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 123.87100456621005, \"Rajada M\\u00e1xima de Vento\": 4.037237442922386, \"Velocidade Hor\\u00e1ria do Vento\": 1.3676484018264916}, {\"Cidade\": \"Placas\", \"Precipita\\u00e7\\u00e3o\": 0.22150701647346002, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 999.7871873093353, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1000.062643239115, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 999.4513674560752, \"Radia\\u00e7\\u00e3o Global\": 1154.4400558485893, \"Temperatura do ar - bulbo seco\": 26.220256253813247, \"Temperatura do ponto de orvalho\": 13.134843834627173, \"Temperatura m\\u00e1xima\": 26.788831168831024, \"Temperatura m\\u00ednima\": 25.68559205500379, \"Temperatura orvalho m\\u00e1xima\": 13.758992677263844, \"Temperatura orvalho m\\u00ednima\": 12.603261470425632, \"Umidade Relativa m\\u00e1xima\": 54.03461210571185, \"Umidade Relativa m\\u00ednima\": 53.06644880174292, \"Umidade Relativa do Ar\": 54.083911111111114, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 112.16870042708969, \"Rajada M\\u00e1xima de Vento\": 2.102981651376141, \"Velocidade Hor\\u00e1ria do Vento\": 0.48046064673581196}, {\"Cidade\": \"Reden\\u00e7\\u00e3o\", \"Precipita\\u00e7\\u00e3o\": 0.1613136923448444, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 987.7356194156026, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 988.0363285024174, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 987.4314492753638, \"Radia\\u00e7\\u00e3o Global\": 1468.1352038579575, \"Temperatura do ar - bulbo seco\": 27.772591161555095, \"Temperatura do ponto de orvalho\": 18.80153749607784, \"Temperatura m\\u00e1xima\": 28.46797101449272, \"Temperatura m\\u00ednima\": 27.103743961352606, \"Temperatura orvalho m\\u00e1xima\": 19.329631959735785, \"Temperatura orvalho m\\u00ednima\": 18.288361119849014, \"Umidade Relativa m\\u00e1xima\": 64.66656191074796, \"Umidade Relativa m\\u00ednima\": 58.35386549340038, \"Umidade Relativa do Ar\": 61.469720740508315, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 182.94397488529341, \"Rajada M\\u00e1xima de Vento\": 4.001256038647333, \"Velocidade Hor\\u00e1ria do Vento\": 1.5588263704419196}, {\"Cidade\": \"Rondon do Par\\u00e1\", \"Precipita\\u00e7\\u00e3o\": 0.14129338902491742, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 986.7915598444491, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 987.0808152095652, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 986.5033126890402, \"Radia\\u00e7\\u00e3o Global\": 1333.4955621301767, \"Temperatura do ar - bulbo seco\": 25.781751404292066, \"Temperatura do ponto de orvalho\": 20.78329252484516, \"Temperatura m\\u00e1xima\": 26.453233472562236, \"Temperatura m\\u00ednima\": 25.157194296413625, \"Temperatura orvalho m\\u00e1xima\": 21.301166642661695, \"Temperatura orvalho m\\u00ednima\": 20.28012386576416, \"Umidade Relativa m\\u00e1xima\": 79.2520524269048, \"Umidade Relativa m\\u00ednima\": 73.82298718133372, \"Umidade Relativa do Ar\": 76.61846464064526, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 166.52052426904797, \"Rajada M\\u00e1xima de Vento\": 3.4490566037735912, \"Velocidade Hor\\u00e1ria do Vento\": 1.2850640933314175}, {\"Cidade\": \"SERRA DOS CARAJAS\", \"Precipita\\u00e7\\u00e3o\": 0.17052092228864255, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 933.1423740392852, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 933.4040739472808, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 932.8851249572033, \"Radia\\u00e7\\u00e3o Global\": 1332.5162219527017, \"Temperatura do ar - bulbo seco\": 24.813834329632733, \"Temperatura do ponto de orvalho\": 18.781810418445794, \"Temperatura m\\u00e1xima\": 25.378688805203605, \"Temperatura m\\u00ednima\": 24.30938034919546, \"Temperatura orvalho m\\u00e1xima\": 19.222920232797026, \"Temperatura orvalho m\\u00ednima\": 18.361263266004787, \"Umidade Relativa m\\u00e1xima\": 73.34132146525162, \"Umidade Relativa m\\u00ednima\": 68.41492639507018, \"Umidade Relativa do Ar\": 70.96122971818959, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 173.52237786129143, \"Rajada M\\u00e1xima de Vento\": 5.536435304198769, \"Velocidade Hor\\u00e1ria do Vento\": 2.636675777246326}, {\"Cidade\": \"Salin\\u00f3polis\", \"Precipita\\u00e7\\u00e3o\": 0.3854794121926368, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1008.9354430379742, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1009.200495988329, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1008.6676732312175, \"Radia\\u00e7\\u00e3o Global\": 1179.2050063211132, \"Temperatura do ar - bulbo seco\": 26.973388622144533, \"Temperatura do ponto de orvalho\": 23.153135457587595, \"Temperatura m\\u00e1xima\": 27.414923413566626, \"Temperatura m\\u00ednima\": 26.5760758570387, \"Temperatura orvalho m\\u00e1xima\": 23.555025528811147, \"Temperatura orvalho m\\u00ednima\": 22.78414296134212, \"Umidade Relativa m\\u00e1xima\": 81.94412837345004, \"Umidade Relativa m\\u00ednima\": 78.13362509117432, \"Umidade Relativa do Ar\": 80.11799796304379, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 77.1168509895227, \"Rajada M\\u00e1xima de Vento\": 6.359524157057375, \"Velocidade Hor\\u00e1ria do Vento\": 1.638853317811406}, {\"Cidade\": \"Santana do Araguaia\", \"Precipita\\u00e7\\u00e3o\": 0.1896768299646002, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 991.1070001141976, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 991.4926222019194, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 990.6026496116996, \"Radia\\u00e7\\u00e3o Global\": 1345.8996836777708, \"Temperatura do ar - bulbo seco\": 26.860111910471513, \"Temperatura do ponto de orvalho\": 19.875459632294145, \"Temperatura m\\u00e1xima\": 27.638602101416005, \"Temperatura m\\u00ednima\": 26.121596619460846, \"Temperatura orvalho m\\u00e1xima\": 20.412768387391566, \"Temperatura orvalho m\\u00ednima\": 19.334559159433564, \"Umidade Relativa m\\u00e1xima\": 72.91731384193696, \"Umidade Relativa m\\u00ednima\": 66.79830973047054, \"Umidade Relativa do Ar\": 69.92611624985726, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 188.88260819915496, \"Rajada M\\u00e1xima de Vento\": 3.6424280493375836, \"Velocidade Hor\\u00e1ria do Vento\": 1.3050131323512688}, {\"Cidade\": \"Santar\\u00e9m\", \"Precipita\\u00e7\\u00e3o\": 0.3819406392694053, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 994.7430365296813, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 995.0462442922408, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 994.4405936073057, \"Radia\\u00e7\\u00e3o Global\": 1391.315915789475, \"Temperatura do ar - bulbo seco\": 26.271335616438343, \"Temperatura do ponto de orvalho\": 22.963881278538786, \"Temperatura m\\u00e1xima\": 26.631267123287603, \"Temperatura m\\u00ednima\": 25.927180365296802, \"Temperatura orvalho m\\u00e1xima\": 23.32062785388125, \"Temperatura orvalho m\\u00ednima\": 22.60237442922382, \"Umidade Relativa m\\u00e1xima\": 84.8230593607306, \"Umidade Relativa m\\u00ednima\": 80.78333333333333, \"Umidade Relativa do Ar\": 82.88801369863013, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 137.27678061049502, \"Rajada M\\u00e1xima de Vento\": 3.5485812356979225, \"Velocidade Hor\\u00e1ria do Vento\": 1.1803085714285617}, {\"Cidade\": \"Soure\", \"Precipita\\u00e7\\u00e3o\": 0.21275418453451525, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1010.3953525825392, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1010.6716783618991, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1010.1191303347509, \"Radia\\u00e7\\u00e3o Global\": 1360.3784109816959, \"Temperatura do ar - bulbo seco\": 27.333797308178962, \"Temperatura do ponto de orvalho\": 22.96133670769572, \"Temperatura m\\u00e1xima\": 27.78824341424134, \"Temperatura m\\u00ednima\": 26.919590475094935, \"Temperatura orvalho m\\u00e1xima\": 23.37960427930516, \"Temperatura orvalho m\\u00ednima\": 22.582020016104895, \"Umidade Relativa m\\u00e1xima\": 79.39042908086967, \"Umidade Relativa m\\u00ednima\": 75.76670884619809, \"Umidade Relativa do Ar\": 77.64293109398366, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 85.09916024387438, \"Rajada M\\u00e1xima de Vento\": 6.635683883584508, \"Velocidade Hor\\u00e1ria do Vento\": 2.5635683883584455}, {\"Cidade\": \"S\\u00e3o F\\u00e9lix do Xingu\", \"Precipita\\u00e7\\u00e3o\": 0.17305319326329874, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 988.1314490578623, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 990.8391195597802, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 985.5444055361015, \"Radia\\u00e7\\u00e3o Global\": 947.819497928346, \"Temperatura do ar - bulbo seco\": 25.89378022344508, \"Temperatura do ponto de orvalho\": 21.719443054860744, \"Temperatura m\\u00e1xima\": 26.50416875104217, \"Temperatura m\\u00ednima\": 25.307236951809312, \"Temperatura orvalho m\\u00e1xima\": 22.23958645989663, \"Temperatura orvalho m\\u00ednima\": 21.23139903284977, \"Umidade Relativa m\\u00e1xima\": 83.24328831082208, \"Umidade Relativa m\\u00ednima\": 77.40803735200934, \"Umidade Relativa do Ar\": 80.37818909454727, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 171.5767883941971, \"Rajada M\\u00e1xima de Vento\": 3.403885923949294, \"Velocidade Hor\\u00e1ria do Vento\": 1.5109721527430302}, {\"Cidade\": \"Tom\\u00e9-A\\u00e7u\", \"Precipita\\u00e7\\u00e3o\": 0.2307441481308966, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1006.3444663116438, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1006.6542843909181, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1006.0404469661869, \"Radia\\u00e7\\u00e3o Global\": 1290.511635969665, \"Temperatura do ar - bulbo seco\": 26.401099791618478, \"Temperatura do ponto de orvalho\": 22.950706181986597, \"Temperatura m\\u00e1xima\": 26.88288559518284, \"Temperatura m\\u00ednima\": 25.92641269106075, \"Temperatura orvalho m\\u00e1xima\": 23.387227883279387, \"Temperatura orvalho m\\u00ednima\": 22.540076424270463, \"Umidade Relativa m\\u00e1xima\": 85.46723019916628, \"Umidade Relativa m\\u00ednima\": 80.30314960629921, \"Umidade Relativa do Ar\": 82.91502662653392, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 149.88122250520954, \"Rajada M\\u00e1xima de Vento\": 2.8401459008800365, \"Velocidade Hor\\u00e1ria do Vento\": 0.6961449409585568}, {\"Cidade\": \"Tucum\\u00e3\", \"Precipita\\u00e7\\u00e3o\": 0.2189726027397268, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 975.7158561643847, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 976.0138812785385, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 975.4150342465729, \"Radia\\u00e7\\u00e3o Global\": 1246.6054031236843, \"Temperatura do ar - bulbo seco\": 25.364988584474766, \"Temperatura do ponto de orvalho\": 21.806426940639138, \"Temperatura m\\u00e1xima\": 26.07593607305939, \"Temperatura m\\u00ednima\": 24.71291095890402, \"Temperatura orvalho m\\u00e1xima\": 22.35799086757988, \"Temperatura orvalho m\\u00ednima\": 21.31140410958903, \"Umidade Relativa m\\u00e1xima\": 86.0898401826484, \"Umidade Relativa m\\u00ednima\": 80.33264840182649, \"Umidade Relativa do Ar\": 83.27819634703197, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 151.0306242638398, \"Rajada M\\u00e1xima de Vento\": 3.2187868080094235, \"Velocidade Hor\\u00e1ria do Vento\": 1.0947879858657261}, {\"Cidade\": \"Tucuru\\u00ed\", \"Precipita\\u00e7\\u00e3o\": 0.1453360768175582, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 994.6556543837355, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 994.9335108649339, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 994.3600979974449, \"Radia\\u00e7\\u00e3o Global\": 1299.49794222398, \"Temperatura do ar - bulbo seco\": 27.086446421008056, \"Temperatura do ponto de orvalho\": 21.979088983050808, \"Temperatura m\\u00e1xima\": 27.734299105240645, \"Temperatura m\\u00ednima\": 26.515786109927525, \"Temperatura orvalho m\\u00e1xima\": 22.572010232359794, \"Temperatura orvalho m\\u00ednima\": 21.400127904497914, \"Umidade Relativa m\\u00e1xima\": 78.93242379023663, \"Umidade Relativa m\\u00ednima\": 72.06480494564059, \"Umidade Relativa do Ar\": 75.63834745762712, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 202.57930449533504, \"Rajada M\\u00e1xima de Vento\": 3.007100213219608, \"Velocidade Hor\\u00e1ria do Vento\": 0.48390585241730116}, {\"Cidade\": \"Xinguara\", \"Precipita\\u00e7\\u00e3o\": 0.20817538250742237, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 984.013473395754, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 984.3078556748102, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 983.7193423155998, \"Radia\\u00e7\\u00e3o Global\": 1426.0036060733892, \"Temperatura do ar - bulbo seco\": 26.141185202100967, \"Temperatura do ponto de orvalho\": 21.310069722253914, \"Temperatura m\\u00e1xima\": 26.896072162594155, \"Temperatura m\\u00ednima\": 25.437896780086813, \"Temperatura orvalho m\\u00e1xima\": 21.91806348481384, \"Temperatura orvalho m\\u00ednima\": 20.756279972596467, \"Umidade Relativa m\\u00e1xima\": 80.4496460379082, \"Umidade Relativa m\\u00ednima\": 74.55800411052752, \"Umidade Relativa do Ar\": 77.60406903646131, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 143.53488372093022, \"Rajada M\\u00e1xima de Vento\": 3.3163375224416507, \"Velocidade Hor\\u00e1ria do Vento\": 1.2731663685152053}, {\"Cidade\": \"\\u00d3bidos\", \"Precipita\\u00e7\\u00e3o\": 0.2148630136986311, \"Press\\u00e3o Atmosf\\u00e9rica ao n\\u00edvel da esta\\u00e7\\u00e3o\": 1001.1944748858413, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00e1xima\": 1001.5013584474863, \"Press\\u00e3o Atmosf\\u00e9rica m\\u00ednima\": 1000.8873059360735, \"Radia\\u00e7\\u00e3o Global\": 1288.5399999999986, \"Temperatura do ar - bulbo seco\": 26.218424657534317, \"Temperatura do ponto de orvalho\": 22.492271689497716, \"Temperatura m\\u00e1xima\": 26.86950913242014, \"Temperatura m\\u00ednima\": 25.607431506849373, \"Temperatura orvalho m\\u00e1xima\": 22.975171232876672, \"Temperatura orvalho m\\u00ednima\": 22.039726027397215, \"Umidade Relativa m\\u00e1xima\": 84.45502283105023, \"Umidade Relativa m\\u00ednima\": 78.65707762557078, \"Umidade Relativa do Ar\": 81.6689497716895, \"Dire\\u00e7\\u00e3o Hor\\u00e1ria do Vento\": 238.61655251141553, \"Rajada M\\u00e1xima de Vento\": 0.0, \"Velocidade Hor\\u00e1ria do Vento\": 0.0}]}}, {\"mode\": \"vega-lite\"});\n",
       "</script>"
      ],
      "text/plain": [
       "alt.ConcatChart(...)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "base_cor = alt.Chart().mark_geoshape(\n",
    "    stroke=\"#555\",\n",
    "    strokeWidth=0.3,\n",
    "    color=\"darkgrey\"\n",
    ").encode(\n",
    "    alt.Tooltip([\"nome:N\"])\n",
    ").properties(width=280)\n",
    "\n",
    "def mapa(esquema):\n",
    "    return base_cor + base_cor.encode(alt.Color('Precipitação:Q', scale=alt.Scale(scheme=esquema), legend=None))\n",
    "\n",
    "alt.concat(\n",
    "    mapa('tealblues'), mapa('viridis'), mapa('blueorange'),\n",
    "    data=alt.Data(url=para_geo, format=alt.DataFormat(property='features',type='json'))\n",
    ").transform_calculate(\n",
    "    nome=\"datum.properties.name\"\n",
    ").transform_lookup(\n",
    "    lookup=\"nome\",\n",
    "    from_=alt.LookupData(data=df_aggr, key='Cidade', fields=list(df_aggr.columns))\n",
    ").transform_filter(\n",
    "    \"datum.Cidade !== 'MINA DO PALITO' && datum.Cidade !== 'SERRA DOS CARAJAS'\"\n",
    ").configure_view(\n",
    "    strokeWidth = 0\n",
    ").resolve_scale(\n",
    "    color='independent'\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "_Qual escala de cor mostra apresenta melhor a precipitação nesse mapa?_"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}