{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e8abbdd5",
   "metadata": {},
   "source": [
    "# Example Visualizations using CyberGIS-Vis"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66bde9ed",
   "metadata": {},
   "source": [
    "### Documentations and Demos about CyberGIS-Vis are available at: https://github.com/cybergis/CyberGIS-Vis"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "787d719f",
   "metadata": {},
   "source": [
    "## Setup environment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4eaef78c-e842-413e-91a7-3ad2fcf5039e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import geopandas as gpd\n",
    "from Adaptive_Choropleth_Mapper import Adaptive_Choropleth_Mapper_viz, Adaptive_Choropleth_Mapper_log"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a545f40b-dd42-427d-b36b-c7151e4c8a13",
   "metadata": {},
   "source": [
    "## Visualizations for Exploring Relationship between data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "69e7203c",
   "metadata": {
    "tags": []
   },
   "source": [
    "### Set input data: Socioeconomic and Demographic Data from LTDB"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "250cfd6b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geoid</th>\n",
       "      <th>period</th>\n",
       "      <th>n_asian_under_15</th>\n",
       "      <th>n_black_under_15</th>\n",
       "      <th>n_hispanic_under_15</th>\n",
       "      <th>n_native_under_15</th>\n",
       "      <th>n_white_under_15</th>\n",
       "      <th>n_persons_under_18</th>\n",
       "      <th>n_asian_over_60</th>\n",
       "      <th>n_black_over_60</th>\n",
       "      <th>...</th>\n",
       "      <th>n_vietnamese_persons</th>\n",
       "      <th>n_widowed_divorced</th>\n",
       "      <th>n_white_persons</th>\n",
       "      <th>n_total_housing_units_sample</th>\n",
       "      <th>p_white_over_60</th>\n",
       "      <th>p_black_over_60</th>\n",
       "      <th>p_hispanic_over_60</th>\n",
       "      <th>p_native_over_60</th>\n",
       "      <th>p_asian_over_60</th>\n",
       "      <th>p_disabled</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>06037101110</td>\n",
       "      <td>1980</td>\n",
       "      <td>4.512923</td>\n",
       "      <td>0.0</td>\n",
       "      <td>17.805532</td>\n",
       "      <td>3.938551</td>\n",
       "      <td>118.074478</td>\n",
       "      <td>159.429260</td>\n",
       "      <td>0.328213</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.164106</td>\n",
       "      <td>72.042664</td>\n",
       "      <td>NaN</td>\n",
       "      <td>216.045944</td>\n",
       "      <td>11.362683</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.181691</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.055905</td>\n",
       "      <td>4.416492</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>06037101122</td>\n",
       "      <td>1980</td>\n",
       "      <td>49.069336</td>\n",
       "      <td>0.0</td>\n",
       "      <td>193.180725</td>\n",
       "      <td>42.705280</td>\n",
       "      <td>1281.120850</td>\n",
       "      <td>1729.904922</td>\n",
       "      <td>3.555239</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>1.795797</td>\n",
       "      <td>781.720006</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2344.410583</td>\n",
       "      <td>11.367037</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.181974</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.055802</td>\n",
       "      <td>4.420126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>06037101210</td>\n",
       "      <td>1980</td>\n",
       "      <td>5.341171</td>\n",
       "      <td>0.0</td>\n",
       "      <td>143.240494</td>\n",
       "      <td>2.913366</td>\n",
       "      <td>473.907501</td>\n",
       "      <td>649.680603</td>\n",
       "      <td>2.913366</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>2.427805</td>\n",
       "      <td>468.080780</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1035.216064</td>\n",
       "      <td>11.672832</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.294698</td>\n",
       "      <td>0.184957</td>\n",
       "      <td>0.123305</td>\n",
       "      <td>9.103987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>06037101220</td>\n",
       "      <td>1980</td>\n",
       "      <td>5.658829</td>\n",
       "      <td>0.0</td>\n",
       "      <td>151.759506</td>\n",
       "      <td>3.086634</td>\n",
       "      <td>502.092438</td>\n",
       "      <td>688.319336</td>\n",
       "      <td>3.086634</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>2.572195</td>\n",
       "      <td>495.919190</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1096.783936</td>\n",
       "      <td>11.672832</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.294698</td>\n",
       "      <td>0.184957</td>\n",
       "      <td>0.123305</td>\n",
       "      <td>9.103987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>06037101300</td>\n",
       "      <td>1980</td>\n",
       "      <td>60.132671</td>\n",
       "      <td>0.0</td>\n",
       "      <td>100.549713</td>\n",
       "      <td>13.800941</td>\n",
       "      <td>691.032837</td>\n",
       "      <td>959.165405</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>5.914689</td>\n",
       "      <td>437.686981</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1358.406860</td>\n",
       "      <td>13.719433</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.334620</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>6.383527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9361</th>\n",
       "      <td>06037980031</td>\n",
       "      <td>2010</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>281.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>25.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9362</th>\n",
       "      <td>06037980033</td>\n",
       "      <td>2010</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9363</th>\n",
       "      <td>06037990100</td>\n",
       "      <td>2010</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9364</th>\n",
       "      <td>06037990200</td>\n",
       "      <td>2010</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9365</th>\n",
       "      <td>06037990300</td>\n",
       "      <td>2010</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>9366 rows × 192 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            geoid  period  n_asian_under_15  n_black_under_15  \\\n",
       "0     06037101110    1980          4.512923               0.0   \n",
       "1     06037101122    1980         49.069336               0.0   \n",
       "2     06037101210    1980          5.341171               0.0   \n",
       "3     06037101220    1980          5.658829               0.0   \n",
       "4     06037101300    1980         60.132671               0.0   \n",
       "...           ...     ...               ...               ...   \n",
       "9361  06037980031    2010          0.000000               0.0   \n",
       "9362  06037980033    2010          0.000000               0.0   \n",
       "9363  06037990100    2010          0.000000               0.0   \n",
       "9364  06037990200    2010          0.000000               0.0   \n",
       "9365  06037990300    2010          0.000000               0.0   \n",
       "\n",
       "      n_hispanic_under_15  n_native_under_15  n_white_under_15  \\\n",
       "0               17.805532           3.938551        118.074478   \n",
       "1              193.180725          42.705280       1281.120850   \n",
       "2              143.240494           2.913366        473.907501   \n",
       "3              151.759506           3.086634        502.092438   \n",
       "4              100.549713          13.800941        691.032837   \n",
       "...                   ...                ...               ...   \n",
       "9361             0.000000           0.000000          0.000000   \n",
       "9362             0.000000           0.000000          0.000000   \n",
       "9363             0.000000           0.000000          0.000000   \n",
       "9364             0.000000           0.000000          0.000000   \n",
       "9365             0.000000           0.000000          0.000000   \n",
       "\n",
       "      n_persons_under_18  n_asian_over_60  n_black_over_60  ...  \\\n",
       "0             159.429260         0.328213              0.0  ...   \n",
       "1            1729.904922         3.555239              0.0  ...   \n",
       "2             649.680603         2.913366              0.0  ...   \n",
       "3             688.319336         3.086634              0.0  ...   \n",
       "4             959.165405         0.000000              0.0  ...   \n",
       "...                  ...              ...              ...  ...   \n",
       "9361            0.000000              NaN              NaN  ...   \n",
       "9362            0.000000              NaN              NaN  ...   \n",
       "9363            0.000000              NaN              NaN  ...   \n",
       "9364            0.000000              NaN              NaN  ...   \n",
       "9365            0.000000              NaN              NaN  ...   \n",
       "\n",
       "      n_vietnamese_persons  n_widowed_divorced  n_white_persons  \\\n",
       "0                 0.164106           72.042664              NaN   \n",
       "1                 1.795797          781.720006              NaN   \n",
       "2                 2.427805          468.080780              NaN   \n",
       "3                 2.572195          495.919190              NaN   \n",
       "4                 5.914689          437.686981              NaN   \n",
       "...                    ...                 ...              ...   \n",
       "9361              0.000000          281.000000              NaN   \n",
       "9362              0.000000            0.000000              NaN   \n",
       "9363              0.000000            0.000000              NaN   \n",
       "9364              0.000000            0.000000              NaN   \n",
       "9365              0.000000            0.000000              NaN   \n",
       "\n",
       "      n_total_housing_units_sample  p_white_over_60  p_black_over_60  \\\n",
       "0                       216.045944        11.362683              0.0   \n",
       "1                      2344.410583        11.367037              0.0   \n",
       "2                      1035.216064        11.672832              0.0   \n",
       "3                      1096.783936        11.672832              0.0   \n",
       "4                      1358.406860        13.719433              0.0   \n",
       "...                            ...              ...              ...   \n",
       "9361                     25.000000              NaN              NaN   \n",
       "9362                      0.000000              NaN              NaN   \n",
       "9363                      0.000000              NaN              NaN   \n",
       "9364                      0.000000              NaN              NaN   \n",
       "9365                      0.000000              NaN              NaN   \n",
       "\n",
       "      p_hispanic_over_60  p_native_over_60  p_asian_over_60  p_disabled  \n",
       "0               0.181691          0.000000         0.055905    4.416492  \n",
       "1               0.181974          0.000000         0.055802    4.420126  \n",
       "2               1.294698          0.184957         0.123305    9.103987  \n",
       "3               1.294698          0.184957         0.123305    9.103987  \n",
       "4               0.334620          0.000000         0.000000    6.383527  \n",
       "...                  ...               ...              ...         ...  \n",
       "9361                 NaN               NaN              NaN         NaN  \n",
       "9362                 NaN               NaN              NaN         NaN  \n",
       "9363                 NaN               NaN              NaN         NaN  \n",
       "9364                 NaN               NaN              NaN         NaN  \n",
       "9365                 NaN               NaN              NaN         NaN  \n",
       "\n",
       "[9366 rows x 192 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "input_attributes = pd.read_csv(\"attributes/Los_Angeles_1980_1990_2000_2010.csv\", dtype={'geoid':str})\n",
    "input_attributes = input_attributes.rename(columns={'geoid': 'geoid', 'year': 'period'})\n",
    "input_attributes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "32474e42",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geoid</th>\n",
       "      <th>name</th>\n",
       "      <th>geometry</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>06037101110</td>\n",
       "      <td>101110</td>\n",
       "      <td>POLYGON ((-118.29792 34.26322, -118.29696 34.2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>06037101122</td>\n",
       "      <td>101122</td>\n",
       "      <td>POLYGON ((-118.29697 34.27881, -118.29410 34.2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>06037101210</td>\n",
       "      <td>101210</td>\n",
       "      <td>POLYGON ((-118.29945 34.25598, -118.29792 34.2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>06037101220</td>\n",
       "      <td>101220</td>\n",
       "      <td>POLYGON ((-118.27610 34.24648, -118.27618 34.2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>06037101300</td>\n",
       "      <td>101300</td>\n",
       "      <td>POLYGON ((-118.26602 34.24036, -118.26657 34.2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2339</th>\n",
       "      <td>06037920108</td>\n",
       "      <td>920108</td>\n",
       "      <td>POLYGON ((-118.55944 34.44441, -118.55957 34.4...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2340</th>\n",
       "      <td>06037920200</td>\n",
       "      <td>920200</td>\n",
       "      <td>POLYGON ((-118.57207 34.47017, -118.57211 34.4...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2341</th>\n",
       "      <td>06037990100</td>\n",
       "      <td>990100</td>\n",
       "      <td>POLYGON ((-118.94518 34.04309, -118.93753 34.0...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2342</th>\n",
       "      <td>06037990200</td>\n",
       "      <td>990200</td>\n",
       "      <td>POLYGON ((-118.42545 33.76085, -118.42816 33.7...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2343</th>\n",
       "      <td>06037990300</td>\n",
       "      <td>990300</td>\n",
       "      <td>POLYGON ((-118.24463 33.71077, -118.24457 33.7...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2344 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            geoid    name                                           geometry\n",
       "0     06037101110  101110  POLYGON ((-118.29792 34.26322, -118.29696 34.2...\n",
       "1     06037101122  101122  POLYGON ((-118.29697 34.27881, -118.29410 34.2...\n",
       "2     06037101210  101210  POLYGON ((-118.29945 34.25598, -118.29792 34.2...\n",
       "3     06037101220  101220  POLYGON ((-118.27610 34.24648, -118.27618 34.2...\n",
       "4     06037101300  101300  POLYGON ((-118.26602 34.24036, -118.26657 34.2...\n",
       "...           ...     ...                                                ...\n",
       "2339  06037920108  920108  POLYGON ((-118.55944 34.44441, -118.55957 34.4...\n",
       "2340  06037920200  920200  POLYGON ((-118.57207 34.47017, -118.57211 34.4...\n",
       "2341  06037990100  990100  POLYGON ((-118.94518 34.04309, -118.93753 34.0...\n",
       "2342  06037990200  990200  POLYGON ((-118.42545 33.76085, -118.42816 33.7...\n",
       "2343  06037990300  990300  POLYGON ((-118.24463 33.71077, -118.24457 33.7...\n",
       "\n",
       "[2344 rows x 3 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "shapefile = gpd.read_file(\"shp/Los_Angeles_tract/Los_Angeles_2.shp\")\n",
    "shapefile = shapefile.rename(columns={'tractID': 'geoid', 'tract_key': 'name'})\n",
    "shapefile"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "80368e00",
   "metadata": {},
   "source": [
    "### Adaptive Choropleth Mapper with Scatter Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "019f99e2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_LA_Scatter\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "C:\\Users\\bravo\\myworks\\CyberGIS-Vis-master\\CyberGIS-Vis-master\\Quantitative_Data_Vis\\ACM_LA_Scatter\\index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "C:\\Users\\bravo\\myworks\\CyberGIS-Vis-master\\CyberGIS-Vis-master\\Quantitative_Data_Vis/ACM_log.html\n",
      "Advanced options are available in \n",
      "C:\\Users\\bravo\\myworks\\CyberGIS-Vis-master\\CyberGIS-Vis-master\\Quantitative_Data_VisACM_LA_Scatter/data/CONFIG_LA_Scatter.js\n"
     ]
    }
   ],
   "source": [
    "param_Scatter = {\n",
    "    'title': \"Adaptive Choropleth Mapper with Scatter Plot\",\n",
    "    'filename_suffix': \"LA_Scatter\",\n",
    "    'inputCSV': input_attributes,   \n",
    "    'shapefile': shapefile,\n",
    "    'periods': [2010],\n",
    "    'shortLabelCSV': \"attributes/LTDB_ShortLabel.csv\",        \n",
    "    'variables': [         #enter variable names of the column you entered above.\n",
    "        \"p_nonhisp_white_persons\",\n",
    "        \"p_nonhisp_black_persons\",\n",
    "        \"p_hispanic_persons\",\n",
    "        \"p_asian_persons\",\n",
    "        \"p_foreign_born_pop\",\n",
    "        \"p_edu_college_greater\",\n",
    "        \"p_unemployment_rate\",\n",
    "        \"p_employed_manufacturing\",\n",
    "        \"p_poverty_rate\",\n",
    "        \"p_vacant_housing_units\",\n",
    "        \"p_owner_occupied_units\",\n",
    "        \"p_housing_units_multiunit_structures\",\n",
    "        \"median_home_value\",\n",
    "        \"p_structures_30_old\",\n",
    "        \"p_household_recent_move\",\n",
    "        \"p_persons_under_18\",\n",
    "        \"p_persons_over_60\",     \n",
    "    ],\n",
    "    'InitialLayers':[\"2010_% edu college greater\", \"2010_% employed manufacturing\" ],\n",
    "    'Map_width':\"470px\",\n",
    "    'Map_height':\"450px\", \n",
    "    'Scatter_Plot': True,        \n",
    "} \n",
    "Adaptive_Choropleth_Mapper_viz(param_Scatter)\n",
    "Adaptive_Choropleth_Mapper_log(param_Scatter) "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "df0dfe0d",
   "metadata": {},
   "source": [
    "### Adaptive Choropleth Mapper with Correlogram"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "b00c1dc6",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_LA_Correlogram\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis/ACM_LA_Correlogram/index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis//ACM_log.html\n",
      "Advanced options are available in \n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/edit/CyberGIS-Vis/Quantitative_Data_Vis/ACM_LA_Correlogram/data/CONFIG_LA_Correlogram.js\n"
     ]
    }
   ],
   "source": [
    "param_Correlogram = {\n",
    "    'title': \"Adaptive Choropleth Mapper with Correlogram\",\n",
    "    'filename_suffix': \"LA_Correlogram\",\n",
    "    'inputCSV': input_attributes,   \n",
    "    'shapefile': shapefile,\n",
    "    'NumOfMaps':6,\n",
    "    'periods': [2010],\n",
    "    'shortLabelCSV': \"attributes/LTDB_ShortLabel.csv\",       \n",
    "    'variables': [         #enter variable names of the column you entered above.\n",
    "        \"p_nonhisp_white_persons\",\n",
    "        \"p_nonhisp_black_persons\",\n",
    "        \"p_hispanic_persons\",\n",
    "        \"p_asian_persons\",\n",
    "        \"p_foreign_born_pop\",\n",
    "        \"p_edu_college_greater\",\n",
    "        \"p_unemployment_rate\",\n",
    "        \"p_employed_manufacturing\",\n",
    "        \"p_poverty_rate\",\n",
    "        \"p_vacant_housing_units\",\n",
    "        \"p_owner_occupied_units\",\n",
    "        \"p_housing_units_multiunit_structures\",\n",
    "        \"median_home_value\",\n",
    "        \"p_structures_30_old\",\n",
    "        \"p_household_recent_move\",\n",
    "        \"p_persons_under_18\",\n",
    "        \"p_persons_over_60\",     \n",
    "    ],\n",
    "    'Map_width':\"350px\",\n",
    "    'Map_height':\"350px\",\n",
    "    'Correlogram': True,        \n",
    "} \n",
    "Adaptive_Choropleth_Mapper_viz(param_Correlogram)\n",
    "Adaptive_Choropleth_Mapper_log(param_Correlogram)  "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b036e427-1236-43a9-829a-556b47edc636",
   "metadata": {},
   "source": [
    "### Adaptive Choropleth Mapper with Parallel Coordinate Plot (PCP) to visulize relationship between variables."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "7c0d50cb-e95a-4717-bb72-0661e36d27ed",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_Census_PCP\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis/ACM_Census_PCP/index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis//ACM_log.html\n",
      "Advanced options are available in \n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/edit/CyberGIS-Vis/Quantitative_Data_Vis/ACM_Census_PCP/data/CONFIG_Census_PCP.js\n"
     ]
    }
   ],
   "source": [
    "param_PCP = {\n",
    "    'title': \"Adaptive Choropleth Mapper with Paralle Coordinate Plot\",\n",
    "    'filename_suffix': \"Census_PCP\",                                      # max 30 character     \n",
    "    'inputCSV': input_attributes,   \n",
    "    'shapefile': shapefile, \n",
    "    'periods': [2010],\n",
    "    'variables': [         #enter variable names of the column you entered above.\n",
    "            \"p_nonhisp_white_persons\",\n",
    "            \"p_nonhisp_black_persons\",\n",
    "            \"p_hispanic_persons\",\n",
    "            \"p_asian_persons\",\n",
    "            \"p_employed_manufacturing\",\n",
    "            \"p_poverty_rate\",\n",
    "            \"p_foreign_born_pop\",\n",
    "            \"p_persons_under_18\",\n",
    "            \"p_persons_over_60\",  \n",
    "            \"p_edu_college_greater\",\n",
    "            \"p_unemployment_rate\",\n",
    "            \"p_employed_professional\",\n",
    "            \"p_vacant_housing_units\",\n",
    "            \"p_owner_occupied_units\",\n",
    "            \"p_housing_units_multiunit_structures\",\n",
    "            \"median_home_value\",\n",
    "            \"p_structures_30_old\",\n",
    "            \"p_household_recent_move\",\n",
    "      \n",
    "        ],\n",
    "    'shortLabelCSV': \"attributes/LTDB_ShortLabel.csv\",\n",
    "    'NumOfMaps':4,\n",
    "    'Map_width':\"350px\",\n",
    "    'Map_height':\"350px\", \n",
    "    'Top10_Chart': True,    \n",
    "    'Parallel_Coordinates_Plot': True,\n",
    "    'NumOfPCP':4,\n",
    "    'InitialVariablePCP': [\"2010_% white (non-Hispanic)\", \"2010_% black (non-Hispanic)\", \"2010_% Hispanic\", \"2010_% Asian & PI race\", \"2010_% professional employees\", \"2010_% manufacturing employees\", \"2010_% in poverty\", \"2010_% foreign born\", \"2010_% 17 and under (total)\", \"2010_% 60 and older\"]\n",
    "}\n",
    "Adaptive_Choropleth_Mapper_viz(param_PCP)\n",
    "Adaptive_Choropleth_Mapper_log(param_PCP)  "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "56be27cd",
   "metadata": {},
   "source": [
    "### Adaptive Choropleth Mapper with Stacked Chart"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "0c3d2c63",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_LA_Stacked\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis/ACM_LA_Stacked/index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis//ACM_log.html\n",
      "Advanced options are available in \n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/edit/CyberGIS-Vis/Quantitative_Data_Vis/ACM_LA_Stacked/data/CONFIG_LA_Stacked.js\n"
     ]
    }
   ],
   "source": [
    "param_Stacked = {\n",
    "    'title': \"Adaptive Choropleth Mapper with Stacked Chart\",\n",
    "    'filename_suffix': \"LA_Stacked\",\n",
    "    'inputCSV': input_attributes,   \n",
    "    'shapefile': shapefile,\n",
    "    'periods': [1980, 1990, 2000, 2010],\n",
    "    'NumOfMaps': 4,\n",
    "    'shortLabelCSV': \"attributes/LTDB_ShortLabel.csv\",       \n",
    "    'variables': [         #enter variable names of the column you entered above.\n",
    "            \"p_nonhisp_white_persons\",\n",
    "    ],\n",
    "    'Map_width':\"350px\",\n",
    "    'Map_height':\"350px\",    \n",
    "    'Stacked_Chart': True,  #Comment out if you do not want to visualize this chart       \n",
    "}  \n",
    "Adaptive_Choropleth_Mapper_viz(param_Stacked)\n",
    "Adaptive_Choropleth_Mapper_log(param_Stacked)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d22d95c6",
   "metadata": {},
   "source": [
    "### Adaptive Choropleth Mapper with Top 10 Bar Chart"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "fc756f85",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_LA_bar\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis/ACM_LA_bar/index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis//ACM_log.html\n",
      "Advanced options are available in \n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/edit/CyberGIS-Vis/Quantitative_Data_Vis/ACM_LA_bar/data/CONFIG_LA_bar.js\n"
     ]
    }
   ],
   "source": [
    "param_bar = {\n",
    "    'title': \"Adaptive Choropleth Mapper with Stacked Chart\",\n",
    "    'filename_suffix': \"LA_bar\",\n",
    "    'inputCSV': input_attributes,   \n",
    "    'shapefile': shapefile,\n",
    "    'periods': [1980, 1990, 2000, 2010],\n",
    "    'NumOfMaps': 3,\n",
    "    'shortLabelCSV': \"attributes/LTDB_ShortLabel.csv\",      \n",
    "    'variables': [         #enter variable names of the column you entered above.           \n",
    "        \"p_other_language\",\n",
    "        \"p_female_headed_families\",\n",
    "        \"per_capita_income\",     \n",
    "    ],\n",
    "    'Top10_Chart': True,  #Comment out if you do not want to visualize this chart      \n",
    "}  \n",
    "Adaptive_Choropleth_Mapper_viz(param_bar)\n",
    "Adaptive_Choropleth_Mapper_log(param_bar)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3d9bbb46",
   "metadata": {},
   "source": [
    "## Visualizations for Spatiotemporal Data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "68f04b06-abad-44cf-9ce8-6baab80a4955",
   "metadata": {},
   "source": [
    "### Set input data: COVID-19 data and the number of visits estimated based on Twitter data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "760be7fc-4c51-491a-b28a-c84fdebe6e74",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geoid</th>\n",
       "      <th>period</th>\n",
       "      <th>Confirmed Rate</th>\n",
       "      <th>Death Rate</th>\n",
       "      <th>The Number of Visits from Outside to Inside of the selected MSA</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2020-02-16</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>2020-02-16</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>2020-02-16</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>2020-02-16</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>2020-02-16</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53723</th>\n",
       "      <td>48260</td>\n",
       "      <td>2020-12-27</td>\n",
       "      <td>-9999</td>\n",
       "      <td>-9999</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53724</th>\n",
       "      <td>48300</td>\n",
       "      <td>2020-12-27</td>\n",
       "      <td>-9999</td>\n",
       "      <td>-9999</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53725</th>\n",
       "      <td>48460</td>\n",
       "      <td>2020-12-27</td>\n",
       "      <td>-9999</td>\n",
       "      <td>-9999</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53726</th>\n",
       "      <td>48540</td>\n",
       "      <td>2020-12-27</td>\n",
       "      <td>-9999</td>\n",
       "      <td>-9999</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53727</th>\n",
       "      <td>48580</td>\n",
       "      <td>2020-12-27</td>\n",
       "      <td>-9999</td>\n",
       "      <td>-9999</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>53728 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       geoid      period  Confirmed Rate  Death Rate  \\\n",
       "0          1  2020-02-16               0           0   \n",
       "1          2  2020-02-16               0           0   \n",
       "2          3  2020-02-16               0           0   \n",
       "3          4  2020-02-16               0           0   \n",
       "4          5  2020-02-16               0           0   \n",
       "...      ...         ...             ...         ...   \n",
       "53723  48260  2020-12-27           -9999       -9999   \n",
       "53724  48300  2020-12-27           -9999       -9999   \n",
       "53725  48460  2020-12-27           -9999       -9999   \n",
       "53726  48540  2020-12-27           -9999       -9999   \n",
       "53727  48580  2020-12-27           -9999       -9999   \n",
       "\n",
       "       The Number of Visits from Outside to Inside of the selected MSA  \n",
       "0                                                     26                \n",
       "1                                                     52                \n",
       "2                                                     60                \n",
       "3                                                     42                \n",
       "4                                                     25                \n",
       "...                                                  ...                \n",
       "53723                                                 21                \n",
       "53724                                                 50                \n",
       "53725                                                  4                \n",
       "53726                                                 36                \n",
       "53727                                                 35                \n",
       "\n",
       "[53728 rows x 5 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Covid_Visits = pd.read_csv(\"attributes/Covid_Visits.csv\", dtype={'geoid':str})\n",
    "Covid_Visits = Covid_Visits.rename(columns={'geoid': 'geoid'})\n",
    "Covid_Visits"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "e95cff58",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geoid</th>\n",
       "      <th>name</th>\n",
       "      <th>region</th>\n",
       "      <th>LON</th>\n",
       "      <th>LAT</th>\n",
       "      <th>ISO3</th>\n",
       "      <th>ISO3_1</th>\n",
       "      <th>Shape_Leng</th>\n",
       "      <th>Shape_Area</th>\n",
       "      <th>geometry</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>12660</td>\n",
       "      <td>Baraboo, WI</td>\n",
       "      <td>WI</td>\n",
       "      <td>-89.950</td>\n",
       "      <td>43.430</td>\n",
       "      <td>12660</td>\n",
       "      <td>None</td>\n",
       "      <td>2.322364</td>\n",
       "      <td>0.244303</td>\n",
       "      <td>POLYGON ((-90.31241 43.64100, -90.29665 43.641...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>38300</td>\n",
       "      <td>Pittsburgh, PA</td>\n",
       "      <td>PA</td>\n",
       "      <td>-79.830</td>\n",
       "      <td>40.440</td>\n",
       "      <td>38300</td>\n",
       "      <td>None</td>\n",
       "      <td>7.137698</td>\n",
       "      <td>1.468706</td>\n",
       "      <td>POLYGON ((-80.51922 39.96243, -80.51921 39.963...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>17460</td>\n",
       "      <td>Cleveland-Elyria, OH</td>\n",
       "      <td>OH</td>\n",
       "      <td>-81.680</td>\n",
       "      <td>41.380</td>\n",
       "      <td>17460</td>\n",
       "      <td>None</td>\n",
       "      <td>4.210584</td>\n",
       "      <td>0.562277</td>\n",
       "      <td>POLYGON ((-82.34808 41.42840, -82.34412 41.429...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>38920</td>\n",
       "      <td>Port Lavaca, TX</td>\n",
       "      <td>TX</td>\n",
       "      <td>-96.640</td>\n",
       "      <td>28.500</td>\n",
       "      <td>38920</td>\n",
       "      <td>None</td>\n",
       "      <td>3.901207</td>\n",
       "      <td>0.136378</td>\n",
       "      <td>MULTIPOLYGON (((-96.38985 28.38963, -96.38527 ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>48660</td>\n",
       "      <td>Wichita Falls, TX</td>\n",
       "      <td>TX</td>\n",
       "      <td>-98.490</td>\n",
       "      <td>33.770</td>\n",
       "      <td>48660</td>\n",
       "      <td>None</td>\n",
       "      <td>3.937540</td>\n",
       "      <td>0.674297</td>\n",
       "      <td>POLYGON ((-98.95383 33.49638, -98.95378 33.531...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1166</th>\n",
       "      <td>238</td>\n",
       "      <td>Saint Barthelemy, NORTH AMERICA</td>\n",
       "      <td>NORTH AMERICA</td>\n",
       "      <td>-63.062</td>\n",
       "      <td>18.047</td>\n",
       "      <td>BLM</td>\n",
       "      <td>None</td>\n",
       "      <td>0.309464</td>\n",
       "      <td>0.004696</td>\n",
       "      <td>POLYGON ((-63.02834 18.01555, -63.03334 18.015...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1167</th>\n",
       "      <td>239</td>\n",
       "      <td>Guernsey, EURPOE</td>\n",
       "      <td>EURPOE</td>\n",
       "      <td>-2.576</td>\n",
       "      <td>49.459</td>\n",
       "      <td>GGY</td>\n",
       "      <td>None</td>\n",
       "      <td>0.425255</td>\n",
       "      <td>0.009359</td>\n",
       "      <td>POLYGON ((-2.59083 49.42249, -2.59722 49.42249...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1168</th>\n",
       "      <td>240</td>\n",
       "      <td>Jersey, EURPOE</td>\n",
       "      <td>EURPOE</td>\n",
       "      <td>-2.129</td>\n",
       "      <td>49.219</td>\n",
       "      <td>JEY</td>\n",
       "      <td>None</td>\n",
       "      <td>0.579127</td>\n",
       "      <td>0.015408</td>\n",
       "      <td>POLYGON ((-2.01500 49.21417, -2.02111 49.17722...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1169</th>\n",
       "      <td>241</td>\n",
       "      <td>South Georgia South Sandwich Islands, ANTARCTICA</td>\n",
       "      <td>ANTARCTICA</td>\n",
       "      <td>-35.928</td>\n",
       "      <td>-54.658</td>\n",
       "      <td>SGS</td>\n",
       "      <td>None</td>\n",
       "      <td>9.364081</td>\n",
       "      <td>0.542074</td>\n",
       "      <td>MULTIPOLYGON (((-27.32584 -59.42722, -27.29806...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1170</th>\n",
       "      <td>242</td>\n",
       "      <td>Taiwan, ASIA</td>\n",
       "      <td>ASIA</td>\n",
       "      <td>120.946</td>\n",
       "      <td>23.754</td>\n",
       "      <td>TWN</td>\n",
       "      <td>None</td>\n",
       "      <td>10.419518</td>\n",
       "      <td>3.221167</td>\n",
       "      <td>MULTIPOLYGON (((121.57639 22.00139, 121.57027 ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1171 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      geoid                                              name         region  \\\n",
       "0     12660                                       Baraboo, WI             WI   \n",
       "1     38300                                    Pittsburgh, PA             PA   \n",
       "2     17460                              Cleveland-Elyria, OH             OH   \n",
       "3     38920                                   Port Lavaca, TX             TX   \n",
       "4     48660                                 Wichita Falls, TX             TX   \n",
       "...     ...                                               ...            ...   \n",
       "1166    238                   Saint Barthelemy, NORTH AMERICA  NORTH AMERICA   \n",
       "1167    239                                  Guernsey, EURPOE         EURPOE   \n",
       "1168    240                                    Jersey, EURPOE         EURPOE   \n",
       "1169    241  South Georgia South Sandwich Islands, ANTARCTICA     ANTARCTICA   \n",
       "1170    242                                      Taiwan, ASIA           ASIA   \n",
       "\n",
       "          LON     LAT   ISO3 ISO3_1  Shape_Leng  Shape_Area  \\\n",
       "0     -89.950  43.430  12660   None    2.322364    0.244303   \n",
       "1     -79.830  40.440  38300   None    7.137698    1.468706   \n",
       "2     -81.680  41.380  17460   None    4.210584    0.562277   \n",
       "3     -96.640  28.500  38920   None    3.901207    0.136378   \n",
       "4     -98.490  33.770  48660   None    3.937540    0.674297   \n",
       "...       ...     ...    ...    ...         ...         ...   \n",
       "1166  -63.062  18.047    BLM   None    0.309464    0.004696   \n",
       "1167   -2.576  49.459    GGY   None    0.425255    0.009359   \n",
       "1168   -2.129  49.219    JEY   None    0.579127    0.015408   \n",
       "1169  -35.928 -54.658    SGS   None    9.364081    0.542074   \n",
       "1170  120.946  23.754    TWN   None   10.419518    3.221167   \n",
       "\n",
       "                                               geometry  \n",
       "0     POLYGON ((-90.31241 43.64100, -90.29665 43.641...  \n",
       "1     POLYGON ((-80.51922 39.96243, -80.51921 39.963...  \n",
       "2     POLYGON ((-82.34808 41.42840, -82.34412 41.429...  \n",
       "3     MULTIPOLYGON (((-96.38985 28.38963, -96.38527 ...  \n",
       "4     POLYGON ((-98.95383 33.49638, -98.95378 33.531...  \n",
       "...                                                 ...  \n",
       "1166  POLYGON ((-63.02834 18.01555, -63.03334 18.015...  \n",
       "1167  POLYGON ((-2.59083 49.42249, -2.59722 49.42249...  \n",
       "1168  POLYGON ((-2.01500 49.21417, -2.02111 49.17722...  \n",
       "1169  MULTIPOLYGON (((-27.32584 -59.42722, -27.29806...  \n",
       "1170  MULTIPOLYGON (((121.57639 22.00139, 121.57027 ...  \n",
       "\n",
       "[1171 rows x 10 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "shapefile_MSA = gpd.read_file(\"shp/MSA_country/msa_country.shp\", dtype={'GEOID':str})\n",
    "shapefile_MSA = shapefile_MSA.rename(columns={'GEOID': 'geoid', 'NAME_1':'name'})\n",
    "shapefile_MSA"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e83cad34-a056-4055-8281-4382fbb23092",
   "metadata": {},
   "source": [
    "### Adaptive Choropleth Mapper with Multiple Line Chart (MLC)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "5f037329",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/data/cigi/cybergisx-easybuild/conda/python3-0.9.0/lib/python3.8/site-packages/pandas/core/dtypes/cast.py:1990: ShapelyDeprecationWarning: __len__ for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the `geoms` property instead to get the  number of parts of a multi-part geometry.\n",
      "  result[:] = values\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_COVID_MLC\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis/ACM_COVID_MLC/index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis//ACM_log.html\n",
      "Advanced options are available in \n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/edit/CyberGIS-Vis/Quantitative_Data_Vis/ACM_COVID_MLC/data/CONFIG_COVID_MLC.js\n"
     ]
    }
   ],
   "source": [
    "param_MLC_COVID = {\n",
    "    'title': \"Covid-19 Risk Assessment using Twitter, Metropolitan Statistical Areas, USA\",\n",
    "    'Subject': \"Temporal Patterns\",\n",
    "    'filename_suffix': \"COVID_MLC\",  # max 30 character      \n",
    "    'inputCSV': Covid_Visits,   \n",
    "    'shapefile': shapefile_MSA, \n",
    "    'periods': \"All\",\n",
    "    'variables': [         #enter variable names of the column you entered above.\n",
    "            \"Confirmed Rate\",\n",
    "            \"Death Rate\",\n",
    "            \"The Number of Visits from Outside to Inside of the selected MSA\"\n",
    "        ],\n",
    "    'NumOfMaps':2,\n",
    "    'InitialLayers':[\"2020-03-15_Confirmed Rate\" , \"2020-12-27_Confirmed Rate\"],\n",
    "    'Initial_map_center':[37, -97],\n",
    "    'Initial_map_zoom_level':4,    \n",
    "    'Map_width':\"650px\",\n",
    "    'Map_height':\"400px\", \n",
    "    'Top10_Chart': True,     \n",
    "    'Multiple_Line_Chart': True,\n",
    "    'NumOfMLC':3,\n",
    "    'titlesOfMLC':[\"1. COVID-19 Confirmed Cases (/100k pop)\", \"2. COVID-19 Death Cases (/100k pop)\", \"3. The Number of Visits from Outside to Inside of the selected MSA\"],\n",
    "    'DefaultRegion_MLC':\"35620\" \n",
    "}\n",
    "Adaptive_Choropleth_Mapper_viz(param_MLC_COVID)\n",
    "Adaptive_Choropleth_Mapper_log(param_MLC_COVID)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "603f3711",
   "metadata": {},
   "source": [
    "### Adaptive Choropleth Mapper with Comparison Line Chart (CLC)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "37955e39",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_COVID_CLC\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis/ACM_COVID_CLC/index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis//ACM_log.html\n",
      "Advanced options are available in \n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/edit/CyberGIS-Vis/Quantitative_Data_Vis/ACM_COVID_CLC/data/CONFIG_COVID_CLC.js\n"
     ]
    }
   ],
   "source": [
    "param_CLC_COVID = {\n",
    "    'title': \"Comparison of COVID-19 Confirmed Rate between Metropolitan Statistical Areas, USA\",\n",
    "    'Subject': \"Temporal Patterns\",\n",
    "    'filename_suffix': \"COVID_CLC\",                                      # max 30 character      \n",
    "    'inputCSV': Covid_Visits,   \n",
    "    'shapefile': shapefile_MSA, \n",
    "    'periods': \"All\",\n",
    "    'variables': [         #enter variable names of the column you entered above.\n",
    "            \"Confirmed Rate\"\n",
    "        ],\n",
    "    'NumOfMaps':2,\n",
    "    'InitialLayers':[\"2020-04-19_Confirmed Rate\" , \"2020-11-01_Confirmed Rate\"],\n",
    "    'Initial_map_center':[37, -97],\n",
    "    'Initial_map_zoom_level':4,    \n",
    "    'Map_width':\"650px\",\n",
    "    'Map_height':\"400px\",     \n",
    "    'Top10_Chart': True,     \n",
    "    'Comparision_Chart': True,\n",
    "    'NumOfCLC': 46,\n",
    "    'DefaultRegion_CLC': [\"35620\", \"16980\"] \n",
    "}\n",
    "Adaptive_Choropleth_Mapper_viz(param_CLC_COVID)\n",
    "Adaptive_Choropleth_Mapper_log(param_CLC_COVID)  "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8be9fd23",
   "metadata": {},
   "source": [
    "## More Examples"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7ea41489-cc21-4449-831d-b04d76a02166",
   "metadata": {},
   "source": [
    "### Set input data: HIV data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "d33a90e5-79ae-4b24-9c03-c8a42a21ecaa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geoid</th>\n",
       "      <th>period</th>\n",
       "      <th>Health Care Center (/100k pop)</th>\n",
       "      <th>HIV</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1001</td>\n",
       "      <td>2012</td>\n",
       "      <td>3.796153</td>\n",
       "      <td>15.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1003</td>\n",
       "      <td>2012</td>\n",
       "      <td>2.507915</td>\n",
       "      <td>7.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1005</td>\n",
       "      <td>2012</td>\n",
       "      <td>6.641990</td>\n",
       "      <td>14.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1007</td>\n",
       "      <td>2012</td>\n",
       "      <td>4.207311</td>\n",
       "      <td>17.70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1009</td>\n",
       "      <td>2012</td>\n",
       "      <td>2.630077</td>\n",
       "      <td>6.92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21954</th>\n",
       "      <td>56037</td>\n",
       "      <td>2018</td>\n",
       "      <td>4.474590</td>\n",
       "      <td>9.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21955</th>\n",
       "      <td>56039</td>\n",
       "      <td>2018</td>\n",
       "      <td>0.265288</td>\n",
       "      <td>17.17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21956</th>\n",
       "      <td>56041</td>\n",
       "      <td>2018</td>\n",
       "      <td>4.603247</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21957</th>\n",
       "      <td>56043</td>\n",
       "      <td>2018</td>\n",
       "      <td>7.180956</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21958</th>\n",
       "      <td>56045</td>\n",
       "      <td>2018</td>\n",
       "      <td>0.265288</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>21959 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       geoid  period  Health Care Center (/100k pop)    HIV\n",
       "0       1001    2012                        3.796153  15.50\n",
       "1       1003    2012                        2.507915   7.50\n",
       "2       1005    2012                        6.641990  14.71\n",
       "3       1007    2012                        4.207311  17.70\n",
       "4       1009    2012                        2.630077   6.92\n",
       "...      ...     ...                             ...    ...\n",
       "21954  56037    2018                        4.474590   9.15\n",
       "21955  56039    2018                        0.265288  17.17\n",
       "21956  56041    2018                        4.603247   0.00\n",
       "21957  56043    2018                        7.180956   0.00\n",
       "21958  56045    2018                        0.265288   0.00\n",
       "\n",
       "[21959 rows x 4 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "input_attributes_hiv = pd.read_csv(\"attributes/HIV_US_multiple_long.csv\", dtype={'geoid':str})\n",
    "input_attributes_hiv = input_attributes_hiv.rename(columns={'geoid': 'geoid'})\n",
    "input_attributes_hiv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "657e6d1d-c788-4fbd-9b51-ce23a2b1b294",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>geoid</th>\n",
       "      <th>name</th>\n",
       "      <th>geometry</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2013</td>\n",
       "      <td>Aleutians East,AK</td>\n",
       "      <td>MULTIPOLYGON (((-162.63769 54.80112, -162.6440...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2016</td>\n",
       "      <td>Aleutians West,AK</td>\n",
       "      <td>MULTIPOLYGON (((177.44593 52.11133, 177.44302 ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>28107</td>\n",
       "      <td>Panola,MS</td>\n",
       "      <td>POLYGON ((-90.19854 34.51109, -90.19863 34.554...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>28101</td>\n",
       "      <td>Newton,MS</td>\n",
       "      <td>POLYGON ((-88.91452 32.57695, -88.91559 32.558...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>28027</td>\n",
       "      <td>Coahoma,MS</td>\n",
       "      <td>POLYGON ((-90.65700 33.98759, -90.66036 33.987...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3216</th>\n",
       "      <td>27057</td>\n",
       "      <td>Hubbard,MN</td>\n",
       "      <td>POLYGON ((-95.16917 47.15252, -95.16909 47.182...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3217</th>\n",
       "      <td>27169</td>\n",
       "      <td>Winona,MN</td>\n",
       "      <td>POLYGON ((-92.07949 44.10699, -92.07921 44.117...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3218</th>\n",
       "      <td>2270</td>\n",
       "      <td>None</td>\n",
       "      <td>POLYGON ((-160.85114 63.01269, -160.85156 62.9...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3219</th>\n",
       "      <td>51515</td>\n",
       "      <td>None</td>\n",
       "      <td>POLYGON ((-79.54339 37.32615, -79.54230 37.334...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3220</th>\n",
       "      <td>46113</td>\n",
       "      <td>None</td>\n",
       "      <td>POLYGON ((-102.79211 42.99998, -102.86790 42.9...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3221 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      geoid               name  \\\n",
       "0      2013  Aleutians East,AK   \n",
       "1      2016  Aleutians West,AK   \n",
       "2     28107          Panola,MS   \n",
       "3     28101          Newton,MS   \n",
       "4     28027         Coahoma,MS   \n",
       "...     ...                ...   \n",
       "3216  27057         Hubbard,MN   \n",
       "3217  27169          Winona,MN   \n",
       "3218   2270               None   \n",
       "3219  51515               None   \n",
       "3220  46113               None   \n",
       "\n",
       "                                               geometry  \n",
       "0     MULTIPOLYGON (((-162.63769 54.80112, -162.6440...  \n",
       "1     MULTIPOLYGON (((177.44593 52.11133, 177.44302 ...  \n",
       "2     POLYGON ((-90.19854 34.51109, -90.19863 34.554...  \n",
       "3     POLYGON ((-88.91452 32.57695, -88.91559 32.558...  \n",
       "4     POLYGON ((-90.65700 33.98759, -90.66036 33.987...  \n",
       "...                                                 ...  \n",
       "3216  POLYGON ((-95.16917 47.15252, -95.16909 47.182...  \n",
       "3217  POLYGON ((-92.07949 44.10699, -92.07921 44.117...  \n",
       "3218  POLYGON ((-160.85114 63.01269, -160.85156 62.9...  \n",
       "3219  POLYGON ((-79.54339 37.32615, -79.54230 37.334...  \n",
       "3220  POLYGON ((-102.79211 42.99998, -102.86790 42.9...  \n",
       "\n",
       "[3221 rows x 3 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "shapefile_us = gpd.read_file(\"shp/US/counties.shp\")\n",
    "shapefile_us"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0c5fa09f",
   "metadata": {
    "tags": []
   },
   "source": [
    "### Adaptive Choropleth Mapper with Parallel Coordinate Plot (PCP) for Time Series Visualization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "9425d37b",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/data/cigi/cybergisx-easybuild/conda/python3-0.9.0/lib/python3.8/site-packages/pandas/core/dtypes/cast.py:1990: ShapelyDeprecationWarning: __len__ for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the `geoms` property instead to get the  number of parts of a multi-part geometry.\n",
      "  result[:] = values\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "output directory :  ACM_HIV_PCP\n",
      "To see your visualization, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis/ACM_HIV_PCP/index.html\n",
      "To access all visualizations that you have created, click the URL below (or locate the files):\n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/view/CyberGIS-Vis/Quantitative_Data_Vis//ACM_log.html\n",
      "Advanced options are available in \n",
      "https://cybergisx.cigi.illinois.edu/user/suhan2/edit/CyberGIS-Vis/Quantitative_Data_Vis/ACM_HIV_PCP/data/CONFIG_HIV_PCP.js\n"
     ]
    }
   ],
   "source": [
    "param_PCP_hiv = {\n",
    "    'title': \"Adaptive Choropleth Mapper with Paralle Coordinate Plot\",\n",
    "    'filename_suffix': \"HIV_PCP\",                                      # max 30 character     \n",
    "    'inputCSV': input_attributes_hiv,   \n",
    "    'shapefile': shapefile_us, \n",
    "    'periods': [2012, 2013, 2014, 2015, 2016, 2017, 2018],\n",
    "    'variables': [         #enter variable names of the column you entered above.\n",
    "            \"HIV\",\n",
    "            #\"Health Care Center (/100k pop)\"\n",
    "        ],\n",
    "    'NumOfMaps':2,\n",
    "    'Initial_map_center':[37, -97],\n",
    "    'Initial_map_zoom_level':4,    \n",
    "    'Map_width':\"650px\",\n",
    "    'Map_height':\"410px\",     \n",
    "    'Top10_Chart': True,    \n",
    "    'Parallel_Coordinates_Plot': True,\n",
    "    'NumOfPCP':7,\n",
    "}\n",
    "Adaptive_Choropleth_Mapper_viz(param_PCP_hiv)\n",
    "Adaptive_Choropleth_Mapper_log(param_PCP_hiv)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5c80a78f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.10.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
