diff --git a/data/us_counties.db b/data/us_counties.db
new file mode 100644
index 00000000..d940034c
Binary files /dev/null and b/data/us_counties.db differ
diff --git a/docs/experimental_notebooks/SQLite_db.ipynb b/docs/experimental_notebooks/SQLite_db.ipynb
new file mode 100644
index 00000000..e9f4f84c
--- /dev/null
+++ b/docs/experimental_notebooks/SQLite_db.ipynb
@@ -0,0 +1,712 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import sqlite3\n",
+ "import csv\n",
+ "import os\n",
+ "from cities.utils.cleaning_utils import find_repo_root, standardize_and_scale\n",
+ "import pandas as pd\n",
+ "from cities.utils.data_grabber import list_available_features, DataGrabber\n",
+ "from typing import List\n",
+ "import time\n",
+ "import numpy as np\n",
+ "repo_root = find_repo_root()\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# What's here\n",
+ "- Construct SQLite us_counties.db file with all our current data\n",
+ "- DataGrabber_FROM_DB function \n",
+ "- Some tests\n",
+ "- Design Qs & to-dos"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Functions to read and write to a SQLite database\n",
+ "def add_variable_table_to_db(variable_name, database_path): \n",
+ " # check data format\n",
+ " df = pd.read_csv(os.path.join(repo_root, 'data', 'processed', variable_name + '_long.csv'))\n",
+ " df['GeoFIPS'] = df['GeoFIPS'].astype(str).str.zfill(5) # convert GeoFIPS to string with 5 digits\n",
+ " cols = df.columns\n",
+ " assert len(cols) == 4, 'Data should have 4 columns: GeoFIPS, GeoName, Year/Category, Value'\n",
+ " assert cols[0] == 'GeoFIPS' , 'First column should be GeoFIPS'\n",
+ " assert cols[1] == 'GeoName' , 'Second column should be GeoName'\n",
+ " col_name_category = cols[2] # sometimes this is year, sometimes category\n",
+ " col_name_value = cols[3] # usually this is value, sometimes more specific\n",
+ "\n",
+ " if df[col_name_category].dtype == 'int': \n",
+ " col_cat_type = 'INTEGER'\n",
+ " else:\n",
+ " col_cat_type = 'TEXT'\n",
+ "\n",
+ " if col_name_category == 'Year': \n",
+ " col_cat_type = 'DATE'\n",
+ "\n",
+ " # Step 1: Connect to a SQLite database\n",
+ " conn = sqlite3.connect(database_path)\n",
+ " cursor = conn.cursor()\n",
+ "\n",
+ " # Step 2: Drop the existing table if it exists\n",
+ " cursor.execute('DROP TABLE IF EXISTS ' + variable_name)\n",
+ "\n",
+ " # Create the table with a composite primary key\n",
+ " cursor.execute(\n",
+ " 'CREATE TABLE IF NOT EXISTS ' + variable_name + ' ('\n",
+ " '''GeoFIPS TEXT,\n",
+ " GeoName TEXT,'''\n",
+ " + col_name_category + ' ' + col_cat_type + ','\n",
+ " + col_name_value + ' REAL,'\n",
+ " 'PRIMARY KEY (GeoFIPS, ' + col_name_category + ')'\n",
+ " ')'\n",
+ " )\n",
+ " \n",
+ " # Use pandas to insert data\n",
+ " df.to_sql(variable_name, conn, if_exists='replace', index=False)\n",
+ " \n",
+ " # Close the connection\n",
+ " conn.commit()\n",
+ " conn.close()\n",
+ "\n",
+ "def read_variable_table_from_db(variable_name, database_path):\n",
+ " # Step 1: Connect to a SQLite database\n",
+ " conn = sqlite3.connect(database_path)\n",
+ " cursor = conn.cursor()\n",
+ "\n",
+ " # Step 2: Read the entire table into a pandas DataFrame\n",
+ " df = pd.read_sql_query('SELECT * FROM ' + variable_name, conn)\n",
+ "\n",
+ " # Step 4: Close the connection\n",
+ " conn.close()\n",
+ "\n",
+ " return df"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " GeoFIPS | \n",
+ " GeoName | \n",
+ " Year | \n",
+ " Value | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 01001 | \n",
+ " Autauga, AL | \n",
+ " 2001 | \n",
+ " 59.839 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 01003 | \n",
+ " Baldwin, AL | \n",
+ " 2001 | \n",
+ " 73.853 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 01005 | \n",
+ " Barbour, AL | \n",
+ " 2001 | \n",
+ " 113.864 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 01007 | \n",
+ " Bibb, AL | \n",
+ " 2001 | \n",
+ " 80.443 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 01009 | \n",
+ " Blount, AL | \n",
+ " 2001 | \n",
+ " 92.104 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2001 59.839\n",
+ "1 01003 Baldwin, AL 2001 73.853\n",
+ "2 01005 Barbour, AL 2001 113.864\n",
+ "3 01007 Bibb, AL 2001 80.443\n",
+ "4 01009 Blount, AL 2001 92.104"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Add a single variable (GDP) to the database, and read it back\n",
+ "variable_name = 'gdp'\n",
+ "database_path = os.path.join(repo_root, 'data', 'us_counties.db')\n",
+ "\n",
+ "add_variable_table_to_db(variable_name, database_path)\n",
+ "df = read_variable_table_from_db(variable_name, database_path)\n",
+ "df.head()\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "industry_mining_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 66.0\n",
+ "1 01001 Autauga, AL 2011 56.0\n",
+ "2 01001 Autauga, AL 2012 84.0\n",
+ "3 01001 Autauga, AL 2013 92.0\n",
+ "4 01001 Autauga, AL 2014 106.0\n",
+ "industry_other_services_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 1108.0\n",
+ "1 01001 Autauga, AL 2011 1069.0\n",
+ "2 01001 Autauga, AL 2012 1078.0\n",
+ "3 01001 Autauga, AL 2013 1415.0\n",
+ "4 01001 Autauga, AL 2014 1486.0\n",
+ "industry_admin_support_services_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 601.0\n",
+ "1 01001 Autauga, AL 2011 663.0\n",
+ "2 01001 Autauga, AL 2012 752.0\n",
+ "3 01001 Autauga, AL 2013 751.0\n",
+ "4 01001 Autauga, AL 2014 769.0\n",
+ "industry_healthcare_social_services_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 2574.0\n",
+ "1 01001 Autauga, AL 2011 2603.0\n",
+ "2 01001 Autauga, AL 2012 2780.0\n",
+ "3 01001 Autauga, AL 2013 2723.0\n",
+ "4 01001 Autauga, AL 2014 2799.0\n",
+ "unemployment_rate\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga County, AL 1990 6.5\n",
+ "1 01003 Baldwin County, AL 1990 5.3\n",
+ "2 01005 Barbour County, AL 1990 7.9\n",
+ "3 01007 Bibb County, AL 1990 9.2\n",
+ "4 01009 Blount County, AL 1990 6.4\n",
+ "gdp\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2001 59.839\n",
+ "1 01003 Baldwin, AL 2001 73.853\n",
+ "2 01005 Barbour, AL 2001 113.864\n",
+ "3 01007 Bibb, AL 2001 80.443\n",
+ "4 01009 Blount, AL 2001 92.104\n",
+ "transport\n",
+ " GeoFIPS GeoName Category Value\n",
+ "0 01001 Autauga, AL roadDensity 1.981182\n",
+ "1 01003 Baldwin, AL roadDensity 2.484343\n",
+ "2 01005 Barbour, AL roadDensity 1.457892\n",
+ "3 01007 Bibb, AL roadDensity 1.926318\n",
+ "4 01009 Blount, AL roadDensity 2.808981\n",
+ "population\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 1993 36953.0\n",
+ "1 01003 Baldwin, AL 1993 111416.0\n",
+ "2 01005 Barbour, AL 1993 27371.0\n",
+ "3 01007 Bibb, AL 1993 17757.0\n",
+ "4 01009 Blount, AL 1993 41866.0\n",
+ "industry_finance_insurance_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 1166.0\n",
+ "1 01001 Autauga, AL 2011 1079.0\n",
+ "2 01001 Autauga, AL 2012 1090.0\n",
+ "3 01001 Autauga, AL 2013 1052.0\n",
+ "4 01001 Autauga, AL 2014 1076.0\n",
+ "industry_construction_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 1884.0\n",
+ "1 01001 Autauga, AL 2011 1685.0\n",
+ "2 01001 Autauga, AL 2012 1362.0\n",
+ "3 01001 Autauga, AL 2013 1389.0\n",
+ "4 01001 Autauga, AL 2014 1355.0\n",
+ "industry_public_administration_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 2840.0\n",
+ "1 01001 Autauga, AL 2011 2721.0\n",
+ "2 01001 Autauga, AL 2012 2751.0\n",
+ "3 01001 Autauga, AL 2013 2727.0\n",
+ "4 01001 Autauga, AL 2014 2728.0\n",
+ "industry_retail_trade_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 3083.0\n",
+ "1 01001 Autauga, AL 2011 3017.0\n",
+ "2 01001 Autauga, AL 2012 3256.0\n",
+ "3 01001 Autauga, AL 2013 3238.0\n",
+ "4 01001 Autauga, AL 2014 3087.0\n",
+ "industry_professional_services_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 1096.0\n",
+ "1 01001 Autauga, AL 2011 1039.0\n",
+ "2 01001 Autauga, AL 2012 1038.0\n",
+ "3 01001 Autauga, AL 2013 1121.0\n",
+ "4 01001 Autauga, AL 2014 1200.0\n",
+ "spending_commerce\n",
+ " GeoFIPS GeoName Year total_obligated_amount\n",
+ "0 01001 Autauga, AL 2017 2364930.0\n",
+ "1 01003 Baldwin, AL 2011 1274298.0\n",
+ "2 01003 Baldwin, AL 2013 186580.0\n",
+ "3 01003 Baldwin, AL 2014 105434.0\n",
+ "4 01003 Baldwin, AL 2015 105434.0\n",
+ "industry_transportation_warehousing_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 797.0\n",
+ "1 01001 Autauga, AL 2011 1020.0\n",
+ "2 01001 Autauga, AL 2012 1084.0\n",
+ "3 01001 Autauga, AL 2013 1161.0\n",
+ "4 01001 Autauga, AL 2014 987.0\n",
+ "industry_educational_services_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 1669.0\n",
+ "1 01001 Autauga, AL 2011 1818.0\n",
+ "2 01001 Autauga, AL 2012 1755.0\n",
+ "3 01001 Autauga, AL 2013 1516.0\n",
+ "4 01001 Autauga, AL 2014 1522.0\n",
+ "ethnic_composition\n",
+ " GeoFIPS GeoName Category Value\n",
+ "0 01001 Autauga, AL mexican 0.007564\n",
+ "1 01003 Baldwin, AL mexican 0.012845\n",
+ "2 01005 Barbour, AL mexican 0.018449\n",
+ "3 01007 Bibb, AL mexican 0.005444\n",
+ "4 01009 Blount, AL mexican 0.042202\n",
+ "industry_information_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 274.0\n",
+ "1 01001 Autauga, AL 2011 240.0\n",
+ "2 01001 Autauga, AL 2012 271.0\n",
+ "3 01001 Autauga, AL 2013 269.0\n",
+ "4 01001 Autauga, AL 2014 322.0\n",
+ "industry_wholesale_trade_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 758.0\n",
+ "1 01001 Autauga, AL 2011 876.0\n",
+ "2 01001 Autauga, AL 2012 717.0\n",
+ "3 01001 Autauga, AL 2013 722.0\n",
+ "4 01001 Autauga, AL 2014 772.0\n",
+ "industry_agriculture_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 164.0\n",
+ "1 01001 Autauga, AL 2011 245.0\n",
+ "2 01001 Autauga, AL 2012 262.0\n",
+ "3 01001 Autauga, AL 2013 244.0\n",
+ "4 01001 Autauga, AL 2014 274.0\n",
+ "industry_management_enterprises_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 6.0\n",
+ "1 01001 Autauga, AL 2011 0.0\n",
+ "2 01001 Autauga, AL 2012 0.0\n",
+ "3 01001 Autauga, AL 2013 0.0\n",
+ "4 01001 Autauga, AL 2014 0.0\n",
+ "industry_utilities_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 280.0\n",
+ "1 01001 Autauga, AL 2011 259.0\n",
+ "2 01001 Autauga, AL 2012 288.0\n",
+ "3 01001 Autauga, AL 2013 248.0\n",
+ "4 01001 Autauga, AL 2014 264.0\n",
+ "industry_real_estate_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 424.0\n",
+ "1 01001 Autauga, AL 2011 408.0\n",
+ "2 01001 Autauga, AL 2012 397.0\n",
+ "3 01001 Autauga, AL 2013 375.0\n",
+ "4 01001 Autauga, AL 2014 365.0\n",
+ "industry\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL agri_forestry_mining 0.007731\n",
+ "1 01003 Baldwin, AL agri_forestry_mining 0.017506\n",
+ "2 01005 Barbour, AL agri_forestry_mining 0.054783\n",
+ "3 01007 Bibb, AL agri_forestry_mining 0.036361\n",
+ "4 01009 Blount, AL agri_forestry_mining 0.018273\n",
+ "spending_HHS\n",
+ " GeoFIPS GeoName Year total_obligated_amount\n",
+ "0 01001 Autauga, AL 2018 0.0\n",
+ "1 01003 Baldwin, AL 2010 49158971.0\n",
+ "2 01003 Baldwin, AL 2011 23130080.0\n",
+ "3 01003 Baldwin, AL 2012 23130080.0\n",
+ "4 01003 Baldwin, AL 2013 23130080.0\n",
+ "industry_arts_recreation_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 424.0\n",
+ "1 01001 Autauga, AL 2011 405.0\n",
+ "2 01001 Autauga, AL 2012 462.0\n",
+ "3 01001 Autauga, AL 2013 457.0\n",
+ "4 01001 Autauga, AL 2014 427.0\n",
+ "spending_transportation\n",
+ " GeoFIPS GeoName Year total_obligated_amount\n",
+ "0 01001 Autauga, AL 2011 1608527.0\n",
+ "1 01001 Autauga, AL 2012 134913.0\n",
+ "2 01001 Autauga, AL 2013 408157.0\n",
+ "3 01001 Autauga, AL 2014 218474.0\n",
+ "4 01001 Autauga, AL 2015 570771.0\n",
+ "industry_manufacturing_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 3439.0\n",
+ "1 01001 Autauga, AL 2011 3371.0\n",
+ "2 01001 Autauga, AL 2012 3278.0\n",
+ "3 01001 Autauga, AL 2013 3084.0\n",
+ "4 01001 Autauga, AL 2014 3194.0\n",
+ "urbanization\n",
+ " GeoFIPS GeoName Category Value\n",
+ "0 01001 Autauga, AL POPDEN_RUR 41.754892\n",
+ "1 01003 Baldwin, AL POPDEN_RUR 59.964624\n",
+ "2 01005 Barbour, AL POPDEN_RUR 18.920672\n",
+ "3 01007 Bibb, AL POPDEN_RUR 35.814001\n",
+ "4 01009 Blount, AL POPDEN_RUR 83.542270\n",
+ "industry_accommodation_food_services_total\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga, AL 2010 1688.0\n",
+ "1 01001 Autauga, AL 2011 1565.0\n",
+ "2 01001 Autauga, AL 2012 1420.0\n",
+ "3 01001 Autauga, AL 2013 1353.0\n",
+ "4 01001 Autauga, AL 2014 1410.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "# ADD ALL VARIABLES TO THE DB\n",
+ "# iterate over all variables\n",
+ "feature_list = list_available_features()\n",
+ "database_path = os.path.join(repo_root, 'data', 'us_counties.db')\n",
+ "for variable_name in feature_list:\n",
+ " print(variable_name)\n",
+ " add_variable_table_to_db(variable_name, database_path)\n",
+ " df = read_variable_table_from_db(variable_name, database_path)\n",
+ " print(df.head())\n",
+ "\n",
+ "\n",
+ "# Note, data/processed/industry_long.csv has a slight bug: 'Year' is a column name, when it should be 'Category'"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "class DataGrabber_FROM_DB:\n",
+ " def __init__(self):\n",
+ " self.repo_root = find_repo_root()\n",
+ " self.database_path = os.path.join(self.repo_root, 'data', 'us_counties.db')\n",
+ " self.wide = {}\n",
+ " self.std_wide = {}\n",
+ " self.long = {}\n",
+ " self.std_long = {}\n",
+ "\n",
+ " def _fetch_data(self, table_name: str) -> pd.DataFrame:\n",
+ " if table_name not in self.long:\n",
+ " conn = sqlite3.connect(self.database_path)\n",
+ " self.long[table_name] = pd.read_sql_query(f\"SELECT * FROM {table_name}\", conn)\n",
+ " conn.close()\n",
+ " return self.long[table_name]\n",
+ "\n",
+ " def _convert_to_wide(self, df: pd.DataFrame, index_cols: List[str], columns_col: str, values_col: str) -> pd.DataFrame:\n",
+ " # Pivot the DataFrame\n",
+ " df_wide = df.pivot(index=index_cols, columns=columns_col, values=values_col)\n",
+ "\n",
+ " # Reset the index and fill missing values with 0.0\n",
+ " df_wide.reset_index(inplace=True)\n",
+ "\n",
+ " # Fill NaN values with 0.0\n",
+ " df_wide.fillna(0.0, inplace=True)\n",
+ "\n",
+ " # Remove the name of the index column if it exists\n",
+ " df_wide.index.name = None\n",
+ "\n",
+ " # Ensure the column names do not retain the name of 'columns_col'\n",
+ " df_wide.columns.name = None\n",
+ "\n",
+ " return df_wide\n",
+ " def get_features_wide(self, features: List[str]) -> None:\n",
+ " for feature in features:\n",
+ " if feature not in self.wide:\n",
+ " df = self._fetch_data(feature)\n",
+ " columns_col = df.columns[-2]\n",
+ " values_col = df.columns[-1]\n",
+ " self.wide[feature] = self._convert_to_wide(df, ['GeoFIPS', 'GeoName'], columns_col, values_col)\n",
+ "\n",
+ " def get_features_std_wide(self, features: List[str]) -> None:\n",
+ " for feature in features:\n",
+ " if feature not in self.std_wide:\n",
+ " if feature not in self.wide:\n",
+ " self.get_features_wide([feature])\n",
+ " self.std_wide[feature] = standardize_and_scale(self.wide[feature])\n",
+ "\n",
+ " def get_features_long(self, features: List[str]) -> None:\n",
+ " for feature in features:\n",
+ " if feature not in self.long:\n",
+ " self._fetch_data(feature)\n",
+ "\n",
+ " def get_features_std_long(self, features: List[str]) -> None:\n",
+ " for feature in features:\n",
+ " if feature not in self.std_long:\n",
+ " if feature not in self.std_wide:\n",
+ " self.get_features_std_wide([feature])\n",
+ "\n",
+ " # Retrieve the standardized wide format data\n",
+ " df_wide = self.std_wide[feature]\n",
+ " df = self._fetch_data(feature)\n",
+ " columns_col = df.columns[-2]\n",
+ " values_col = df.columns[-1]\n",
+ " df_long = pd.melt(df_wide.copy(), id_vars=[\"GeoFIPS\", \"GeoName\"], var_name=columns_col, value_name=values_col)\n",
+ "\n",
+ " # Store the melted DataFrame\n",
+ " self.std_long[feature] = df_long\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "industry_mining_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_other_services_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_admin_support_services_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_healthcare_social_services_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "unemployment_rate\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "gdp\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "transport\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "population\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_finance_insurance_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_construction_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_public_administration_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_retail_trade_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_professional_services_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "spending_commerce\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_transportation_warehousing_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_educational_services_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "ethnic_composition\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_information_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_wholesale_trade_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_agriculture_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_management_enterprises_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_utilities_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_real_estate_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "spending_HHS\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_arts_recreation_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "spending_transportation\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_manufacturing_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "urbanization\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "industry_accommodation_food_services_total\n",
+ " Are the results identical?: long: False | wide: False | std_long: False | std_wide: False\n",
+ "CSV DataGrabber Time: 0.7896928787231445\n",
+ "DB DataGrabber Time: 1.2663300037384033\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Test that the two DataGrabbers give the same data, and compare speed\n",
+ "features = list_available_features()\n",
+ "\n",
+ "# Original DataGrabber (CSV)\n",
+ "start_time_csv = time.time()\n",
+ "data_grabber_csv = DataGrabber()\n",
+ "data_grabber_csv.get_features_long(features) \n",
+ "data_grabber_csv.get_features_wide(features) \n",
+ "data_grabber_csv.get_features_std_wide(features) \n",
+ "data_grabber_csv.get_features_std_long(features) \n",
+ "end_time_csv = time.time()\n",
+ "\n",
+ "# New DataGrabber (DB)\n",
+ "start_time_db = time.time()\n",
+ "data_grabber_db = DataGrabber_FROM_DB()\n",
+ "data_grabber_db.get_features_long(features) \n",
+ "data_grabber_db.get_features_wide(features)\n",
+ "data_grabber_db.get_features_std_wide(features)\n",
+ "data_grabber_db.get_features_std_long(features)\n",
+ "end_time_db = time.time()\n",
+ "\n",
+ "# Compare results (example for one feature)\n",
+ "for feature in features:\n",
+ " print(feature)\n",
+ " \n",
+ " # in the existing dataset, the years are inconsistent types (Str vs int). convert all to str\n",
+ " data_grabber_db.wide[feature].columns = data_grabber_db.wide[feature].columns.map(str)\n",
+ " data_grabber_csv.wide[feature].columns = data_grabber_csv.wide[feature].columns.map(str)\n",
+ " data_grabber_db.std_wide[feature].columns = data_grabber_db.std_wide[feature].columns.map(str)\n",
+ " data_grabber_csv.std_wide[feature].columns = data_grabber_csv.std_wide[feature].columns.map(str)\n",
+ "\n",
+ " # make the columns the same order\n",
+ " data_grabber_db.wide[feature] = data_grabber_db.wide[feature][data_grabber_csv.wide[feature].columns]\n",
+ "\n",
+ " # check that the results are identical\n",
+ " print( \" Are the results identical?: long: \", data_grabber_csv.long[feature].equals(data_grabber_db.long[feature]), \n",
+ " ' | wide: ', data_grabber_csv.wide[feature].equals(data_grabber_db.wide[feature]), \n",
+ " \" | std_long: \", data_grabber_csv.std_long[feature].equals(data_grabber_db.std_long[feature]),\n",
+ " ' | std_wide: ', data_grabber_csv.std_wide[feature].equals(data_grabber_db.std_wide[feature]))\n",
+ " # # data_grabber_db.std_wide[feature] = data_grabber_db.std_wide[feature][data_grabber_csv.std_wide[feature].columns]\n",
+ " # print('std_long: ', data_grabber_csv.std_long[feature].equals(data_grabber_db.std_long[feature]))\n",
+ " # print(data_grabber_csv.std_long[feature].head())\n",
+ " # print(data_grabber_db.std_long[feature].head())\n",
+ " # print()\n",
+ "\n",
+ "# Print performance\n",
+ "print(\"CSV DataGrabber Time:\", end_time_csv - start_time_csv)\n",
+ "print(\"DB DataGrabber Time:\", end_time_db - start_time_db)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " GeoFIPS GeoName Year Value\n",
+ "0 1001 Autauga County, AL 1990 0.020347\n",
+ "1 1003 Baldwin County, AL 1990 -0.047713\n",
+ "2 1005 Barbour County, AL 1990 0.099469\n",
+ "3 1007 Bibb County, AL 1990 0.171851\n",
+ "4 1009 Blount County, AL 1990 0.014674\n",
+ " GeoFIPS GeoName Year Value\n",
+ "0 01001 Autauga County, AL 1990 0.020347\n",
+ "1 01003 Baldwin County, AL 1990 -0.047713\n",
+ "2 01005 Barbour County, AL 1990 0.099469\n",
+ "3 01007 Bibb County, AL 1990 0.171851\n",
+ "4 01009 Blount County, AL 1990 0.014674\n"
+ ]
+ }
+ ],
+ "source": [
+ "# TODO: figure out inconsistence bt standardized versions -- likely type issue, they look the same to me. \n",
+ "# get the type of each column\n",
+ "dfA = data_grabber_csv.std_long['unemployment_rate']\n",
+ "dfB = data_grabber_db.std_long['unemployment_rate']\n",
+ "# check why they're not equal\n",
+ "print(dfA.head())\n",
+ "print(dfB.head())\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Next steps\n",
+ "See https://github.com/BasisResearch/cities/pull/59\n",
+ "\n",
+ "# Design decisions to make \n",
+ "- Years are sometimes str, sometimes int. What do we want?\n",
+ "- What relations do we want to build in between tables? (i.e link by GeoFIPS + Year)\n",
+ "- What data formats do we have in the .db, vs modify during the loading process (see new DataGrabber in this script)?Tradeoff is bt speed and size of dataset. (wide vs long vs std vs non-std)\n",
+ "- Do we want to include all data in .db, then handle exclusions? Currently, data is excluded everywhere when it's missing somewhere. \n",
+ "- Other than DataGrabber, what data querries are (/will be) used? "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "venv",
+ "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.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/docs/experimental_notebooks/inclusions_from_exclusions.ipynb b/docs/experimental_notebooks/inclusions_from_exclusions.ipynb
new file mode 100644
index 00000000..03591c2f
--- /dev/null
+++ b/docs/experimental_notebooks/inclusions_from_exclusions.ipynb
@@ -0,0 +1,1021 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import pickle\n",
+ "\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import os\n",
+ "import geopandas as gpd\n",
+ "from cities.utils.cleaning_utils import standardize_and_scale, find_repo_root"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{'transport': array([ 2282, 15901, 22051, 22071, 22075, 22087, 22089, 22095, 22103,\n",
+ " 51901, 51903, 51907, 51911, 51913, 51918, 51919, 51921, 51923,\n",
+ " 51929, 51931, 51933, 51939, 51941, 51942, 51944, 51945, 51947,\n",
+ " 51949, 51951, 51953, 51955, 51958])}"
+ ]
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "repo_root = find_repo_root()\n",
+ "with open(os.path.join(repo_root, \"data\", \"raw\", \"exclusions.pkl\"), \"rb\") as file:\n",
+ " exclusions = pickle.load(file)\n",
+ "exclusions"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " STATEFP | \n",
+ " COUNTYFP | \n",
+ " COUNTYNS | \n",
+ " AFFGEOID | \n",
+ " GEOID | \n",
+ " NAME | \n",
+ " NAMELSAD | \n",
+ " STUSPS | \n",
+ " STATE_NAME | \n",
+ " LSAD | \n",
+ " ALAND | \n",
+ " AWATER | \n",
+ " geometry | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 13 | \n",
+ " 239 | \n",
+ " 00350547 | \n",
+ " 0500000US13239 | \n",
+ " 13239 | \n",
+ " Quitman | \n",
+ " Quitman County | \n",
+ " GA | \n",
+ " Georgia | \n",
+ " 06 | \n",
+ " 391703076 | \n",
+ " 24158295 | \n",
+ " POLYGON ((-85.14183 31.83926, -85.11403 31.893... | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 18 | \n",
+ " 111 | \n",
+ " 00450376 | \n",
+ " 0500000US18111 | \n",
+ " 18111 | \n",
+ " Newton | \n",
+ " Newton County | \n",
+ " IN | \n",
+ " Indiana | \n",
+ " 06 | \n",
+ " 1040539827 | \n",
+ " 4349506 | \n",
+ " POLYGON ((-87.52665 41.16609, -87.39380 41.162... | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 19 | \n",
+ " 053 | \n",
+ " 00465215 | \n",
+ " 0500000US19053 | \n",
+ " 19053 | \n",
+ " Decatur | \n",
+ " Decatur County | \n",
+ " IA | \n",
+ " Iowa | \n",
+ " 06 | \n",
+ " 1377569408 | \n",
+ " 4138626 | \n",
+ " POLYGON ((-94.01480 40.89703, -93.55654 40.898... | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 24 | \n",
+ " 013 | \n",
+ " 01696228 | \n",
+ " 0500000US24013 | \n",
+ " 24013 | \n",
+ " Carroll | \n",
+ " Carroll County | \n",
+ " MD | \n",
+ " Maryland | \n",
+ " 06 | \n",
+ " 1159355859 | \n",
+ " 13112464 | \n",
+ " POLYGON ((-77.21702 39.72022, -76.99932 39.720... | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 29 | \n",
+ " 155 | \n",
+ " 00758532 | \n",
+ " 0500000US29155 | \n",
+ " 29155 | \n",
+ " Pemiscot | \n",
+ " Pemiscot County | \n",
+ " MO | \n",
+ " Missouri | \n",
+ " 06 | \n",
+ " 1275841039 | \n",
+ " 53915406 | \n",
+ " POLYGON ((-89.96131 36.38880, -89.75215 36.386... | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " STATEFP COUNTYFP COUNTYNS AFFGEOID GEOID NAME \\\n",
+ "0 13 239 00350547 0500000US13239 13239 Quitman \n",
+ "1 18 111 00450376 0500000US18111 18111 Newton \n",
+ "2 19 053 00465215 0500000US19053 19053 Decatur \n",
+ "3 24 013 01696228 0500000US24013 24013 Carroll \n",
+ "4 29 155 00758532 0500000US29155 29155 Pemiscot \n",
+ "\n",
+ " NAMELSAD STUSPS STATE_NAME LSAD ALAND AWATER \\\n",
+ "0 Quitman County GA Georgia 06 391703076 24158295 \n",
+ "1 Newton County IN Indiana 06 1040539827 4349506 \n",
+ "2 Decatur County IA Iowa 06 1377569408 4138626 \n",
+ "3 Carroll County MD Maryland 06 1159355859 13112464 \n",
+ "4 Pemiscot County MO Missouri 06 1275841039 53915406 \n",
+ "\n",
+ " geometry \n",
+ "0 POLYGON ((-85.14183 31.83926, -85.11403 31.893... \n",
+ "1 POLYGON ((-87.52665 41.16609, -87.39380 41.162... \n",
+ "2 POLYGON ((-94.01480 40.89703, -93.55654 40.898... \n",
+ "3 POLYGON ((-77.21702 39.72022, -76.99932 39.720... \n",
+ "4 POLYGON ((-89.96131 36.38880, -89.75215 36.386... "
+ ]
+ },
+ "execution_count": 26,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "url = \"https://www2.census.gov/geo/tiger/GENZ2021/shp/cb_2021_us_county_20m.zip\"\n",
+ "counties = gpd.read_file(url)\n",
+ "counties.head()\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " GeoFIPS | \n",
+ " GeoName | \n",
+ " 2001 | \n",
+ " 2002 | \n",
+ " 2003 | \n",
+ " 2004 | \n",
+ " 2005 | \n",
+ " 2006 | \n",
+ " 2007 | \n",
+ " 2008 | \n",
+ " ... | \n",
+ " 2011 | \n",
+ " 2013 | \n",
+ " 2014 | \n",
+ " 2015 | \n",
+ " 2016 | \n",
+ " 2017 | \n",
+ " 2018 | \n",
+ " 2019 | \n",
+ " 2020 | \n",
+ " 2021 | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 1001 | \n",
+ " Autauga, AL | \n",
+ " 59.839 | \n",
+ " 61.996 | \n",
+ " 63.508 | \n",
+ " 73.730 | \n",
+ " 75.307 | \n",
+ " 80.459 | \n",
+ " 81.836 | \n",
+ " 73.870 | \n",
+ " ... | \n",
+ " 86.679 | \n",
+ " 93.060 | \n",
+ " 93.155 | \n",
+ " 99.931 | \n",
+ " 104.090 | \n",
+ " 99.798 | \n",
+ " 100.854 | \n",
+ " 97.233 | \n",
+ " 96.115 | \n",
+ " 94.638 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 1003 | \n",
+ " Baldwin, AL | \n",
+ " 73.853 | \n",
+ " 77.273 | \n",
+ " 81.570 | \n",
+ " 90.523 | \n",
+ " 101.402 | \n",
+ " 104.553 | \n",
+ " 107.840 | \n",
+ " 102.635 | \n",
+ " ... | \n",
+ " 99.000 | \n",
+ " 104.651 | \n",
+ " 106.431 | \n",
+ " 110.434 | \n",
+ " 115.476 | \n",
+ " 118.498 | \n",
+ " 125.068 | \n",
+ " 131.431 | \n",
+ " 131.614 | \n",
+ " 144.294 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 1005 | \n",
+ " Barbour, AL | \n",
+ " 113.864 | \n",
+ " 111.853 | \n",
+ " 114.628 | \n",
+ " 124.473 | \n",
+ " 125.004 | \n",
+ " 122.611 | \n",
+ " 118.397 | \n",
+ " 110.695 | \n",
+ " ... | \n",
+ " 103.918 | \n",
+ " 113.335 | \n",
+ " 106.760 | \n",
+ " 103.702 | \n",
+ " 101.969 | \n",
+ " 100.509 | \n",
+ " 101.804 | \n",
+ " 102.053 | \n",
+ " 98.044 | \n",
+ " 99.393 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 1007 | \n",
+ " Bibb, AL | \n",
+ " 80.443 | \n",
+ " 81.527 | \n",
+ " 85.124 | \n",
+ " 89.317 | \n",
+ " 88.782 | \n",
+ " 89.597 | \n",
+ " 95.308 | \n",
+ " 94.745 | \n",
+ " ... | \n",
+ " 102.559 | \n",
+ " 99.537 | \n",
+ " 97.933 | \n",
+ " 94.594 | \n",
+ " 95.812 | \n",
+ " 96.878 | \n",
+ " 96.988 | \n",
+ " 104.620 | \n",
+ " 109.487 | \n",
+ " 107.878 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 1009 | \n",
+ " Blount, AL | \n",
+ " 92.104 | \n",
+ " 92.593 | \n",
+ " 95.469 | \n",
+ " 98.129 | \n",
+ " 100.918 | \n",
+ " 97.428 | \n",
+ " 96.720 | \n",
+ " 97.077 | \n",
+ " ... | \n",
+ " 91.938 | \n",
+ " 99.318 | \n",
+ " 101.584 | \n",
+ " 106.506 | \n",
+ " 98.394 | \n",
+ " 104.331 | \n",
+ " 109.560 | \n",
+ " 106.565 | \n",
+ " 100.422 | \n",
+ " 113.455 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
5 rows × 22 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " GeoFIPS GeoName 2001 2002 2003 2004 2005 2006 \\\n",
+ "0 1001 Autauga, AL 59.839 61.996 63.508 73.730 75.307 80.459 \n",
+ "1 1003 Baldwin, AL 73.853 77.273 81.570 90.523 101.402 104.553 \n",
+ "2 1005 Barbour, AL 113.864 111.853 114.628 124.473 125.004 122.611 \n",
+ "3 1007 Bibb, AL 80.443 81.527 85.124 89.317 88.782 89.597 \n",
+ "4 1009 Blount, AL 92.104 92.593 95.469 98.129 100.918 97.428 \n",
+ "\n",
+ " 2007 2008 ... 2011 2013 2014 2015 2016 \\\n",
+ "0 81.836 73.870 ... 86.679 93.060 93.155 99.931 104.090 \n",
+ "1 107.840 102.635 ... 99.000 104.651 106.431 110.434 115.476 \n",
+ "2 118.397 110.695 ... 103.918 113.335 106.760 103.702 101.969 \n",
+ "3 95.308 94.745 ... 102.559 99.537 97.933 94.594 95.812 \n",
+ "4 96.720 97.077 ... 91.938 99.318 101.584 106.506 98.394 \n",
+ "\n",
+ " 2017 2018 2019 2020 2021 \n",
+ "0 99.798 100.854 97.233 96.115 94.638 \n",
+ "1 118.498 125.068 131.431 131.614 144.294 \n",
+ "2 100.509 101.804 102.053 98.044 99.393 \n",
+ "3 96.878 96.988 104.620 109.487 107.878 \n",
+ "4 104.331 109.560 106.565 100.422 113.455 \n",
+ "\n",
+ "[5 rows x 22 columns]"
+ ]
+ },
+ "execution_count": 27,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "gdp = pd.read_csv(os.path.join(repo_root, \"data\", \"processed\", \"gdp_wide.csv\"))\n",
+ "gdp.head()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "I would like to merge two dataframes that have similar columns, but the columns may be named differently. Here is what they look like:\n",
+ "\n",
+ "```python\n",
+ "dfA.head() = \n",
+ "\tSTATEFP\tCOUNTYFP\tCOUNTYNS\tAFFGEOID\tGEOID\tNAME\tNAMELSAD\tSTUSPS\tSTATE_NAME\tLSAD\tALAND\tAWATER\tgeometry\n",
+ "0\t13\t239\t00350547\t0500000US13239\t13239\tQuitman\tQuitman County\tGA\tGeorgia\t06\t391703076\t24158295\tPOLYGON ((-85.14183 31.83926, -85.11403 31.893...\n",
+ "1\t18\t111\t00450376\t0500000US18111\t18111\tNewton\tNewton County\tIN\tIndiana\t06\t1040539827\t4349506\tPOLYGON ((-87.52665 41.16609, -87.39380 41.162...\n",
+ "2\t19\t053\t00465215\t0500000US19053\t19053\tDecatur\tDecatur County\tIA\tIowa\t06\t1377569408\t4138626\tPOLYGON ((-94.01480 40.89703, -93.55654 40.898...\n",
+ "3\t24\t013\t01696228\t0500000US24013\t24013\tCarroll\tCarroll County\tMD\tMaryland\t06\t1159355859\t13112464\tPOLYGON ((-77.21702 39.72022, -76.99932 39.720...\n",
+ "4\t29\t155\t00758532\t0500000US29155\t29155\tPemiscot\tPemiscot County\tMO\tMissouri\t06\t1275841039\t53915406\tPOLYGON ((-89.96131 36.38880, -89.75215 36.386..\n",
+ "\n",
+ "dfB.head() = \n",
+ "\tGeoFIPS\tGeoName\t2001\t2002\t2003\t2004\t2005\t2006\t2007\t2008\t...\t2011\t2013\t2014\t2015\t2016\t2017\t2018\t2019\t2020\t2021\n",
+ "0\t1001\tAutauga, AL\t59.839\t61.996\t63.508\t73.730\t75.307\t80.459\t81.836\t73.870\t...\t86.679\t93.060\t93.155\t99.931\t104.090\t99.798\t100.854\t97.233\t96.115\t94.638\n",
+ "1\t1003\tBaldwin, AL\t73.853\t77.273\t81.570\t90.523\t101.402\t104.553\t107.840\t102.635\t...\t99.000\t104.651\t106.431\t110.434\t115.476\t118.498\t125.068\t131.431\t131.614\t144.294\n",
+ "2\t1005\tBarbour, AL\t113.864\t111.853\t114.628\t124.473\t125.004\t122.611\t118.397\t110.695\t...\t103.918\t113.335\t106.760\t103.702\t101.969\t100.509\t101.804\t102.053\t98.044\t99.393\n",
+ "3\t1007\tBibb, AL\t80.443\t81.527\t85.124\t89.317\t88.782\t89.597\t95.308\t94.745\t...\t102.559\t99.537\t97.933\t94.594\t95.812\t96.878\t96.988\t104.620\t109.487\t107.878\n",
+ "4\t1009\tBlount, AL\t92.104\t92.593\t95.469\t98.129\t100.918\t97.428\t96.720\t97.077\t...\t91.938\t99.318\t101.584\t106.506\t98.394\t104.3\n",
+ "```\n",
+ "\n",
+ "\n",
+ "This is the information you will share. Take your time and be careful to include as much reliable information as you can. \n",
+ "```python\n",
+ "merged_columns = # a list of column names for a merged df. Only include variables that you think may contained in both dataframes, just in different formats. Be careful not to include variables that are only contained in one of the dataframes -- these will be addressed separately. But if you think there's a way to convert between the dataframes and compare them, please try it. \n",
+ "dict_dfA = # a dictionary of python code strings to compute the merging columns from dfA {'column1': 'dfA[\"var3\"].astype(str)', ...}\n",
+ "dict_dfB = # a dictionary of python code strings to compute the merging columns from dfB {'column1': 'dfB[\"blah4\"].astype(str)', ...}\n",
+ "Be very careful with your python strings to convert the data from dfA and dfB to the exact same format, so they can be merged later using pd.merge\n",
+ "redundant_cols_A = # a list of redundant columns for dfA. this should include all of the columns that were used to construct dict dfB redundant_col_A = [\"var3\", ...]\n",
+ "redundant_cols_B = # a list of redundant columns for dfB. this should include all of the columns that were used to construct dict dfB redundant_col_B = [\"blah4\", ...]\n",
+ "cols_to_aggregate = # a dictionary. Keys are columns that should be converted to numerical values (e.g. population), and entries are aggfunc that is appropriate (e.g. sum, median, mean)\n",
+ "```\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# function to use LLM for merge\n",
+ "def LLM_assisted_merge(dfA, dfB, merged_columns, dict_dfA, dict_dfB, redundant_cols_A, redundant_cols_B, cols_to_aggregate):\n",
+ " # Using the dictionaries, create new DataFrames with the desired column names\n",
+ " dfA_to_merge = dfA.copy()\n",
+ " dfB_to_merge = dfB.copy()\n",
+ "\n",
+ " # Rename columns in dfA_to_merge using dict_dfA\n",
+ " for merged_col, original_col in dict_dfA.items():\n",
+ " try:\n",
+ " dfA_to_merge[merged_col] = eval(original_col)\n",
+ " except Exception as e:\n",
+ " print(f\"Error processing column {merged_col} for dfA: {e}\")\n",
+ "\n",
+ " # Rename columns in dfB_to_merge using dict_dfB\n",
+ " for merged_col, original_col in dict_dfB.items():\n",
+ " try:\n",
+ " dfB_to_merge[merged_col] = eval(original_col)\n",
+ " except Exception as e:\n",
+ " print(f\"Error processing column {merged_col} for dfB: {e}\")\n",
+ "\n",
+ " # Now, perform the merge on the desired columns from the merged_columns list\n",
+ " merged_df = dfA_to_merge.merge(dfB_to_merge, on=merged_columns, how='left')\n",
+ "\n",
+ " # Drop the redundant columns\n",
+ " merged_df.drop(columns=redundant_cols_A, inplace=True)\n",
+ " merged_df.drop(columns=redundant_cols_B, inplace=True)\n",
+ "\n",
+ " # move the merged columns to the front\n",
+ " # merged_df = merged_df[merged_columns + [col for col in merged_df.columns if col not in merged_columns]]\n",
+ "\n",
+ " return merged_df"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " COUNTYNS | \n",
+ " AFFGEOID | \n",
+ " GEOID | \n",
+ " NAMELSAD | \n",
+ " STATE_NAME | \n",
+ " LSAD | \n",
+ " ALAND | \n",
+ " AWATER | \n",
+ " geometry | \n",
+ " 2001 | \n",
+ " ... | \n",
+ " 2011 | \n",
+ " 2013 | \n",
+ " 2014 | \n",
+ " 2015 | \n",
+ " 2016 | \n",
+ " 2017 | \n",
+ " 2018 | \n",
+ " 2019 | \n",
+ " 2020 | \n",
+ " 2021 | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 00350547 | \n",
+ " 0500000US13239 | \n",
+ " 13239 | \n",
+ " Quitman County | \n",
+ " Georgia | \n",
+ " 06 | \n",
+ " 391703076 | \n",
+ " 24158295 | \n",
+ " POLYGON ((-85.14183 31.83926, -85.11403 31.893... | \n",
+ " 93.749 | \n",
+ " ... | \n",
+ " 96.487 | \n",
+ " 104.040 | \n",
+ " 95.060 | \n",
+ " 99.568 | \n",
+ " 112.433 | \n",
+ " 96.579 | \n",
+ " 98.178 | \n",
+ " 89.801 | \n",
+ " 87.329 | \n",
+ " 83.995 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 00450376 | \n",
+ " 0500000US18111 | \n",
+ " 18111 | \n",
+ " Newton County | \n",
+ " Indiana | \n",
+ " 06 | \n",
+ " 1040539827 | \n",
+ " 4349506 | \n",
+ " POLYGON ((-87.52665 41.16609, -87.39380 41.162... | \n",
+ " 92.976 | \n",
+ " ... | \n",
+ " 103.674 | \n",
+ " 116.813 | \n",
+ " 117.127 | \n",
+ " 109.572 | \n",
+ " 96.604 | \n",
+ " 91.432 | \n",
+ " 96.704 | \n",
+ " 93.077 | \n",
+ " 97.061 | \n",
+ " 103.170 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 00465215 | \n",
+ " 0500000US19053 | \n",
+ " 19053 | \n",
+ " Decatur County | \n",
+ " Iowa | \n",
+ " 06 | \n",
+ " 1377569408 | \n",
+ " 4138626 | \n",
+ " POLYGON ((-94.01480 40.89703, -93.55654 40.898... | \n",
+ " 84.677 | \n",
+ " ... | \n",
+ " 100.799 | \n",
+ " 99.872 | \n",
+ " 98.776 | \n",
+ " 101.737 | \n",
+ " 105.433 | \n",
+ " 110.290 | \n",
+ " 112.890 | \n",
+ " 108.117 | \n",
+ " 101.654 | \n",
+ " 107.798 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 01696228 | \n",
+ " 0500000US24013 | \n",
+ " 24013 | \n",
+ " Carroll County | \n",
+ " Maryland | \n",
+ " 06 | \n",
+ " 1159355859 | \n",
+ " 13112464 | \n",
+ " POLYGON ((-77.21702 39.72022, -76.99932 39.720... | \n",
+ " 76.152 | \n",
+ " ... | \n",
+ " 97.683 | \n",
+ " 100.226 | \n",
+ " 99.510 | \n",
+ " 101.215 | \n",
+ " 101.568 | \n",
+ " 106.456 | \n",
+ " 104.838 | \n",
+ " 105.452 | \n",
+ " 101.050 | \n",
+ " 105.298 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 00758532 | \n",
+ " 0500000US29155 | \n",
+ " 29155 | \n",
+ " Pemiscot County | \n",
+ " Missouri | \n",
+ " 06 | \n",
+ " 1275841039 | \n",
+ " 53915406 | \n",
+ " POLYGON ((-89.96131 36.38880, -89.75215 36.386... | \n",
+ " 93.939 | \n",
+ " ... | \n",
+ " 110.203 | \n",
+ " 122.903 | \n",
+ " 98.475 | \n",
+ " 94.166 | \n",
+ " 107.345 | \n",
+ " 86.487 | \n",
+ " 80.452 | \n",
+ " 79.584 | \n",
+ " 83.561 | \n",
+ " 84.271 | \n",
+ "
\n",
+ " \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " 3216 | \n",
+ " 01155135 | \n",
+ " 0500000US41063 | \n",
+ " 41063 | \n",
+ " Wallowa County | \n",
+ " Oregon | \n",
+ " 06 | \n",
+ " 8147835333 | \n",
+ " 14191752 | \n",
+ " POLYGON ((-117.97766 46.00017, -117.71785 45.9... | \n",
+ " 84.127 | \n",
+ " ... | \n",
+ " 120.107 | \n",
+ " 94.471 | \n",
+ " 97.099 | \n",
+ " 92.511 | \n",
+ " 97.843 | \n",
+ " 108.082 | \n",
+ " 97.018 | \n",
+ " 102.353 | \n",
+ " 106.468 | \n",
+ " 116.035 | \n",
+ "
\n",
+ " \n",
+ " 3217 | \n",
+ " 00345714 | \n",
+ " 0500000US13163 | \n",
+ " 13163 | \n",
+ " Jefferson County | \n",
+ " Georgia | \n",
+ " 06 | \n",
+ " 1363771357 | \n",
+ " 8059597 | \n",
+ " POLYGON ((-82.66192 33.12633, -82.57882 33.119... | \n",
+ " 104.949 | \n",
+ " ... | \n",
+ " 102.334 | \n",
+ " 103.129 | \n",
+ " 97.550 | \n",
+ " 99.282 | \n",
+ " 104.701 | \n",
+ " 106.457 | \n",
+ " 99.390 | \n",
+ " 107.122 | \n",
+ " 109.003 | \n",
+ " 113.129 | \n",
+ "
\n",
+ " \n",
+ " 3218 | \n",
+ " 01419970 | \n",
+ " 0500000US02100 | \n",
+ " 02100 | \n",
+ " Haines Borough | \n",
+ " Alaska | \n",
+ " 04 | \n",
+ " 6069358955 | \n",
+ " 1041214321 | \n",
+ " POLYGON ((-136.46681 59.28425, -136.47433 59.4... | \n",
+ " NaN | \n",
+ " ... | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " 3219 | \n",
+ " 00069176 | \n",
+ " 0500000US05117 | \n",
+ " 05117 | \n",
+ " Prairie County | \n",
+ " Arkansas | \n",
+ " 06 | \n",
+ " 1677069877 | \n",
+ " 72638193 | \n",
+ " POLYGON ((-91.80251 35.03070, -91.70112 35.062... | \n",
+ " NaN | \n",
+ " ... | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " 3220 | \n",
+ " 01639733 | \n",
+ " 0500000US47025 | \n",
+ " 47025 | \n",
+ " Claiborne County | \n",
+ " Tennessee | \n",
+ " 06 | \n",
+ " 1125619421 | \n",
+ " 18052387 | \n",
+ " POLYGON ((-83.98761 36.58959, -83.93076 36.587... | \n",
+ " 89.804 | \n",
+ " ... | \n",
+ " 92.918 | \n",
+ " 99.310 | \n",
+ " 96.239 | \n",
+ " 97.251 | \n",
+ " 99.373 | \n",
+ " 97.697 | \n",
+ " 98.033 | \n",
+ " 99.350 | \n",
+ " 99.421 | \n",
+ " 106.743 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
3221 rows × 29 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " COUNTYNS AFFGEOID GEOID NAMELSAD STATE_NAME LSAD \\\n",
+ "0 00350547 0500000US13239 13239 Quitman County Georgia 06 \n",
+ "1 00450376 0500000US18111 18111 Newton County Indiana 06 \n",
+ "2 00465215 0500000US19053 19053 Decatur County Iowa 06 \n",
+ "3 01696228 0500000US24013 24013 Carroll County Maryland 06 \n",
+ "4 00758532 0500000US29155 29155 Pemiscot County Missouri 06 \n",
+ "... ... ... ... ... ... ... \n",
+ "3216 01155135 0500000US41063 41063 Wallowa County Oregon 06 \n",
+ "3217 00345714 0500000US13163 13163 Jefferson County Georgia 06 \n",
+ "3218 01419970 0500000US02100 02100 Haines Borough Alaska 04 \n",
+ "3219 00069176 0500000US05117 05117 Prairie County Arkansas 06 \n",
+ "3220 01639733 0500000US47025 47025 Claiborne County Tennessee 06 \n",
+ "\n",
+ " ALAND AWATER \\\n",
+ "0 391703076 24158295 \n",
+ "1 1040539827 4349506 \n",
+ "2 1377569408 4138626 \n",
+ "3 1159355859 13112464 \n",
+ "4 1275841039 53915406 \n",
+ "... ... ... \n",
+ "3216 8147835333 14191752 \n",
+ "3217 1363771357 8059597 \n",
+ "3218 6069358955 1041214321 \n",
+ "3219 1677069877 72638193 \n",
+ "3220 1125619421 18052387 \n",
+ "\n",
+ " geometry 2001 ... \\\n",
+ "0 POLYGON ((-85.14183 31.83926, -85.11403 31.893... 93.749 ... \n",
+ "1 POLYGON ((-87.52665 41.16609, -87.39380 41.162... 92.976 ... \n",
+ "2 POLYGON ((-94.01480 40.89703, -93.55654 40.898... 84.677 ... \n",
+ "3 POLYGON ((-77.21702 39.72022, -76.99932 39.720... 76.152 ... \n",
+ "4 POLYGON ((-89.96131 36.38880, -89.75215 36.386... 93.939 ... \n",
+ "... ... ... ... \n",
+ "3216 POLYGON ((-117.97766 46.00017, -117.71785 45.9... 84.127 ... \n",
+ "3217 POLYGON ((-82.66192 33.12633, -82.57882 33.119... 104.949 ... \n",
+ "3218 POLYGON ((-136.46681 59.28425, -136.47433 59.4... NaN ... \n",
+ "3219 POLYGON ((-91.80251 35.03070, -91.70112 35.062... NaN ... \n",
+ "3220 POLYGON ((-83.98761 36.58959, -83.93076 36.587... 89.804 ... \n",
+ "\n",
+ " 2011 2013 2014 2015 2016 2017 2018 2019 \\\n",
+ "0 96.487 104.040 95.060 99.568 112.433 96.579 98.178 89.801 \n",
+ "1 103.674 116.813 117.127 109.572 96.604 91.432 96.704 93.077 \n",
+ "2 100.799 99.872 98.776 101.737 105.433 110.290 112.890 108.117 \n",
+ "3 97.683 100.226 99.510 101.215 101.568 106.456 104.838 105.452 \n",
+ "4 110.203 122.903 98.475 94.166 107.345 86.487 80.452 79.584 \n",
+ "... ... ... ... ... ... ... ... ... \n",
+ "3216 120.107 94.471 97.099 92.511 97.843 108.082 97.018 102.353 \n",
+ "3217 102.334 103.129 97.550 99.282 104.701 106.457 99.390 107.122 \n",
+ "3218 NaN NaN NaN NaN NaN NaN NaN NaN \n",
+ "3219 NaN NaN NaN NaN NaN NaN NaN NaN \n",
+ "3220 92.918 99.310 96.239 97.251 99.373 97.697 98.033 99.350 \n",
+ "\n",
+ " 2020 2021 \n",
+ "0 87.329 83.995 \n",
+ "1 97.061 103.170 \n",
+ "2 101.654 107.798 \n",
+ "3 101.050 105.298 \n",
+ "4 83.561 84.271 \n",
+ "... ... ... \n",
+ "3216 106.468 116.035 \n",
+ "3217 109.003 113.129 \n",
+ "3218 NaN NaN \n",
+ "3219 NaN NaN \n",
+ "3220 99.421 106.743 \n",
+ "\n",
+ "[3221 rows x 29 columns]"
+ ]
+ },
+ "execution_count": 30,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#### START LLM PARAMS ####\n",
+ "# A list of column names for the merged dataframe. These columns will be our merging columns.\n",
+ "# merged_columns:\n",
+ "merged_columns = ['GeoFIPS', 'GeoName']\n",
+ "\n",
+ "# dict_dfA:\n",
+ "dict_dfA = {\n",
+ " 'GeoFIPS': 'dfA[\"STATEFP\"].astype(str) + dfA[\"COUNTYFP\"].astype(str)', \n",
+ " 'GeoName': 'dfA[\"NAME\"] + \", \" + dfA[\"STUSPS\"]'\n",
+ "}\n",
+ "\n",
+ "# dict_dfB:\n",
+ "dict_dfB = {\n",
+ " 'GeoFIPS': 'dfB[\"GeoFIPS\"].astype(str)', \n",
+ " 'GeoName': 'dfB[\"GeoName\"]'\n",
+ "}\n",
+ "\n",
+ "# redundant_cols_A:\n",
+ "redundant_cols_A = ['STATEFP', 'COUNTYFP', 'NAME', 'STUSPS']\n",
+ "\n",
+ "# redundant_cols_B:\n",
+ "redundant_cols_B = ['GeoFIPS', 'GeoName']\n",
+ "\n",
+ "# cols_to_aggregate:\n",
+ "# This is just a generic example since it's not clear which columns you want to aggregate.\n",
+ "cols_to_aggregate = {\n",
+ " '2001': 'sum', \n",
+ " '2002': 'sum', \n",
+ " # ... you can continue this pattern for each year\n",
+ " '2021': 'sum'\n",
+ "}\n",
+ "\n",
+ "#### END LLM PARAMS ####\n",
+ "\n",
+ "# using LLM params for merge\n",
+ "dfA = counties\n",
+ "dfB = gdp\n",
+ "\n",
+ "merged_df = LLM_assisted_merge(dfA, dfB, merged_columns, dict_dfA, dict_dfB, redundant_cols_A, redundant_cols_B, cols_to_aggregate)\n",
+ "\n",
+ "merged_df"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "KeyError",
+ "evalue": "'GeoFIPS'",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
+ "File \u001b[0;32m~/code/cities/venv/lib/python3.10/site-packages/pandas/core/indexes/base.py:3790\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3789\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m-> 3790\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_engine\u001b[39m.\u001b[39;49mget_loc(casted_key)\n\u001b[1;32m 3791\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mKeyError\u001b[39;00m \u001b[39mas\u001b[39;00m err:\n",
+ "File \u001b[0;32mindex.pyx:152\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[0;34m()\u001b[0m\n",
+ "File \u001b[0;32mindex.pyx:181\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[0;34m()\u001b[0m\n",
+ "File \u001b[0;32mpandas/_libs/hashtable_class_helper.pxi:7080\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
+ "File \u001b[0;32mpandas/_libs/hashtable_class_helper.pxi:7088\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
+ "\u001b[0;31mKeyError\u001b[0m: 'GeoFIPS'",
+ "\nThe above exception was the direct cause of the following exception:\n",
+ "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
+ "\u001b[1;32m/Users/emily/code/cities/docs/experimental_notebooks/inclusions_from_exclusions.ipynb Cell 8\u001b[0m line \u001b[0;36m7\n\u001b[1;32m 1\u001b[0m \u001b[39m# Replace exclusions.pkl with a file included_counties.csv, with columns GeoFIPS, GeoName, Included, Explanation.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m# Explanation is a string that explains why the county was excluded.\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[39m# Included is a boolean that is True if the county is included in the analysis.\u001b[39;00m\n\u001b[1;32m 4\u001b[0m \n\u001b[1;32m 5\u001b[0m \u001b[39m# make empty df with columns GeoFIPS, GeoName, Included, Explanation\u001b[39;00m\n\u001b[1;32m 6\u001b[0m included_counties \u001b[39m=\u001b[39m pd\u001b[39m.\u001b[39mDataFrame(columns\u001b[39m=\u001b[39m[\u001b[39m\"\u001b[39m\u001b[39mGeoFIPS\u001b[39m\u001b[39m\"\u001b[39m, \u001b[39m\"\u001b[39m\u001b[39mGeoName\u001b[39m\u001b[39m\"\u001b[39m, \u001b[39m\"\u001b[39m\u001b[39mIncluded\u001b[39m\u001b[39m\"\u001b[39m, \u001b[39m\"\u001b[39m\u001b[39mExplanation\u001b[39m\u001b[39m\"\u001b[39m])\n\u001b[0;32m----> 7\u001b[0m included_counties[\u001b[39m\"\u001b[39m\u001b[39mGeoFIPS\u001b[39m\u001b[39m\"\u001b[39m] \u001b[39m=\u001b[39m merged_df[\u001b[39m\"\u001b[39;49m\u001b[39mGeoFIPS\u001b[39;49m\u001b[39m\"\u001b[39;49m]\n\u001b[1;32m 8\u001b[0m included_counties[\u001b[39m\"\u001b[39m\u001b[39mGeoName\u001b[39m\u001b[39m\"\u001b[39m] \u001b[39m=\u001b[39m merged_df[\u001b[39m\"\u001b[39m\u001b[39mGeoName\u001b[39m\u001b[39m\"\u001b[39m]\n\u001b[1;32m 9\u001b[0m included_counties\n",
+ "File \u001b[0;32m~/code/cities/venv/lib/python3.10/site-packages/geopandas/geodataframe.py:1474\u001b[0m, in \u001b[0;36mGeoDataFrame.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 1468\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__getitem__\u001b[39m(\u001b[39mself\u001b[39m, key):\n\u001b[1;32m 1469\u001b[0m \u001b[39m \u001b[39m\u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 1470\u001b[0m \u001b[39m If the result is a column containing only 'geometry', return a\u001b[39;00m\n\u001b[1;32m 1471\u001b[0m \u001b[39m GeoSeries. If it's a DataFrame with any columns of GeometryDtype,\u001b[39;00m\n\u001b[1;32m 1472\u001b[0m \u001b[39m return a GeoDataFrame.\u001b[39;00m\n\u001b[1;32m 1473\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[0;32m-> 1474\u001b[0m result \u001b[39m=\u001b[39m \u001b[39msuper\u001b[39;49m()\u001b[39m.\u001b[39;49m\u001b[39m__getitem__\u001b[39;49m(key)\n\u001b[1;32m 1475\u001b[0m \u001b[39m# Custom logic to avoid waiting for pandas GH51895\u001b[39;00m\n\u001b[1;32m 1476\u001b[0m \u001b[39m# result is not geometry dtype for multi-indexes\u001b[39;00m\n\u001b[1;32m 1477\u001b[0m \u001b[39mif\u001b[39;00m (\n\u001b[1;32m 1478\u001b[0m pd\u001b[39m.\u001b[39mapi\u001b[39m.\u001b[39mtypes\u001b[39m.\u001b[39mis_scalar(key)\n\u001b[1;32m 1479\u001b[0m \u001b[39mand\u001b[39;00m key \u001b[39m==\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 1482\u001b[0m \u001b[39mand\u001b[39;00m \u001b[39mnot\u001b[39;00m is_geometry_type(result)\n\u001b[1;32m 1483\u001b[0m ):\n",
+ "File \u001b[0;32m~/code/cities/venv/lib/python3.10/site-packages/pandas/core/frame.py:3896\u001b[0m, in \u001b[0;36mDataFrame.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3894\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mcolumns\u001b[39m.\u001b[39mnlevels \u001b[39m>\u001b[39m \u001b[39m1\u001b[39m:\n\u001b[1;32m 3895\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_getitem_multilevel(key)\n\u001b[0;32m-> 3896\u001b[0m indexer \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mcolumns\u001b[39m.\u001b[39;49mget_loc(key)\n\u001b[1;32m 3897\u001b[0m \u001b[39mif\u001b[39;00m is_integer(indexer):\n\u001b[1;32m 3898\u001b[0m indexer \u001b[39m=\u001b[39m [indexer]\n",
+ "File \u001b[0;32m~/code/cities/venv/lib/python3.10/site-packages/pandas/core/indexes/base.py:3797\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3792\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39misinstance\u001b[39m(casted_key, \u001b[39mslice\u001b[39m) \u001b[39mor\u001b[39;00m (\n\u001b[1;32m 3793\u001b[0m \u001b[39misinstance\u001b[39m(casted_key, abc\u001b[39m.\u001b[39mIterable)\n\u001b[1;32m 3794\u001b[0m \u001b[39mand\u001b[39;00m \u001b[39many\u001b[39m(\u001b[39misinstance\u001b[39m(x, \u001b[39mslice\u001b[39m) \u001b[39mfor\u001b[39;00m x \u001b[39min\u001b[39;00m casted_key)\n\u001b[1;32m 3795\u001b[0m ):\n\u001b[1;32m 3796\u001b[0m \u001b[39mraise\u001b[39;00m InvalidIndexError(key)\n\u001b[0;32m-> 3797\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mKeyError\u001b[39;00m(key) \u001b[39mfrom\u001b[39;00m \u001b[39merr\u001b[39;00m\n\u001b[1;32m 3798\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mTypeError\u001b[39;00m:\n\u001b[1;32m 3799\u001b[0m \u001b[39m# If we have a listlike key, _check_indexing_error will raise\u001b[39;00m\n\u001b[1;32m 3800\u001b[0m \u001b[39m# InvalidIndexError. Otherwise we fall through and re-raise\u001b[39;00m\n\u001b[1;32m 3801\u001b[0m \u001b[39m# the TypeError.\u001b[39;00m\n\u001b[1;32m 3802\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_check_indexing_error(key)\n",
+ "\u001b[0;31mKeyError\u001b[0m: 'GeoFIPS'"
+ ]
+ }
+ ],
+ "source": [
+ "# Replace exclusions.pkl with a file included_counties.csv, with columns GeoFIPS, GeoName, Included, Explanation.\n",
+ "# Explanation is a string that explains why the county was excluded.\n",
+ "# Included is a boolean that is True if the county is included in the analysis.\n",
+ "\n",
+ "# make empty df with columns GeoFIPS, GeoName, Included, Explanation\n",
+ "included_counties = pd.DataFrame(columns=[\"GeoFIPS\", \"GeoName\", \"Included\", \"Explanation\"])\n",
+ "included_counties[\"GeoFIPS\"] = merged_df[\"GeoFIPS\"]\n",
+ "included_counties[\"GeoName\"] = merged_df[\"GeoName\"]\n",
+ "included_counties\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Index(['COUNTYNS', 'AFFGEOID', 'GEOID', 'NAMELSAD', 'STATE_NAME', 'LSAD',\n",
+ " 'ALAND', 'AWATER', 'geometry', '2001', '2002', '2003', '2004', '2005',\n",
+ " '2006', '2007', '2008', '2009', '2010', '2011', '2013', '2014', '2015',\n",
+ " '2016', '2017', '2018', '2019', '2020', '2021'],\n",
+ " dtype='object')"
+ ]
+ },
+ "execution_count": 32,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged_df.columns\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "venv",
+ "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.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/docs/experimental_notebooks/path_to_your_database.db b/docs/experimental_notebooks/path_to_your_database.db
new file mode 100644
index 00000000..e69de29b
diff --git a/docs/experimental_notebooks/plot_variable_from_fips.ipynb b/docs/experimental_notebooks/plot_variable_from_fips.ipynb
new file mode 100644
index 00000000..9f14ec06
--- /dev/null
+++ b/docs/experimental_notebooks/plot_variable_from_fips.ipynb
@@ -0,0 +1,5640 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# import requests\n",
+ "import json\n",
+ "import pandas as pd\n",
+ "import plotly.express as px\n",
+ "import plotly.graph_objects as go\n",
+ "import os\n",
+ "from pathlib import Path\n",
+ "\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "\n",
+ "from cities.utils.clean_gdp import clean_gdp\n",
+ "from cities.utils.cleaning_utils import standardize_and_scale, find_repo_root\n",
+ "from cities.utils.data_grabber import DataGrabber"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "\n",
+ "def plot_variable_categorical(fips, variable):\n",
+ " path = find_repo_root()\n",
+ " df = pd.read_csv(os.path.join(path, \"data/processed/\" + variable + \"_wide.csv\"))\n",
+ " df = df[df[\"GeoFIPS\"].astype(str) == fips]\n",
+ " df = df.iloc[:, 2:]\n",
+ " \n",
+ " # Create a plotly figure\n",
+ " fig = go.Figure()\n",
+ " \n",
+ " # Loop through each column and add as a trace (bar)\n",
+ " for column in df.columns:\n",
+ " hover_text = [f'{column}
{round(value*100*10)/10}%' for value in df[column]]\n",
+ " fig.add_trace(go.Bar(\n",
+ " x=df.index, \n",
+ " y=df[column],\n",
+ " name=column,\n",
+ " hovertext=hover_text,\n",
+ " hoverinfo='text'\n",
+ " ))\n",
+ "\n",
+ " \n",
+ " # Adjust layout for stacked bar\n",
+ " fig.update_layout(\n",
+ " title='Stacked Bar Plot for ' + variable,\n",
+ " barmode='stack',\n",
+ " )\n",
+ " # remove axes\n",
+ " fig.update_xaxes(showticklabels=False)\n",
+ " fig.update_yaxes(showticklabels=False)\n",
+ " # Show figure\n",
+ " fig.show()\n",
+ "\n",
+ "\n",
+ "def plot_variable_timeseries(fips, variable):\n",
+ " path = find_repo_root()\n",
+ " df = pd.read_csv(os.path.join(path, \"data/processed/\" + variable + \"_wide.csv\"))\n",
+ " df = df[df[\"GeoFIPS\"].astype(str) == fips]\n",
+ " df = df.iloc[:, 2:]\n",
+ " # Assuming your dataframe is named df\n",
+ " years = df.columns.astype(str)\n",
+ " values = df.iloc[0].values\n",
+ "\n",
+ " fig = go.Figure()\n",
+ "\n",
+ " fig.add_trace(go.Scatter(x=years, y=values, mode='lines+markers', name='Values'))\n",
+ "\n",
+ " fig.update_layout(\n",
+ " title='Time Series Plot',\n",
+ " xaxis_title='Year',\n",
+ " yaxis_title='Value',\n",
+ " xaxis=dict(tickangle=-45) # Rotating x labels for better readability\n",
+ " )\n",
+ " # set title \n",
+ " fig.update_layout(title_text=variable)\n",
+ " fig.show()\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.plotly.v1+json": {
+ "config": {
+ "plotlyServerURL": "https://plot.ly"
+ },
+ "data": [
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "POPDEN_RUR
14237.2%"
+ ],
+ "name": "POPDEN_RUR",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 142.372164349149
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "POPDEN_URB
144254.0%"
+ ],
+ "name": "POPDEN_URB",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 1442.53998725239
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "HOUDEN_COU
28831.8%"
+ ],
+ "name": "HOUDEN_COU",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 288.317572811637
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "HOUDEN_RUR
5728.2%"
+ ],
+ "name": "HOUDEN_RUR",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 57.2816220503253
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "ALAND_PCT_RUR
62.4%"
+ ],
+ "name": "ALAND_PCT_RUR",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.624222820728383
+ ]
+ }
+ ],
+ "layout": {
+ "barmode": "stack",
+ "template": {
+ "data": {
+ "bar": [
+ {
+ "error_x": {
+ "color": "#2a3f5f"
+ },
+ "error_y": {
+ "color": "#2a3f5f"
+ },
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "bar"
+ }
+ ],
+ "barpolar": [
+ {
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "barpolar"
+ }
+ ],
+ "carpet": [
+ {
+ "aaxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "baxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "type": "carpet"
+ }
+ ],
+ "choropleth": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "choropleth"
+ }
+ ],
+ "contour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "contour"
+ }
+ ],
+ "contourcarpet": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "contourcarpet"
+ }
+ ],
+ "heatmap": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmap"
+ }
+ ],
+ "heatmapgl": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmapgl"
+ }
+ ],
+ "histogram": [
+ {
+ "marker": {
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "histogram"
+ }
+ ],
+ "histogram2d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2d"
+ }
+ ],
+ "histogram2dcontour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2dcontour"
+ }
+ ],
+ "mesh3d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "mesh3d"
+ }
+ ],
+ "parcoords": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "parcoords"
+ }
+ ],
+ "pie": [
+ {
+ "automargin": true,
+ "type": "pie"
+ }
+ ],
+ "scatter": [
+ {
+ "fillpattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ },
+ "type": "scatter"
+ }
+ ],
+ "scatter3d": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatter3d"
+ }
+ ],
+ "scattercarpet": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattercarpet"
+ }
+ ],
+ "scattergeo": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergeo"
+ }
+ ],
+ "scattergl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergl"
+ }
+ ],
+ "scattermapbox": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattermapbox"
+ }
+ ],
+ "scatterpolar": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolar"
+ }
+ ],
+ "scatterpolargl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolargl"
+ }
+ ],
+ "scatterternary": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterternary"
+ }
+ ],
+ "surface": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "surface"
+ }
+ ],
+ "table": [
+ {
+ "cells": {
+ "fill": {
+ "color": "#EBF0F8"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "header": {
+ "fill": {
+ "color": "#C8D4E3"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "type": "table"
+ }
+ ]
+ },
+ "layout": {
+ "annotationdefaults": {
+ "arrowcolor": "#2a3f5f",
+ "arrowhead": 0,
+ "arrowwidth": 1
+ },
+ "autotypenumbers": "strict",
+ "coloraxis": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "colorscale": {
+ "diverging": [
+ [
+ 0,
+ "#8e0152"
+ ],
+ [
+ 0.1,
+ "#c51b7d"
+ ],
+ [
+ 0.2,
+ "#de77ae"
+ ],
+ [
+ 0.3,
+ "#f1b6da"
+ ],
+ [
+ 0.4,
+ "#fde0ef"
+ ],
+ [
+ 0.5,
+ "#f7f7f7"
+ ],
+ [
+ 0.6,
+ "#e6f5d0"
+ ],
+ [
+ 0.7,
+ "#b8e186"
+ ],
+ [
+ 0.8,
+ "#7fbc41"
+ ],
+ [
+ 0.9,
+ "#4d9221"
+ ],
+ [
+ 1,
+ "#276419"
+ ]
+ ],
+ "sequential": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "sequentialminus": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ]
+ },
+ "colorway": [
+ "#636efa",
+ "#EF553B",
+ "#00cc96",
+ "#ab63fa",
+ "#FFA15A",
+ "#19d3f3",
+ "#FF6692",
+ "#B6E880",
+ "#FF97FF",
+ "#FECB52"
+ ],
+ "font": {
+ "color": "#2a3f5f"
+ },
+ "geo": {
+ "bgcolor": "white",
+ "lakecolor": "white",
+ "landcolor": "#E5ECF6",
+ "showlakes": true,
+ "showland": true,
+ "subunitcolor": "white"
+ },
+ "hoverlabel": {
+ "align": "left"
+ },
+ "hovermode": "closest",
+ "mapbox": {
+ "style": "light"
+ },
+ "paper_bgcolor": "white",
+ "plot_bgcolor": "#E5ECF6",
+ "polar": {
+ "angularaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "radialaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "scene": {
+ "xaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "yaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "zaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ }
+ },
+ "shapedefaults": {
+ "line": {
+ "color": "#2a3f5f"
+ }
+ },
+ "ternary": {
+ "aaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "baxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "caxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "title": {
+ "x": 0.05
+ },
+ "xaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ },
+ "yaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ }
+ }
+ },
+ "title": {
+ "text": "Stacked Bar Plot for urbanization"
+ },
+ "xaxis": {
+ "showticklabels": false
+ },
+ "yaxis": {
+ "showticklabels": false
+ }
+ }
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.plotly.v1+json": {
+ "config": {
+ "plotlyServerURL": "https://plot.ly"
+ },
+ "data": [
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "agri_forestry_mining
0.6%"
+ ],
+ "name": "agri_forestry_mining",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0061531801737732
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "construction
4.6%"
+ ],
+ "name": "construction",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0458551065211341
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "manufacturing
8.5%"
+ ],
+ "name": "manufacturing",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0854333508549519
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "wholesale_trade
2.3%"
+ ],
+ "name": "wholesale_trade",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0226956494851736
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "retail_trade
12.4%"
+ ],
+ "name": "retail_trade",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.1235737917813302
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "transport_utilities
6.1%"
+ ],
+ "name": "transport_utilities",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0609906929284808
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "information
1.5%"
+ ],
+ "name": "information",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0147490801150242
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "finance_real_estate
7.5%"
+ ],
+ "name": "finance_real_estate",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0753532667511827
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "prof_sci_mgmt_admin
9.1%"
+ ],
+ "name": "prof_sci_mgmt_admin",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0905043134102223
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "education_health
26.6%"
+ ],
+ "name": "education_health",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.2659317893695309
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "arts_entertainment
10.5%"
+ ],
+ "name": "arts_entertainment",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.1051142512600105
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "other_services
4.3%"
+ ],
+ "name": "other_services",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0427939766859404
+ ]
+ },
+ {
+ "hoverinfo": "text",
+ "hovertext": [
+ "public_admin
6.1%"
+ ],
+ "name": "public_admin",
+ "type": "bar",
+ "x": [
+ 389
+ ],
+ "y": [
+ 0.0608515506632448
+ ]
+ }
+ ],
+ "layout": {
+ "barmode": "stack",
+ "template": {
+ "data": {
+ "bar": [
+ {
+ "error_x": {
+ "color": "#2a3f5f"
+ },
+ "error_y": {
+ "color": "#2a3f5f"
+ },
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "bar"
+ }
+ ],
+ "barpolar": [
+ {
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "barpolar"
+ }
+ ],
+ "carpet": [
+ {
+ "aaxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "baxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "type": "carpet"
+ }
+ ],
+ "choropleth": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "choropleth"
+ }
+ ],
+ "contour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "contour"
+ }
+ ],
+ "contourcarpet": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "contourcarpet"
+ }
+ ],
+ "heatmap": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmap"
+ }
+ ],
+ "heatmapgl": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmapgl"
+ }
+ ],
+ "histogram": [
+ {
+ "marker": {
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "histogram"
+ }
+ ],
+ "histogram2d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2d"
+ }
+ ],
+ "histogram2dcontour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2dcontour"
+ }
+ ],
+ "mesh3d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "mesh3d"
+ }
+ ],
+ "parcoords": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "parcoords"
+ }
+ ],
+ "pie": [
+ {
+ "automargin": true,
+ "type": "pie"
+ }
+ ],
+ "scatter": [
+ {
+ "fillpattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ },
+ "type": "scatter"
+ }
+ ],
+ "scatter3d": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatter3d"
+ }
+ ],
+ "scattercarpet": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattercarpet"
+ }
+ ],
+ "scattergeo": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergeo"
+ }
+ ],
+ "scattergl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergl"
+ }
+ ],
+ "scattermapbox": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattermapbox"
+ }
+ ],
+ "scatterpolar": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolar"
+ }
+ ],
+ "scatterpolargl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolargl"
+ }
+ ],
+ "scatterternary": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterternary"
+ }
+ ],
+ "surface": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "surface"
+ }
+ ],
+ "table": [
+ {
+ "cells": {
+ "fill": {
+ "color": "#EBF0F8"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "header": {
+ "fill": {
+ "color": "#C8D4E3"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "type": "table"
+ }
+ ]
+ },
+ "layout": {
+ "annotationdefaults": {
+ "arrowcolor": "#2a3f5f",
+ "arrowhead": 0,
+ "arrowwidth": 1
+ },
+ "autotypenumbers": "strict",
+ "coloraxis": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "colorscale": {
+ "diverging": [
+ [
+ 0,
+ "#8e0152"
+ ],
+ [
+ 0.1,
+ "#c51b7d"
+ ],
+ [
+ 0.2,
+ "#de77ae"
+ ],
+ [
+ 0.3,
+ "#f1b6da"
+ ],
+ [
+ 0.4,
+ "#fde0ef"
+ ],
+ [
+ 0.5,
+ "#f7f7f7"
+ ],
+ [
+ 0.6,
+ "#e6f5d0"
+ ],
+ [
+ 0.7,
+ "#b8e186"
+ ],
+ [
+ 0.8,
+ "#7fbc41"
+ ],
+ [
+ 0.9,
+ "#4d9221"
+ ],
+ [
+ 1,
+ "#276419"
+ ]
+ ],
+ "sequential": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "sequentialminus": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ]
+ },
+ "colorway": [
+ "#636efa",
+ "#EF553B",
+ "#00cc96",
+ "#ab63fa",
+ "#FFA15A",
+ "#19d3f3",
+ "#FF6692",
+ "#B6E880",
+ "#FF97FF",
+ "#FECB52"
+ ],
+ "font": {
+ "color": "#2a3f5f"
+ },
+ "geo": {
+ "bgcolor": "white",
+ "lakecolor": "white",
+ "landcolor": "#E5ECF6",
+ "showlakes": true,
+ "showland": true,
+ "subunitcolor": "white"
+ },
+ "hoverlabel": {
+ "align": "left"
+ },
+ "hovermode": "closest",
+ "mapbox": {
+ "style": "light"
+ },
+ "paper_bgcolor": "white",
+ "plot_bgcolor": "#E5ECF6",
+ "polar": {
+ "angularaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "radialaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "scene": {
+ "xaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "yaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "zaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ }
+ },
+ "shapedefaults": {
+ "line": {
+ "color": "#2a3f5f"
+ }
+ },
+ "ternary": {
+ "aaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "baxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "caxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "title": {
+ "x": 0.05
+ },
+ "xaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ },
+ "yaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ }
+ }
+ },
+ "title": {
+ "text": "Stacked Bar Plot for industry"
+ },
+ "xaxis": {
+ "showticklabels": false
+ },
+ "yaxis": {
+ "showticklabels": false
+ }
+ }
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.plotly.v1+json": {
+ "config": {
+ "plotlyServerURL": "https://plot.ly"
+ },
+ "data": [
+ {
+ "mode": "lines+markers",
+ "name": "Values",
+ "type": "scatter",
+ "x": [
+ "2010",
+ "2011",
+ "2012",
+ "2013",
+ "2014",
+ "2015",
+ "2016",
+ "2017",
+ "2018",
+ "2019",
+ "2020",
+ "2021"
+ ],
+ "y": [
+ 10000,
+ 32500,
+ 0,
+ 0,
+ 225000,
+ 0,
+ 0,
+ 225000,
+ 1889367,
+ 0,
+ 1955940.29,
+ 0
+ ]
+ }
+ ],
+ "layout": {
+ "template": {
+ "data": {
+ "bar": [
+ {
+ "error_x": {
+ "color": "#2a3f5f"
+ },
+ "error_y": {
+ "color": "#2a3f5f"
+ },
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "bar"
+ }
+ ],
+ "barpolar": [
+ {
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "barpolar"
+ }
+ ],
+ "carpet": [
+ {
+ "aaxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "baxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "type": "carpet"
+ }
+ ],
+ "choropleth": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "choropleth"
+ }
+ ],
+ "contour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "contour"
+ }
+ ],
+ "contourcarpet": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "contourcarpet"
+ }
+ ],
+ "heatmap": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmap"
+ }
+ ],
+ "heatmapgl": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmapgl"
+ }
+ ],
+ "histogram": [
+ {
+ "marker": {
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "histogram"
+ }
+ ],
+ "histogram2d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2d"
+ }
+ ],
+ "histogram2dcontour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2dcontour"
+ }
+ ],
+ "mesh3d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "mesh3d"
+ }
+ ],
+ "parcoords": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "parcoords"
+ }
+ ],
+ "pie": [
+ {
+ "automargin": true,
+ "type": "pie"
+ }
+ ],
+ "scatter": [
+ {
+ "fillpattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ },
+ "type": "scatter"
+ }
+ ],
+ "scatter3d": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatter3d"
+ }
+ ],
+ "scattercarpet": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattercarpet"
+ }
+ ],
+ "scattergeo": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergeo"
+ }
+ ],
+ "scattergl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergl"
+ }
+ ],
+ "scattermapbox": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattermapbox"
+ }
+ ],
+ "scatterpolar": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolar"
+ }
+ ],
+ "scatterpolargl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolargl"
+ }
+ ],
+ "scatterternary": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterternary"
+ }
+ ],
+ "surface": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "surface"
+ }
+ ],
+ "table": [
+ {
+ "cells": {
+ "fill": {
+ "color": "#EBF0F8"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "header": {
+ "fill": {
+ "color": "#C8D4E3"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "type": "table"
+ }
+ ]
+ },
+ "layout": {
+ "annotationdefaults": {
+ "arrowcolor": "#2a3f5f",
+ "arrowhead": 0,
+ "arrowwidth": 1
+ },
+ "autotypenumbers": "strict",
+ "coloraxis": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "colorscale": {
+ "diverging": [
+ [
+ 0,
+ "#8e0152"
+ ],
+ [
+ 0.1,
+ "#c51b7d"
+ ],
+ [
+ 0.2,
+ "#de77ae"
+ ],
+ [
+ 0.3,
+ "#f1b6da"
+ ],
+ [
+ 0.4,
+ "#fde0ef"
+ ],
+ [
+ 0.5,
+ "#f7f7f7"
+ ],
+ [
+ 0.6,
+ "#e6f5d0"
+ ],
+ [
+ 0.7,
+ "#b8e186"
+ ],
+ [
+ 0.8,
+ "#7fbc41"
+ ],
+ [
+ 0.9,
+ "#4d9221"
+ ],
+ [
+ 1,
+ "#276419"
+ ]
+ ],
+ "sequential": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "sequentialminus": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ]
+ },
+ "colorway": [
+ "#636efa",
+ "#EF553B",
+ "#00cc96",
+ "#ab63fa",
+ "#FFA15A",
+ "#19d3f3",
+ "#FF6692",
+ "#B6E880",
+ "#FF97FF",
+ "#FECB52"
+ ],
+ "font": {
+ "color": "#2a3f5f"
+ },
+ "geo": {
+ "bgcolor": "white",
+ "lakecolor": "white",
+ "landcolor": "#E5ECF6",
+ "showlakes": true,
+ "showland": true,
+ "subunitcolor": "white"
+ },
+ "hoverlabel": {
+ "align": "left"
+ },
+ "hovermode": "closest",
+ "mapbox": {
+ "style": "light"
+ },
+ "paper_bgcolor": "white",
+ "plot_bgcolor": "#E5ECF6",
+ "polar": {
+ "angularaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "radialaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "scene": {
+ "xaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "yaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "zaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ }
+ },
+ "shapedefaults": {
+ "line": {
+ "color": "#2a3f5f"
+ }
+ },
+ "ternary": {
+ "aaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "baxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "caxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "title": {
+ "x": 0.05
+ },
+ "xaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ },
+ "yaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ }
+ }
+ },
+ "title": {
+ "text": "spending_commerce"
+ },
+ "xaxis": {
+ "tickangle": -45,
+ "title": {
+ "text": "Year"
+ }
+ },
+ "yaxis": {
+ "title": {
+ "text": "Value"
+ }
+ }
+ }
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.plotly.v1+json": {
+ "config": {
+ "plotlyServerURL": "https://plot.ly"
+ },
+ "data": [
+ {
+ "mode": "lines+markers",
+ "name": "Values",
+ "type": "scatter",
+ "x": [
+ "2010",
+ "2011",
+ "2012",
+ "2013",
+ "2014",
+ "2015",
+ "2016",
+ "2017",
+ "2018",
+ "2019",
+ "2020",
+ "2021"
+ ],
+ "y": [
+ 0,
+ 1021336,
+ 2620357,
+ 0,
+ 0,
+ 146771,
+ 0,
+ 0,
+ 95621.97,
+ 103985.96,
+ 1195027.97,
+ 3478932.96
+ ]
+ }
+ ],
+ "layout": {
+ "template": {
+ "data": {
+ "bar": [
+ {
+ "error_x": {
+ "color": "#2a3f5f"
+ },
+ "error_y": {
+ "color": "#2a3f5f"
+ },
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "bar"
+ }
+ ],
+ "barpolar": [
+ {
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "barpolar"
+ }
+ ],
+ "carpet": [
+ {
+ "aaxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "baxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "type": "carpet"
+ }
+ ],
+ "choropleth": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "choropleth"
+ }
+ ],
+ "contour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "contour"
+ }
+ ],
+ "contourcarpet": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "contourcarpet"
+ }
+ ],
+ "heatmap": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmap"
+ }
+ ],
+ "heatmapgl": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmapgl"
+ }
+ ],
+ "histogram": [
+ {
+ "marker": {
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "histogram"
+ }
+ ],
+ "histogram2d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2d"
+ }
+ ],
+ "histogram2dcontour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2dcontour"
+ }
+ ],
+ "mesh3d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "mesh3d"
+ }
+ ],
+ "parcoords": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "parcoords"
+ }
+ ],
+ "pie": [
+ {
+ "automargin": true,
+ "type": "pie"
+ }
+ ],
+ "scatter": [
+ {
+ "fillpattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ },
+ "type": "scatter"
+ }
+ ],
+ "scatter3d": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatter3d"
+ }
+ ],
+ "scattercarpet": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattercarpet"
+ }
+ ],
+ "scattergeo": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergeo"
+ }
+ ],
+ "scattergl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergl"
+ }
+ ],
+ "scattermapbox": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattermapbox"
+ }
+ ],
+ "scatterpolar": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolar"
+ }
+ ],
+ "scatterpolargl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolargl"
+ }
+ ],
+ "scatterternary": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterternary"
+ }
+ ],
+ "surface": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "surface"
+ }
+ ],
+ "table": [
+ {
+ "cells": {
+ "fill": {
+ "color": "#EBF0F8"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "header": {
+ "fill": {
+ "color": "#C8D4E3"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "type": "table"
+ }
+ ]
+ },
+ "layout": {
+ "annotationdefaults": {
+ "arrowcolor": "#2a3f5f",
+ "arrowhead": 0,
+ "arrowwidth": 1
+ },
+ "autotypenumbers": "strict",
+ "coloraxis": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "colorscale": {
+ "diverging": [
+ [
+ 0,
+ "#8e0152"
+ ],
+ [
+ 0.1,
+ "#c51b7d"
+ ],
+ [
+ 0.2,
+ "#de77ae"
+ ],
+ [
+ 0.3,
+ "#f1b6da"
+ ],
+ [
+ 0.4,
+ "#fde0ef"
+ ],
+ [
+ 0.5,
+ "#f7f7f7"
+ ],
+ [
+ 0.6,
+ "#e6f5d0"
+ ],
+ [
+ 0.7,
+ "#b8e186"
+ ],
+ [
+ 0.8,
+ "#7fbc41"
+ ],
+ [
+ 0.9,
+ "#4d9221"
+ ],
+ [
+ 1,
+ "#276419"
+ ]
+ ],
+ "sequential": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "sequentialminus": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ]
+ },
+ "colorway": [
+ "#636efa",
+ "#EF553B",
+ "#00cc96",
+ "#ab63fa",
+ "#FFA15A",
+ "#19d3f3",
+ "#FF6692",
+ "#B6E880",
+ "#FF97FF",
+ "#FECB52"
+ ],
+ "font": {
+ "color": "#2a3f5f"
+ },
+ "geo": {
+ "bgcolor": "white",
+ "lakecolor": "white",
+ "landcolor": "#E5ECF6",
+ "showlakes": true,
+ "showland": true,
+ "subunitcolor": "white"
+ },
+ "hoverlabel": {
+ "align": "left"
+ },
+ "hovermode": "closest",
+ "mapbox": {
+ "style": "light"
+ },
+ "paper_bgcolor": "white",
+ "plot_bgcolor": "#E5ECF6",
+ "polar": {
+ "angularaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "radialaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "scene": {
+ "xaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "yaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "zaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ }
+ },
+ "shapedefaults": {
+ "line": {
+ "color": "#2a3f5f"
+ }
+ },
+ "ternary": {
+ "aaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "baxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "caxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "title": {
+ "x": 0.05
+ },
+ "xaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ },
+ "yaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ }
+ }
+ },
+ "title": {
+ "text": "spending_transportation"
+ },
+ "xaxis": {
+ "tickangle": -45,
+ "title": {
+ "text": "Year"
+ }
+ },
+ "yaxis": {
+ "title": {
+ "text": "Value"
+ }
+ }
+ }
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.plotly.v1+json": {
+ "config": {
+ "plotlyServerURL": "https://plot.ly"
+ },
+ "data": [
+ {
+ "mode": "lines+markers",
+ "name": "Values",
+ "type": "scatter",
+ "x": [
+ "2010",
+ "2011",
+ "2012",
+ "2013",
+ "2014",
+ "2015",
+ "2016",
+ "2017",
+ "2018",
+ "2019",
+ "2020",
+ "2021"
+ ],
+ "y": [
+ 143326130,
+ 268944673,
+ 219757632,
+ 199752986,
+ 281018680,
+ 242086878,
+ 296108118,
+ 325721909,
+ 450723154.49,
+ 381468624.58,
+ 260470033.76,
+ 240695946.57
+ ]
+ }
+ ],
+ "layout": {
+ "template": {
+ "data": {
+ "bar": [
+ {
+ "error_x": {
+ "color": "#2a3f5f"
+ },
+ "error_y": {
+ "color": "#2a3f5f"
+ },
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "bar"
+ }
+ ],
+ "barpolar": [
+ {
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "barpolar"
+ }
+ ],
+ "carpet": [
+ {
+ "aaxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "baxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "type": "carpet"
+ }
+ ],
+ "choropleth": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "choropleth"
+ }
+ ],
+ "contour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "contour"
+ }
+ ],
+ "contourcarpet": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "contourcarpet"
+ }
+ ],
+ "heatmap": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmap"
+ }
+ ],
+ "heatmapgl": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmapgl"
+ }
+ ],
+ "histogram": [
+ {
+ "marker": {
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "histogram"
+ }
+ ],
+ "histogram2d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2d"
+ }
+ ],
+ "histogram2dcontour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2dcontour"
+ }
+ ],
+ "mesh3d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "mesh3d"
+ }
+ ],
+ "parcoords": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "parcoords"
+ }
+ ],
+ "pie": [
+ {
+ "automargin": true,
+ "type": "pie"
+ }
+ ],
+ "scatter": [
+ {
+ "fillpattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ },
+ "type": "scatter"
+ }
+ ],
+ "scatter3d": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatter3d"
+ }
+ ],
+ "scattercarpet": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattercarpet"
+ }
+ ],
+ "scattergeo": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergeo"
+ }
+ ],
+ "scattergl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergl"
+ }
+ ],
+ "scattermapbox": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattermapbox"
+ }
+ ],
+ "scatterpolar": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolar"
+ }
+ ],
+ "scatterpolargl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolargl"
+ }
+ ],
+ "scatterternary": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterternary"
+ }
+ ],
+ "surface": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "surface"
+ }
+ ],
+ "table": [
+ {
+ "cells": {
+ "fill": {
+ "color": "#EBF0F8"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "header": {
+ "fill": {
+ "color": "#C8D4E3"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "type": "table"
+ }
+ ]
+ },
+ "layout": {
+ "annotationdefaults": {
+ "arrowcolor": "#2a3f5f",
+ "arrowhead": 0,
+ "arrowwidth": 1
+ },
+ "autotypenumbers": "strict",
+ "coloraxis": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "colorscale": {
+ "diverging": [
+ [
+ 0,
+ "#8e0152"
+ ],
+ [
+ 0.1,
+ "#c51b7d"
+ ],
+ [
+ 0.2,
+ "#de77ae"
+ ],
+ [
+ 0.3,
+ "#f1b6da"
+ ],
+ [
+ 0.4,
+ "#fde0ef"
+ ],
+ [
+ 0.5,
+ "#f7f7f7"
+ ],
+ [
+ 0.6,
+ "#e6f5d0"
+ ],
+ [
+ 0.7,
+ "#b8e186"
+ ],
+ [
+ 0.8,
+ "#7fbc41"
+ ],
+ [
+ 0.9,
+ "#4d9221"
+ ],
+ [
+ 1,
+ "#276419"
+ ]
+ ],
+ "sequential": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "sequentialminus": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ]
+ },
+ "colorway": [
+ "#636efa",
+ "#EF553B",
+ "#00cc96",
+ "#ab63fa",
+ "#FFA15A",
+ "#19d3f3",
+ "#FF6692",
+ "#B6E880",
+ "#FF97FF",
+ "#FECB52"
+ ],
+ "font": {
+ "color": "#2a3f5f"
+ },
+ "geo": {
+ "bgcolor": "white",
+ "lakecolor": "white",
+ "landcolor": "#E5ECF6",
+ "showlakes": true,
+ "showland": true,
+ "subunitcolor": "white"
+ },
+ "hoverlabel": {
+ "align": "left"
+ },
+ "hovermode": "closest",
+ "mapbox": {
+ "style": "light"
+ },
+ "paper_bgcolor": "white",
+ "plot_bgcolor": "#E5ECF6",
+ "polar": {
+ "angularaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "radialaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "scene": {
+ "xaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "yaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "zaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ }
+ },
+ "shapedefaults": {
+ "line": {
+ "color": "#2a3f5f"
+ }
+ },
+ "ternary": {
+ "aaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "baxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "caxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "title": {
+ "x": 0.05
+ },
+ "xaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ },
+ "yaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ }
+ }
+ },
+ "title": {
+ "text": "spending_HHS"
+ },
+ "xaxis": {
+ "tickangle": -45,
+ "title": {
+ "text": "Year"
+ }
+ },
+ "yaxis": {
+ "title": {
+ "text": "Value"
+ }
+ }
+ }
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "# variables Ria asked for\n",
+ "fips = \"13021\"\n",
+ "variable = \"urbanization\"\n",
+ "plot_variable_categorical(fips, variable)\n",
+ "variable = \"industry\"\n",
+ "plot_variable_categorical(fips, variable)\n",
+ "variable = \"spending_commerce\"\n",
+ "plot_variable_timeseries(fips, variable)\n",
+ "variable = \"spending_transportation\"\n",
+ "plot_variable_timeseries(fips, variable)\n",
+ "variable = \"spending_HHS\"\n",
+ "plot_variable_timeseries(fips, variable)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.plotly.v1+json": {
+ "config": {
+ "plotlyServerURL": "https://plot.ly"
+ },
+ "data": [
+ {
+ "mode": "lines+markers",
+ "name": "Values",
+ "type": "scatter",
+ "x": [
+ "1990",
+ "1991",
+ "1992",
+ "1993",
+ "1994",
+ "1995",
+ "1996",
+ "1997",
+ "1998",
+ "1999",
+ "2000",
+ "2001",
+ "2002",
+ "2003",
+ "2004",
+ "2005",
+ "2006",
+ "2007",
+ "2008",
+ "2009",
+ "2010",
+ "2011",
+ "2012",
+ "2013",
+ "2014",
+ "2015",
+ "2016",
+ "2017",
+ "2018",
+ "2019",
+ "2020",
+ "2021",
+ "2022"
+ ],
+ "y": [
+ 5,
+ 4.7,
+ 6.4,
+ 5.9,
+ 6.4,
+ 5.3,
+ 5.2,
+ 5.1,
+ 5.9,
+ 5,
+ 4.3,
+ 4.5,
+ 5.3,
+ 5.2,
+ 5.4,
+ 6.1,
+ 6.1,
+ 5.7,
+ 7,
+ 10.2,
+ 11.8,
+ 11.4,
+ 10.4,
+ 9.2,
+ 8.1,
+ 6.8,
+ 6,
+ 5.4,
+ 4.6,
+ 4.1,
+ 7.4,
+ 5,
+ 3.7
+ ]
+ }
+ ],
+ "layout": {
+ "template": {
+ "data": {
+ "bar": [
+ {
+ "error_x": {
+ "color": "#2a3f5f"
+ },
+ "error_y": {
+ "color": "#2a3f5f"
+ },
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "bar"
+ }
+ ],
+ "barpolar": [
+ {
+ "marker": {
+ "line": {
+ "color": "#E5ECF6",
+ "width": 0.5
+ },
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "barpolar"
+ }
+ ],
+ "carpet": [
+ {
+ "aaxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "baxis": {
+ "endlinecolor": "#2a3f5f",
+ "gridcolor": "white",
+ "linecolor": "white",
+ "minorgridcolor": "white",
+ "startlinecolor": "#2a3f5f"
+ },
+ "type": "carpet"
+ }
+ ],
+ "choropleth": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "choropleth"
+ }
+ ],
+ "contour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "contour"
+ }
+ ],
+ "contourcarpet": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "contourcarpet"
+ }
+ ],
+ "heatmap": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmap"
+ }
+ ],
+ "heatmapgl": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "heatmapgl"
+ }
+ ],
+ "histogram": [
+ {
+ "marker": {
+ "pattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ }
+ },
+ "type": "histogram"
+ }
+ ],
+ "histogram2d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2d"
+ }
+ ],
+ "histogram2dcontour": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "histogram2dcontour"
+ }
+ ],
+ "mesh3d": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "type": "mesh3d"
+ }
+ ],
+ "parcoords": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "parcoords"
+ }
+ ],
+ "pie": [
+ {
+ "automargin": true,
+ "type": "pie"
+ }
+ ],
+ "scatter": [
+ {
+ "fillpattern": {
+ "fillmode": "overlay",
+ "size": 10,
+ "solidity": 0.2
+ },
+ "type": "scatter"
+ }
+ ],
+ "scatter3d": [
+ {
+ "line": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatter3d"
+ }
+ ],
+ "scattercarpet": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattercarpet"
+ }
+ ],
+ "scattergeo": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergeo"
+ }
+ ],
+ "scattergl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattergl"
+ }
+ ],
+ "scattermapbox": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scattermapbox"
+ }
+ ],
+ "scatterpolar": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolar"
+ }
+ ],
+ "scatterpolargl": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterpolargl"
+ }
+ ],
+ "scatterternary": [
+ {
+ "marker": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "type": "scatterternary"
+ }
+ ],
+ "surface": [
+ {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ },
+ "colorscale": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "type": "surface"
+ }
+ ],
+ "table": [
+ {
+ "cells": {
+ "fill": {
+ "color": "#EBF0F8"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "header": {
+ "fill": {
+ "color": "#C8D4E3"
+ },
+ "line": {
+ "color": "white"
+ }
+ },
+ "type": "table"
+ }
+ ]
+ },
+ "layout": {
+ "annotationdefaults": {
+ "arrowcolor": "#2a3f5f",
+ "arrowhead": 0,
+ "arrowwidth": 1
+ },
+ "autotypenumbers": "strict",
+ "coloraxis": {
+ "colorbar": {
+ "outlinewidth": 0,
+ "ticks": ""
+ }
+ },
+ "colorscale": {
+ "diverging": [
+ [
+ 0,
+ "#8e0152"
+ ],
+ [
+ 0.1,
+ "#c51b7d"
+ ],
+ [
+ 0.2,
+ "#de77ae"
+ ],
+ [
+ 0.3,
+ "#f1b6da"
+ ],
+ [
+ 0.4,
+ "#fde0ef"
+ ],
+ [
+ 0.5,
+ "#f7f7f7"
+ ],
+ [
+ 0.6,
+ "#e6f5d0"
+ ],
+ [
+ 0.7,
+ "#b8e186"
+ ],
+ [
+ 0.8,
+ "#7fbc41"
+ ],
+ [
+ 0.9,
+ "#4d9221"
+ ],
+ [
+ 1,
+ "#276419"
+ ]
+ ],
+ "sequential": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ],
+ "sequentialminus": [
+ [
+ 0,
+ "#0d0887"
+ ],
+ [
+ 0.1111111111111111,
+ "#46039f"
+ ],
+ [
+ 0.2222222222222222,
+ "#7201a8"
+ ],
+ [
+ 0.3333333333333333,
+ "#9c179e"
+ ],
+ [
+ 0.4444444444444444,
+ "#bd3786"
+ ],
+ [
+ 0.5555555555555556,
+ "#d8576b"
+ ],
+ [
+ 0.6666666666666666,
+ "#ed7953"
+ ],
+ [
+ 0.7777777777777778,
+ "#fb9f3a"
+ ],
+ [
+ 0.8888888888888888,
+ "#fdca26"
+ ],
+ [
+ 1,
+ "#f0f921"
+ ]
+ ]
+ },
+ "colorway": [
+ "#636efa",
+ "#EF553B",
+ "#00cc96",
+ "#ab63fa",
+ "#FFA15A",
+ "#19d3f3",
+ "#FF6692",
+ "#B6E880",
+ "#FF97FF",
+ "#FECB52"
+ ],
+ "font": {
+ "color": "#2a3f5f"
+ },
+ "geo": {
+ "bgcolor": "white",
+ "lakecolor": "white",
+ "landcolor": "#E5ECF6",
+ "showlakes": true,
+ "showland": true,
+ "subunitcolor": "white"
+ },
+ "hoverlabel": {
+ "align": "left"
+ },
+ "hovermode": "closest",
+ "mapbox": {
+ "style": "light"
+ },
+ "paper_bgcolor": "white",
+ "plot_bgcolor": "#E5ECF6",
+ "polar": {
+ "angularaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "radialaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "scene": {
+ "xaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "yaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ },
+ "zaxis": {
+ "backgroundcolor": "#E5ECF6",
+ "gridcolor": "white",
+ "gridwidth": 2,
+ "linecolor": "white",
+ "showbackground": true,
+ "ticks": "",
+ "zerolinecolor": "white"
+ }
+ },
+ "shapedefaults": {
+ "line": {
+ "color": "#2a3f5f"
+ }
+ },
+ "ternary": {
+ "aaxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "baxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ },
+ "bgcolor": "#E5ECF6",
+ "caxis": {
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": ""
+ }
+ },
+ "title": {
+ "x": 0.05
+ },
+ "xaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ },
+ "yaxis": {
+ "automargin": true,
+ "gridcolor": "white",
+ "linecolor": "white",
+ "ticks": "",
+ "title": {
+ "standoff": 15
+ },
+ "zerolinecolor": "white",
+ "zerolinewidth": 2
+ }
+ }
+ },
+ "title": {
+ "text": "unemployment_rate"
+ },
+ "xaxis": {
+ "tickangle": -45,
+ "title": {
+ "text": "Year"
+ }
+ },
+ "yaxis": {
+ "title": {
+ "text": "Value"
+ }
+ }
+ }
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fips = \"13021\"\n",
+ "variable = \"unemployment_rate\"\n",
+ "kind_of_plot = 'bar'\n",
+ "plot_variable_timeseries(fips, variable)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "venv",
+ "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.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/requirements.txt b/requirements.txt
index 6357f6db..5ce364cb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -79,4 +79,5 @@ traitlets==5.11.2
typing_extensions==4.8.0
tzdata==2023.3
wcwidth==0.2.8
-geopandas==0.14.0
\ No newline at end of file
+geopandas==0.14.0
+requests==2.31.0
\ No newline at end of file