{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import sqlite3\n",
    "import numpy as np\n",
    "from matplotlib.pyplot import figure\n",
    "\n",
    "import warnings # current version of seaborn generates a bunch of warnings that we'll ignore\n",
    "warnings.filterwarnings(\"ignore\")\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "sns.set(style=\"white\", color_codes=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "conTXs = sqlite3.connect('../../../../../../datasets/nfts.sqlite')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "transfers = pd.read_sql_query(\"SELECT * FROM transfers\", conTXs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "num_df = (transfers[[\"transaction_value\", \"timestamp\"]].apply(pd.to_numeric, errors='coerce'))\n",
    "num_df[\"timestamp\"] = pd.to_datetime(num_df.timestamp, unit='s', errors='coerce')\n",
    "num_df.set_index(\"timestamp\")\n",
    "num_df = num_df.resample(\"1440min\", label='right', on='timestamp').sum()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'NFT transfers value over time')"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 33056 characters]\n",
      "text/plain": [
       "<Figure size 864x432 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Set the width and height of the figure\n",
    "plt.figure(figsize=(12,6))\n",
    "# Line chart showing the number of visitors to each museum over time\n",
    "ax = sns.lineplot(data=num_df, x=\"timestamp\", y=\"transaction_value\")\n",
    "ax.set(xlabel='timestamp', ylabel='Total value')\n",
    "plt.title(\"NFT transfers value over time\")\n",
    "# Add title"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "number of unique addresses: 6765\n"
     ]
    }
   ],
   "source": [
    "print(\"number of unique addresses:\", transfers[\"nft_address\"].nunique())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# num_df = (transfers[[\"nft_address\", \"transaction_value\", \"timestamp\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "#create data frame where group together from_addresses and count size of each group (how many TX each address did in total)\n",
    "from_series = transfers[\"from_address\"].groupby(transfers[\"from_address\"]).size()\n",
    "#create data frame where group together from_addresses and count size of each group (how many TX each address did in total)\n",
    "to_series = transfers[\"to_address\"].groupby(transfers[\"to_address\"]).size()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.DataFrame()\n",
    "df = df.join(to_series.rename(\"to_count\"), how='outer')\n",
    "df = df.join(from_series.rename('from_count'), how='outer')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 1728x1728 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 30556 characters]\n",
      "text/plain": [
       "<Figure size 1728x360 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(24,24))\n",
    "fig, axs = plt.subplots(1, 2)\n",
    "fig.set_size_inches(24, 5, forward=True)\n",
    "fig.suptitle('Numbers of NFT transactions per address')\n",
    "axs[0].hist(df[\"from_count\"], density=False, alpha=0.75, log=True, bins=20, color='orange')\n",
    "axs[0].set_title(\"NFTs Sent from an address\")\n",
    "axs[1].hist(df[\"to_count\"], density=False, alpha=0.75, log=True, bins=20)\n",
    "axs[1].set_title(\"NFTs received to an address\")\n",
    "plt.setp(axs[0], xlabel='Number of transactions out', ylabel='Number of addresses')\n",
    "plt.setp(axs[1], xlabel='Number of transactions in', ylabel='Number of addresses')\n",
    "print(\"\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_small=df[df[\"to_count\"]<10]\n",
    "df_small=df_small[df_small[\"from_count\"]<10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 1728x1728 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 35568 characters]\n",
      "text/plain": [
       "<Figure size 1728x360 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(24,24))\n",
    "fig, axs = plt.subplots(1, 2)\n",
    "fig.set_size_inches(24, 5, forward=True)\n",
    "fig.suptitle('Numbers of NFT transactions per address')\n",
    "axs[0].hist(df_small[\"from_count\"], density=False, alpha=0.75, log=False, bins=9, color='orange')\n",
    "axs[0].set_title(\"NFTs Sent from an address\")\n",
    "axs[1].hist(df_small[\"to_count\"], density=False, alpha=0.75, log=False, bins=9)\n",
    "axs[1].set_title(\"NFTs received to an address\")\n",
    "plt.setp(axs[0], xlabel='Number of transactions out', ylabel='Number of addresses')\n",
    "plt.setp(axs[1], xlabel='Number of transactions in', ylabel='Number of addresses')\n",
    "print(\"\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "whales_tx=df[df[\"from_count\"]>60000]\n",
    "whales_rx=df[df[\"to_count\"]>60000]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>to_count</th>\n",
       "      <th>from_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0x0000000000000000000000000000000000000000</th>\n",
       "      <td>119978.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xC69b4c6fFDBaF843A0d0588c99E3C67f27069BEa</th>\n",
       "      <td>74608.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xcDA72070E455bb31C7690a170224Ce43623d0B6f</th>\n",
       "      <td>76645.0</td>\n",
       "      <td>36116.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            to_count  from_count\n",
       "0x0000000000000000000000000000000000000000  119978.0         NaN\n",
       "0xC69b4c6fFDBaF843A0d0588c99E3C67f27069BEa   74608.0         1.0\n",
       "0xcDA72070E455bb31C7690a170224Ce43623d0B6f   76645.0     36116.0"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "whales_rx"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Whales RX info:\n",
    "0x0000000000000000000000000000000000000000 - burn address\n",
    "\n",
    "[0xC69b4c6fFDBaF843A0d0588c99E3C67f27069BEa](https://etherscan.io/address/0xC69b4c6fFDBaF843A0d0588c99E3C67f27069BEa) / [creator](https://etherscan.io/address/0xC69b4c6fFDBaF843A0d0588c99E3C67f27069BEa) / info: `ENS: ETH Registrar Controller `\n",
    "\n",
    "[0xcDA72070E455bb31C7690a170224Ce43623d0B6f](https://etherscan.io/address/0xcDA72070E455bb31C7690a170224Ce43623d0B6f) / [creator](https://etherscan.io/address/0x95271d54d6e0d88b3825f89a766f97b8b7e8af82) / info: https://foundation.app"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>to_count</th>\n",
       "      <th>from_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5</th>\n",
       "      <td>2.0</td>\n",
       "      <td>140875.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x327305A797d92a39cEe1a225D7E2A1cC42B1a8fA</th>\n",
       "      <td>NaN</td>\n",
       "      <td>106620.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            to_count  from_count\n",
       "0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5       2.0    140875.0\n",
       "0x327305A797d92a39cEe1a225D7E2A1cC42B1a8fA       NaN    106620.0"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "whales_tx"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Whales TX info:\n",
    "\n",
    "[0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5](https://etherscan.io/address/0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5) / [creator](https://etherscan.io/address/0x4fe4e666be5752f1fdd210f4ab5de2cc26e3e0e8) / info: `ENS: ETH Registrar Controller`\n",
    "\n",
    "[0x327305A797d92a39cEe1a225D7E2A1cC42B1a8fA](https://etherscan.io/address/0x327305A797d92a39cEe1a225D7E2A1cC42B1a8fA) not a contract! / info: `???`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 1728x1728 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "[encoded data, 29252 characters]\n",
      "text/plain": [
       "<Figure size 1728x360 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sharks_tx=df[df[\"from_count\"]>20e3]\n",
    "sharks_rx=df[df[\"to_count\"]>20e3]\n",
    "sharks_tx=sharks_tx[sharks_tx[\"from_count\"]<60e3]\n",
    "sharks_rx=sharks_tx[sharks_tx[\"to_count\"]<60e3]\n",
    "\n",
    "plt.figure(figsize=(24,24))\n",
    "fig, axs = plt.subplots(1, 2)\n",
    "fig.set_size_inches(24, 5, forward=True)\n",
    "fig.suptitle('Numbers of NFT transactions per address')\n",
    "axs[0].hist(sharks_tx[\"from_count\"], density=False, alpha=0.75, log=False, bins=100, color='orange')\n",
    "axs[0].set_title(\"NFTs Sent from an address\")\n",
    "axs[1].hist(sharks_rx[\"to_count\"], density=False, alpha=0.75, log=False, bins=9)\n",
    "axs[1].set_title(\"NFTs received to an address\")\n",
    "plt.setp(axs[0], xlabel='Number of transactions out', ylabel='Number of addresses')\n",
    "plt.setp(axs[1], xlabel='Number of transactions in', ylabel='Number of addresses')\n",
    "print(\"\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>to_count</th>\n",
       "      <th>from_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0xE052113bd7D7700d623414a0a4585BCaE754E9d5</th>\n",
       "      <td>9552.0</td>\n",
       "      <td>31967.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C</th>\n",
       "      <td>14124.0</td>\n",
       "      <td>23128.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xcDA72070E455bb31C7690a170224Ce43623d0B6f</th>\n",
       "      <td>76645.0</td>\n",
       "      <td>36116.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            to_count  from_count\n",
       "0xE052113bd7D7700d623414a0a4585BCaE754E9d5    9552.0     31967.0\n",
       "0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C   14124.0     23128.0\n",
       "0xcDA72070E455bb31C7690a170224Ce43623d0B6f   76645.0     36116.0"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sharks_tx"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Sharks TX info:\n",
    "\n",
    "[0xE052113bd7D7700d623414a0a4585BCaE754E9d5](https://etherscan.io/address/0xE052113bd7D7700d623414a0a4585BCaE754E9d5) /  not a contract! / info: `Nifty Gateway: Omnibus `\n",
    "\n",
    "[0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C](https://etherscan.io/address/0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C) /  not a contract! / info: `CryptoKitties: Sales Auction `\n",
    "\n",
    "[0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C](https://etherscan.io/address/0xcDA72070E455bb31C7690a170224Ce43623d0B6f) /  [creator](https://etherscan.io/address/0x95271d54d6e0d88b3825f89a766f97b8b7e8af82) / info: https://foundation.app"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>to_count</th>\n",
       "      <th>from_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0xE052113bd7D7700d623414a0a4585BCaE754E9d5</th>\n",
       "      <td>9552.0</td>\n",
       "      <td>31967.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C</th>\n",
       "      <td>14124.0</td>\n",
       "      <td>23128.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            to_count  from_count\n",
       "0xE052113bd7D7700d623414a0a4585BCaE754E9d5    9552.0     31967.0\n",
       "0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C   14124.0     23128.0"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sharks_rx"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Sharks RX info:\n",
    "\n",
    "[0xE052113bd7D7700d623414a0a4585BCaE754E9d5](https://etherscan.io/address/0xE052113bd7D7700d623414a0a4585BCaE754E9d5) /  not a contract! / info: `Nifty Gateway: Omnibus `\n",
    "\n",
    "[0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C](https://etherscan.io/address/0xb1690C08E213a35Ed9bAb7B318DE14420FB57d8C) /  not a contract! / info: `CryptoKitties: Sales Auction `\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "#transfers not transactions\n",
    "transactions_per_nft = transfers[\"nft_address\"].groupby(transfers[\"nft_address\"]).size()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     0.000000e+00\n",
       "1     0.000000e+00\n",
       "2     0.000000e+00\n",
       "3     0.000000e+00\n",
       "4     0.000000e+00\n",
       "5     6.180000e+18\n",
       "6     0.000000e+00\n",
       "7     0.000000e+00\n",
       "8     3.000000e+16\n",
       "9     0.000000e+00\n",
       "10    0.000000e+00\n",
       "11    0.000000e+00\n",
       "12    0.000000e+00\n",
       "13    0.000000e+00\n",
       "14    0.000000e+00\n",
       "Name: transaction_value, dtype: float64"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "transfers[\"transaction_value\"] = pd.to_numeric(transfers[\"transaction_value\"])\n",
    "transfers[\"transaction_value\"] = transfers[\"transaction_value\"].fillna(0)\n",
    "transfers[\"transaction_value\"].head(15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>transaction_value</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>nft_address</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0x00000000000b7F8E8E8Ad148f9d53303Bfe20796</th>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x000000000437b3CCE2530936156388Bff5578FC3</th>\n",
       "      <td>4.175880e+18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x000000000A42C2791eEc307FFf43Fa5c640e3Ef7</th>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x000000F36EDb9d436Be73cDBf0DCa7dF3E6F3A50</th>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x00000633Df1228868270bAdB2B812E12e13fdB91</th>\n",
       "      <td>2.829000e+17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x000E49C87d2874431567d38FF9548890aB39BAac</th>\n",
       "      <td>1.399971e+19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x001B4b85192aa034bff1524f181e3a7060e0dC30</th>\n",
       "      <td>1.800000e+17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x0025Eae58dF9F636F261CFdFa98cAcb57779DF74</th>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            transaction_value\n",
       "nft_address                                                  \n",
       "0x00000000000b7F8E8E8Ad148f9d53303Bfe20796       0.000000e+00\n",
       "0x000000000437b3CCE2530936156388Bff5578FC3       4.175880e+18\n",
       "0x000000000A42C2791eEc307FFf43Fa5c640e3Ef7       0.000000e+00\n",
       "0x000000F36EDb9d436Be73cDBf0DCa7dF3E6F3A50       0.000000e+00\n",
       "0x00000633Df1228868270bAdB2B812E12e13fdB91       2.829000e+17\n",
       "0x000E49C87d2874431567d38FF9548890aB39BAac       1.399971e+19\n",
       "0x001B4b85192aa034bff1524f181e3a7060e0dC30       1.800000e+17\n",
       "0x0025Eae58dF9F636F261CFdFa98cAcb57779DF74       0.000000e+00"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "total_value_per_nft = transfers[[\"nft_address\", \"transaction_value\"]].groupby(transfers[\"nft_address\"]).sum()\n",
    "total_value_per_nft.head(8)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>transaction_value</th>\n",
       "      <th>info</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>nft_address</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270</th>\n",
       "      <td>2.296429e+23</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</th>\n",
       "      <td>1.588150e+23</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x60E4d786628Fea6478F785A6d7e704777c86a7c6</th>\n",
       "      <td>7.530649e+22</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7</th>\n",
       "      <td>6.610220e+22</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7</th>\n",
       "      <td>6.378142e+22</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x3bf2922f4520a8BA0c2eFC3D2a1539678DaD5e9D</th>\n",
       "      <td>4.022007e+22</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a</th>\n",
       "      <td>3.809675e+22</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBd3531dA5CF5857e7CfAA92426877b022e612cf8</th>\n",
       "      <td>3.797948e+22</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            transaction_value  info\n",
       "nft_address                                                        \n",
       "0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270       2.296429e+23  None\n",
       "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D       1.588150e+23  None\n",
       "0x60E4d786628Fea6478F785A6d7e704777c86a7c6       7.530649e+22  None\n",
       "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7       6.610220e+22  None\n",
       "0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7       6.378142e+22  None\n",
       "0x3bf2922f4520a8BA0c2eFC3D2a1539678DaD5e9D       4.022007e+22  None\n",
       "0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a       3.809675e+22  None\n",
       "0xBd3531dA5CF5857e7CfAA92426877b022e612cf8       3.797948e+22  None"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "most_valuable_nfts = total_value_per_nft[\"transaction_value\"].sort_values(ascending=False).head(8)\n",
    "most_valuable_nfts = most_valuable_nfts.to_frame()\n",
    "most_valuable_nfts['info'] = None\n",
    "most_valuable_nfts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### INFO:\n",
    "[0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270](https://etherscan.io/address/0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270) Info: https://artblocks.io\n",
    "\n",
    "[0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D](https://etherscan.io/address/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D) Info: https://boredapeyachtclub.com/#/\n",
    "\n",
    "[0x60E4d786628Fea6478F785A6d7e704777c86a7c6](https://etherscan.io/address/0x60E4d786628Fea6478F785A6d7e704777c86a7c6) Info: https://boredapeyachtclub.com/#/mayc\n",
    "\n",
    "[0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7](https://etherscan.io/address/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7) Info: https://larvalabs.com/project/meebits\n",
    "\n",
    "[0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7](https://etherscan.io/address/0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7) Info: https://www.lootproject.com\n",
    "\n",
    "[0x3bf2922f4520a8BA0c2eFC3D2a1539678DaD5e9D](https://etherscan.io/address/0x3bf2922f4520a8BA0c2eFC3D2a1539678DaD5e9D) Info: https://www.0n1force.com\n",
    "\n",
    "[0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a](https://etherscan.io/address/0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a) Info: https://artblocks.io  Old BLOCKS Token \n",
    "\n",
    "[0xBd3531dA5CF5857e7CfAA92426877b022e612cf8](https://etherscan.io/address/0xBd3531dA5CF5857e7CfAA92426877b022e612cf8) Info: https://www.pudgypenguins.io/#/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 153,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>transaction_value</th>\n",
       "      <th>info</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>nft_address</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270</th>\n",
       "      <td>2.296429e+23</td>\n",
       "      <td>artblocks</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</th>\n",
       "      <td>1.588150e+23</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x60E4d786628Fea6478F785A6d7e704777c86a7c6</th>\n",
       "      <td>7.530649e+22</td>\n",
       "      <td>MAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7</th>\n",
       "      <td>6.610220e+22</td>\n",
       "      <td>Meebits</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7</th>\n",
       "      <td>6.378142e+22</td>\n",
       "      <td>LOOT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x3bf2922f4520a8BA0c2eFC3D2a1539678DaD5e9D</th>\n",
       "      <td>4.022007e+22</td>\n",
       "      <td>0n1force</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a</th>\n",
       "      <td>3.809675e+22</td>\n",
       "      <td>Artblocks OLD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBd3531dA5CF5857e7CfAA92426877b022e612cf8</th>\n",
       "      <td>3.797948e+22</td>\n",
       "      <td>pudgypenguins</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            transaction_value           info\n",
       "nft_address                                                                 \n",
       "0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270       2.296429e+23      artblocks\n",
       "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D       1.588150e+23     BAYC Token\n",
       "0x60E4d786628Fea6478F785A6d7e704777c86a7c6       7.530649e+22     MAYC Token\n",
       "0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7       6.610220e+22        Meebits\n",
       "0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7       6.378142e+22           LOOT\n",
       "0x3bf2922f4520a8BA0c2eFC3D2a1539678DaD5e9D       4.022007e+22       0n1force\n",
       "0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a       3.809675e+22  Artblocks OLD\n",
       "0xBd3531dA5CF5857e7CfAA92426877b022e612cf8       3.797948e+22  pudgypenguins"
      ]
     },
     "execution_count": 153,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "most_valuable_nfts.at['0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270', 'info'] = 'artblocks'\n",
    "most_valuable_nfts.at['0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D', 'info'] = 'BAYC Token'\n",
    "most_valuable_nfts.at['0x60E4d786628Fea6478F785A6d7e704777c86a7c6', 'info'] = 'MAYC Token'\n",
    "most_valuable_nfts.at['0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7', 'info'] = 'Meebits'\n",
    "most_valuable_nfts.at['0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7', 'info'] = 'LOOT'\n",
    "most_valuable_nfts.at['0x3bf2922f4520a8BA0c2eFC3D2a1539678DaD5e9D', 'info'] = '0n1force'\n",
    "most_valuable_nfts.at['0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a', 'info'] = 'Artblocks OLD'\n",
    "most_valuable_nfts.at['0xBd3531dA5CF5857e7CfAA92426877b022e612cf8', 'info'] = 'pudgypenguins'\n",
    "most_valuable_nfts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Most valuable NFT conctract chart')"
      ]
     },
     "execution_count": 154,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 23696 characters]\n",
      "text/plain": [
       "<Figure size 842.4x595.44 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots()\n",
    "fig.set_size_inches(11.7, 8.27)\n",
    "sns.barplot(y=most_valuable_nfts['info'], x=most_valuable_nfts['transaction_value']).set_title('Most valuable NFT conctract chart')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>transaction_value</th>\n",
       "      <th>nft_address</th>\n",
       "      <th>info</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>timestamp</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2021-01-01 01:10:00</th>\n",
       "      <td>1.761902e+17</td>\n",
       "      <td>0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a</td>\n",
       "      <td>Artblocks OLD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 01:10:00</th>\n",
       "      <td>1.761902e+17</td>\n",
       "      <td>0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a</td>\n",
       "      <td>Artblocks OLD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 01:10:00</th>\n",
       "      <td>1.761902e+17</td>\n",
       "      <td>0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a</td>\n",
       "      <td>Artblocks OLD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 01:10:00</th>\n",
       "      <td>1.761902e+17</td>\n",
       "      <td>0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a</td>\n",
       "      <td>Artblocks OLD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 01:10:00</th>\n",
       "      <td>1.761902e+17</td>\n",
       "      <td>0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a</td>\n",
       "      <td>Artblocks OLD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:55:02</th>\n",
       "      <td>1.110000e+18</td>\n",
       "      <td>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:55:34</th>\n",
       "      <td>8.000000e+17</td>\n",
       "      <td>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:57:10</th>\n",
       "      <td>1.000000e+18</td>\n",
       "      <td>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:57:10</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:59:57</th>\n",
       "      <td>9.500000e+17</td>\n",
       "      <td>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>275100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     transaction_value  \\\n",
       "timestamp                                \n",
       "2021-01-01 01:10:00       1.761902e+17   \n",
       "2021-01-01 01:10:00       1.761902e+17   \n",
       "2021-01-01 01:10:00       1.761902e+17   \n",
       "2021-01-01 01:10:00       1.761902e+17   \n",
       "2021-01-01 01:10:00       1.761902e+17   \n",
       "...                                ...   \n",
       "2021-05-31 23:55:02       1.110000e+18   \n",
       "2021-05-31 23:55:34       8.000000e+17   \n",
       "2021-05-31 23:57:10       1.000000e+18   \n",
       "2021-05-31 23:57:10       0.000000e+00   \n",
       "2021-05-31 23:59:57       9.500000e+17   \n",
       "\n",
       "                                                    nft_address           info  \n",
       "timestamp                                                                       \n",
       "2021-01-01 01:10:00  0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a  Artblocks OLD  \n",
       "2021-01-01 01:10:00  0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a  Artblocks OLD  \n",
       "2021-01-01 01:10:00  0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a  Artblocks OLD  \n",
       "2021-01-01 01:10:00  0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a  Artblocks OLD  \n",
       "2021-01-01 01:10:00  0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a  Artblocks OLD  \n",
       "...                                                         ...            ...  \n",
       "2021-05-31 23:55:02  0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D     BAYC Token  \n",
       "2021-05-31 23:55:34  0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D     BAYC Token  \n",
       "2021-05-31 23:57:10  0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D     BAYC Token  \n",
       "2021-05-31 23:57:10  0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D     BAYC Token  \n",
       "2021-05-31 23:59:57  0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D     BAYC Token  \n",
       "\n",
       "[275100 rows x 3 columns]"
      ]
     },
     "execution_count": 155,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#get frame with values over time\n",
    "num_df = pd.DataFrame()\n",
    "#cast to numeric\n",
    "num_df = (transfers[[\"transaction_value\", \"timestamp\"]].apply(pd.to_numeric, errors='coerce'))\n",
    "#add nft_address column to it\n",
    "num_df[\"nft_address\"]=transfers[\"nft_address\"]\n",
    "#filter out only ones that are in most_popular_nft variable\n",
    "num_df = num_df[num_df.nft_address.isin(list(most_valuable_nfts.index))]\n",
    "#convert timestamp in to date time\n",
    "num_df[\"timestamp\"] = pd.to_datetime(num_df.timestamp, unit='s', errors='coerce')\n",
    "#set index as timestamp\n",
    "num_df = num_df.set_index(\"timestamp\")\n",
    "\n",
    "num_df['info'] = None\n",
    "for i in range(len(most_valuable_nfts)):\n",
    "    address = most_valuable_nfts.iloc[i].name\n",
    "    \n",
    "    num_df.loc[num_df.nft_address == address, 'info'] = most_valuable_nfts.at[address, 'info'] #most_valuable_nfts.at[num_df.iloc[i]['nft_address'], 'info']\n",
    "\n",
    "num_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "metadata": {},
   "outputs": [],
   "source": [
    "#group timestamps by day, create column per each nft_address, aggregate transaction value by count and sum\n",
    "new_df = num_df.groupby([pd.Grouper(freq='d'), 'nft_address', 'info'])['transaction_value'].agg(transaction_value=\"sum\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 103032 characters]\n",
      "text/plain": [
       "<Figure size 1728x864 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(24, 12))\n",
    "# new_df.unstack()\n",
    "ax = sns.lineplot(data=new_df, x='timestamp', y='transaction_value', hue='info',)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "nft_address\n",
       "0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205    386096\n",
       "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85    187809\n",
       "0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270    135308\n",
       "0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405    128240\n",
       "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d     70095\n",
       "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D     34966\n",
       "0x1A92f7381B9F03921564a437210bB9396471050C     29539\n",
       "0xBd3531dA5CF5857e7CfAA92426877b022e612cf8     28764\n",
       "Name: nft_address, dtype: int64"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "most_popular_nfts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### INFO:\n",
    "[0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205](https://etherscan.io/address/0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205) Info: SOR token\n",
    "\n",
    "[0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85](https://etherscan.io/address/0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85) Info: ENS Base registrar\n",
    "\n",
    "[0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270](https://etherscan.io/address/0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270) Info: BLOCKS Token\n",
    "\n",
    "[0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405](https://etherscan.io/address/0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405) Info: FNDNFT Token\n",
    "\n",
    "[0x06012c8cf97BEaD5deAe237070F9587f8E7A266d](https://etherscan.io/address/0x06012c8cf97BEaD5deAe237070F9587f8E7A266d) Info: CryptoKitties Core\n",
    "\n",
    "[0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D](https://etherscan.io/address/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D) Info: BAYC Token\n",
    "\n",
    "[0x1A92f7381B9F03921564a437210bB9396471050C](https://etherscan.io/address/0x1A92f7381B9F03921564a437210bB9396471050C) Info: COOL Token\n",
    "\n",
    "[0xBd3531dA5CF5857e7CfAA92426877b022e612cf8](https://etherscan.io/address/0xBd3531dA5CF5857e7CfAA92426877b022e612cf8) Info: PPG Token"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>info</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>nft_address</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</th>\n",
       "      <td>386096</td>\n",
       "      <td>SOR token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85</th>\n",
       "      <td>187809</td>\n",
       "      <td>ENS Base registrar</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270</th>\n",
       "      <td>135308</td>\n",
       "      <td>BLOCKS Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405</th>\n",
       "      <td>128240</td>\n",
       "      <td>FNDNFT Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x06012c8cf97BEaD5deAe237070F9587f8E7A266d</th>\n",
       "      <td>70095</td>\n",
       "      <td>CryptoKitties Core</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</th>\n",
       "      <td>34966</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x1A92f7381B9F03921564a437210bB9396471050C</th>\n",
       "      <td>29539</td>\n",
       "      <td>COOL Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBd3531dA5CF5857e7CfAA92426877b022e612cf8</th>\n",
       "      <td>28764</td>\n",
       "      <td>PPG Token</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                             count                info\n",
       "nft_address                                                           \n",
       "0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205  386096           SOR token\n",
       "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85  187809  ENS Base registrar\n",
       "0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270  135308        BLOCKS Token\n",
       "0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405  128240        FNDNFT Token\n",
       "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d   70095  CryptoKitties Core\n",
       "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D   34966          BAYC Token\n",
       "0x1A92f7381B9F03921564a437210bB9396471050C   29539          COOL Token\n",
       "0xBd3531dA5CF5857e7CfAA92426877b022e612cf8   28764           PPG Token"
      ]
     },
     "execution_count": 170,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "most_popular_nfts = transactions_per_nft.sort_values(ascending=False).head(8)\n",
    "most_popular_nfts = most_popular_nfts.to_frame()\n",
    "most_valuable_nfts['info'] = None\n",
    "most_popular_nfts.at['0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205', 'info'] = 'SOR token'\n",
    "most_popular_nfts.at['0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85', 'info'] = 'ENS Base registrar'\n",
    "most_popular_nfts.at['0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270', 'info'] = 'BLOCKS Token'\n",
    "most_popular_nfts.at['0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405', 'info'] = 'FNDNFT Token'\n",
    "most_popular_nfts.at['0x06012c8cf97BEaD5deAe237070F9587f8E7A266d', 'info'] = 'CryptoKitties Core'\n",
    "most_popular_nfts.at['0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D', 'info'] = 'BAYC Token'\n",
    "most_popular_nfts.at['0x1A92f7381B9F03921564a437210bB9396471050C', 'info'] = ' COOL Token'\n",
    "most_popular_nfts.at['0xBd3531dA5CF5857e7CfAA92426877b022e612cf8', 'info'] = 'PPG Token'\n",
    "most_popular_nfts = most_popular_nfts.rename(columns={'nft_address': 'count'})\n",
    "most_popular_nfts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 175,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Most transaction count per NFT conctract chart')"
      ]
     },
     "execution_count": 175,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 27264 characters]\n",
      "text/plain": [
       "<Figure size 842.4x595.44 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots()\n",
    "fig.set_size_inches(11.7, 8.27)\n",
    "sns.barplot(y=most_popular_nfts['info'], x=most_popular_nfts['count']).set_title('Most transaction count per NFT conctract chart')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 176,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>transaction_value</th>\n",
       "      <th>nft_address</th>\n",
       "      <th>info</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>timestamp</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2021-01-01 00:16:46</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</td>\n",
       "      <td>SOR token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 00:16:46</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</td>\n",
       "      <td>SOR token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 00:01:37</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0x06012c8cf97BEaD5deAe237070F9587f8E7A266d</td>\n",
       "      <td>CryptoKitties Core</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 00:19:08</th>\n",
       "      <td>3.000000e+16</td>\n",
       "      <td>0x06012c8cf97BEaD5deAe237070F9587f8E7A266d</td>\n",
       "      <td>CryptoKitties Core</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-01 00:16:46</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</td>\n",
       "      <td>SOR token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:57:10</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:57:26</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</td>\n",
       "      <td>SOR token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:57:26</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</td>\n",
       "      <td>SOR token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:57:26</th>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405</td>\n",
       "      <td>FNDNFT Token</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31 23:59:57</th>\n",
       "      <td>9.500000e+17</td>\n",
       "      <td>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</td>\n",
       "      <td>BAYC Token</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000817 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     transaction_value  \\\n",
       "timestamp                                \n",
       "2021-01-01 00:16:46       0.000000e+00   \n",
       "2021-01-01 00:16:46       0.000000e+00   \n",
       "2021-01-01 00:01:37       0.000000e+00   \n",
       "2021-01-01 00:19:08       3.000000e+16   \n",
       "2021-01-01 00:16:46       0.000000e+00   \n",
       "...                                ...   \n",
       "2021-05-31 23:57:10       0.000000e+00   \n",
       "2021-05-31 23:57:26       0.000000e+00   \n",
       "2021-05-31 23:57:26       0.000000e+00   \n",
       "2021-05-31 23:57:26       0.000000e+00   \n",
       "2021-05-31 23:59:57       9.500000e+17   \n",
       "\n",
       "                                                    nft_address  \\\n",
       "timestamp                                                         \n",
       "2021-01-01 00:16:46  0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205   \n",
       "2021-01-01 00:16:46  0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205   \n",
       "2021-01-01 00:01:37  0x06012c8cf97BEaD5deAe237070F9587f8E7A266d   \n",
       "2021-01-01 00:19:08  0x06012c8cf97BEaD5deAe237070F9587f8E7A266d   \n",
       "2021-01-01 00:16:46  0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205   \n",
       "...                                                         ...   \n",
       "2021-05-31 23:57:10  0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D   \n",
       "2021-05-31 23:57:26  0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205   \n",
       "2021-05-31 23:57:26  0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205   \n",
       "2021-05-31 23:57:26  0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405   \n",
       "2021-05-31 23:59:57  0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D   \n",
       "\n",
       "                                   info  \n",
       "timestamp                                \n",
       "2021-01-01 00:16:46           SOR token  \n",
       "2021-01-01 00:16:46           SOR token  \n",
       "2021-01-01 00:01:37  CryptoKitties Core  \n",
       "2021-01-01 00:19:08  CryptoKitties Core  \n",
       "2021-01-01 00:16:46           SOR token  \n",
       "...                                 ...  \n",
       "2021-05-31 23:57:10          BAYC Token  \n",
       "2021-05-31 23:57:26           SOR token  \n",
       "2021-05-31 23:57:26           SOR token  \n",
       "2021-05-31 23:57:26        FNDNFT Token  \n",
       "2021-05-31 23:59:57          BAYC Token  \n",
       "\n",
       "[1000817 rows x 3 columns]"
      ]
     },
     "execution_count": 176,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#get frame with values over time\n",
    "num_df = pd.DataFrame()\n",
    "#cast to numeric\n",
    "num_df = (transfers[[\"transaction_value\", \"timestamp\"]].apply(pd.to_numeric, errors='coerce'))\n",
    "#add nft_address column to it\n",
    "num_df[\"nft_address\"]=transfers[\"nft_address\"]\n",
    "#filter out only ones that are in most_popular_nfts variable\n",
    "num_df = num_df[num_df.nft_address.isin(list(most_popular_nfts.index))]\n",
    "#convert timestamp in to date time\n",
    "num_df[\"timestamp\"] = pd.to_datetime(num_df.timestamp, unit='s', errors='coerce')\n",
    "#set index as timestamp\n",
    "num_df = num_df.set_index(\"timestamp\")\n",
    "\n",
    "num_df['info'] = None\n",
    "for i in range(len(most_valuable_nfts)):\n",
    "    address = most_popular_nfts.iloc[i].name\n",
    "    \n",
    "    num_df.loc[num_df.nft_address == address, 'info'] = most_popular_nfts.at[address, 'info'] #most_valuable_nfts.at[num_df.iloc[i]['nft_address'], 'info']\n",
    "\n",
    "num_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "metadata": {},
   "outputs": [],
   "source": [
    "#group timestamps by day, create column per each nft_address, aggregate transaction value by count and sum\n",
    "new_df = num_df.groupby([pd.Grouper(freq='d'), 'nft_address', 'info'])['transaction_value'].agg(transaction_value=\"count\").rename(columns={'transaction_value': 'count'})\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>timestamp</th>\n",
       "      <th>nft_address</th>\n",
       "      <th>info</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">2021-01-01</th>\n",
       "      <th>0x06012c8cf97BEaD5deAe237070F9587f8E7A266d</th>\n",
       "      <th>CryptoKitties Core</th>\n",
       "      <td>179</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85</th>\n",
       "      <th>ENS Base registrar</th>\n",
       "      <td>166</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</th>\n",
       "      <th>SOR token</th>\n",
       "      <td>831</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270</th>\n",
       "      <th>BLOCKS Token</th>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-02</th>\n",
       "      <th>0x06012c8cf97BEaD5deAe237070F9587f8E7A266d</th>\n",
       "      <th>CryptoKitties Core</th>\n",
       "      <td>168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">2021-09-25</th>\n",
       "      <th>0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85</th>\n",
       "      <th>ENS Base registrar</th>\n",
       "      <td>1965</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205</th>\n",
       "      <th>SOR token</th>\n",
       "      <td>286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D</th>\n",
       "      <th>BAYC Token</th>\n",
       "      <td>75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xBd3531dA5CF5857e7CfAA92426877b022e612cf8</th>\n",
       "      <th>PPG Token</th>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270</th>\n",
       "      <th>BLOCKS Token</th>\n",
       "      <td>505</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1240 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                          count\n",
       "timestamp  nft_address                                info                     \n",
       "2021-01-01 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d CryptoKitties Core    179\n",
       "           0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85 ENS Base registrar    166\n",
       "           0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205 SOR token             831\n",
       "           0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270 BLOCKS Token           39\n",
       "2021-01-02 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d CryptoKitties Core    168\n",
       "...                                                                         ...\n",
       "2021-09-25 0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85 ENS Base registrar   1965\n",
       "           0x629A673A8242c2AC4B7B8C5D8735fbeac21A6205 SOR token             286\n",
       "           0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D BAYC Token             75\n",
       "           0xBd3531dA5CF5857e7CfAA92426877b022e612cf8 PPG Token              38\n",
       "           0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270 BLOCKS Token          505\n",
       "\n",
       "[1240 rows x 1 columns]"
      ]
     },
     "execution_count": 180,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 282228 characters]\n",
      "text/plain": [
       "<Figure size 1728x864 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(24, 12))\n",
    "# new_df.unstack()\n",
    "ax = sns.lineplot(data=new_df, x='timestamp', y='count', hue='info')\n",
    "\n",
    "# ax.set(yscale=\"log\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
