{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Import Dependencies\n",
    "In this task, the libraries I used are:\n",
    "* Numpy\n",
    "* Pandas\n",
    "* Matplotlib"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# File\n",
    "For this task, I have snipped specific columns in the \"Optimization Plant\" and make another csv to be read."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "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>GUDANG</th>\n",
       "      <th>BIAYA HANDLING @ CARTON</th>\n",
       "      <th>ONGKIR-BDG @ CARTON</th>\n",
       "      <th>ONGKIR-YOGYA @ CARTON</th>\n",
       "      <th>ONGKIR-MLG @ CARTON</th>\n",
       "      <th>ONGKIR-JKT @ CARTON</th>\n",
       "      <th>INDEX_MARGIN AA</th>\n",
       "      <th>INDEX_MARGIN BB</th>\n",
       "      <th>INDEX_MARGIN_CC</th>\n",
       "      <th>Capacity  AA</th>\n",
       "      <th>Capacity BB</th>\n",
       "      <th>Capacity  CC</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>PLANT1</td>\n",
       "      <td>1,000</td>\n",
       "      <td>2,500</td>\n",
       "      <td>1,500</td>\n",
       "      <td>2,000</td>\n",
       "      <td>2,000</td>\n",
       "      <td>50,000</td>\n",
       "      <td>45,000</td>\n",
       "      <td>60,000</td>\n",
       "      <td>15,000</td>\n",
       "      <td>20,000</td>\n",
       "      <td>12,000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>PLANT2</td>\n",
       "      <td>1,100</td>\n",
       "      <td>2,400</td>\n",
       "      <td>1,000</td>\n",
       "      <td>2,000</td>\n",
       "      <td>2,500</td>\n",
       "      <td>50,000</td>\n",
       "      <td>50,000</td>\n",
       "      <td>70,000</td>\n",
       "      <td>22,000</td>\n",
       "      <td>15,000</td>\n",
       "      <td>15,000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>PLANT3</td>\n",
       "      <td>1,200</td>\n",
       "      <td>1,000</td>\n",
       "      <td>3,000</td>\n",
       "      <td>2,000</td>\n",
       "      <td>3,000</td>\n",
       "      <td>60,000</td>\n",
       "      <td>45,000</td>\n",
       "      <td>55,000</td>\n",
       "      <td>20,000</td>\n",
       "      <td>10,000</td>\n",
       "      <td>27,000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   GUDANG BIAYA HANDLING @ CARTON ONGKIR-BDG @ CARTON ONGKIR-YOGYA @ CARTON  \\\n",
       "0  PLANT1                   1,000               2,500                 1,500   \n",
       "1  PLANT2                   1,100               2,400                 1,000   \n",
       "2  PLANT3                   1,200               1,000                 3,000   \n",
       "\n",
       "  ONGKIR-MLG @ CARTON ONGKIR-JKT @ CARTON INDEX_MARGIN AA INDEX_MARGIN BB  \\\n",
       "0               2,000               2,000          50,000          45,000   \n",
       "1               2,000               2,500          50,000          50,000   \n",
       "2               2,000               3,000          60,000          45,000   \n",
       "\n",
       "  INDEX_MARGIN_CC Capacity  AA Capacity BB Capacity  CC  \n",
       "0          60,000       15,000      20,000       12,000  \n",
       "1          70,000       22,000      15,000       15,000  \n",
       "2          55,000       20,000      10,000       27,000  "
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Read csv\n",
    "df = pd.read_csv(\"C:\\\\Users\\\\Asus\\\\Documents\\\\ForCalculation.csv\")\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Get Margin Value\n",
    "Based on our dataframe, we get our AA, BB, and CC margins respectively."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "getAA = df['INDEX_MARGIN AA'].values\n",
    "getBB = df['INDEX_MARGIN BB'].values\n",
    "getCC = df['INDEX_MARGIN_CC'].values"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Note #1\n",
    "Since our dataframe contains comma in each supposed number, I converted it to become int to be processed later."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Plant 1 - Index Margin [AA, BB, CC]\n",
    "M_P1_AA = int(getAA[0].replace(',', ''))\n",
    "M_P1_BB = int(getBB[0].replace(',', ''))\n",
    "M_P1_CC = int(getCC[0].replace(',', ''))\n",
    "\n",
    "# Plant 2 - Index Margin [AA, BB, CC]\n",
    "M_P2_AA = int(getAA[1].replace(',', ''))\n",
    "M_P2_BB = int(getBB[1].replace(',', ''))\n",
    "M_P2_CC = int(getCC[1].replace(',', ''))\n",
    "\n",
    "# Plant 3 - Index Margin [AA, BB, CC]\n",
    "M_P3_AA = int(getAA[2].replace(',', ''))\n",
    "M_P3_BB = int(getBB[2].replace(',', ''))\n",
    "M_P3_CC = int(getCC[2].replace(',', ''))\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Get Cost Value\n",
    "I extracted the values from **handling fees** and **Ongkir** respectively."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [],
   "source": [
    "getCost = df['BIAYA HANDLING @ CARTON'].values\n",
    "getO_BDG = df['ONGKIR-BDG @ CARTON'].values\n",
    "getO_YGY = df['ONGKIR-YOGYA @ CARTON'].values\n",
    "getO_MLG = df['ONGKIR-MLG @ CARTON'].values\n",
    "getO_JKT = df['ONGKIR-JKT @ CARTON'].values"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Note #2\n",
    "Based on the example, the formula of Cost is **Handling fee** + **Ongkir**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Cost Plant 1 - All Product - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "CP1_BDG = int(getCost[0].replace(',', ''))+int(getO_BDG[0].replace(',', ''))\n",
    "CP1_YGY = int(getCost[0].replace(',', ''))+int(getO_YGY[0].replace(',', ''))\n",
    "CP1_MLG = int(getCost[0].replace(',', ''))+int(getO_MLG[0].replace(',', ''))\n",
    "CP1_JKT = int(getCost[0].replace(',', ''))+int(getO_JKT[0].replace(',', ''))\n",
    "\n",
    "# Cost Plant 2 - All Product - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "CP2_BDG = int(getCost[1].replace(',', ''))+int(getO_BDG[1].replace(',', ''))\n",
    "CP2_YGY = int(getCost[1].replace(',', ''))+int(getO_YGY[1].replace(',', ''))\n",
    "CP2_MLG = int(getCost[1].replace(',', ''))+int(getO_MLG[1].replace(',', ''))\n",
    "CP2_JKT = int(getCost[1].replace(',', ''))+int(getO_JKT[1].replace(',', ''))\n",
    "\n",
    "# Cost Plant 3 - All Product - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "CP3_BDG = int(getCost[2].replace(',', ''))+int(getO_BDG[2].replace(',', ''))\n",
    "CP3_YGY = int(getCost[2].replace(',', ''))+int(getO_YGY[2].replace(',', ''))\n",
    "CP3_MLG = int(getCost[2].replace(',', ''))+int(getO_MLG[2].replace(',', ''))\n",
    "CP3_JKT = int(getCost[2].replace(',', ''))+int(getO_JKT[2].replace(',', ''))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Get Nett Margin Value\n",
    "Based from the example, the formula for Nett Margin is **Margin** - **Cost**."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Nett Margin Plant 1 - AA - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P1_AA_BDG = M_P1_AA - CP1_BDG\n",
    "NM_P1_AA_YGY = M_P1_AA - CP1_YGY\n",
    "NM_P1_AA_MLG = M_P1_AA - CP1_MLG\n",
    "NM_P1_AA_JKT = M_P1_AA - CP1_JKT\n",
    "\n",
    "# Nett Margin Plant 1 - BB - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P1_BB_BDG = M_P1_BB - CP1_BDG\n",
    "NM_P1_BB_YGY = M_P1_BB - CP1_YGY\n",
    "NM_P1_BB_MLG = M_P1_BB - CP1_MLG\n",
    "NM_P1_BB_JKT = M_P1_BB - CP1_JKT\n",
    "\n",
    "# Nett Margin Plant 1 - CC - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P1_CC_BDG = M_P1_CC - CP1_BDG\n",
    "NM_P1_CC_YGY = M_P1_CC - CP1_YGY\n",
    "NM_P1_CC_MLG = M_P1_CC - CP1_MLG\n",
    "NM_P1_CC_JKT = M_P1_CC - CP1_JKT\n",
    "\n",
    "# Nett Margin Plant 2 - AA - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P2_AA_BDG = M_P2_AA - CP2_BDG\n",
    "NM_P2_AA_YGY = M_P2_AA - CP2_YGY\n",
    "NM_P2_AA_MLG = M_P2_AA - CP2_MLG\n",
    "NM_P2_AA_JKT = M_P2_AA - CP2_JKT\n",
    "\n",
    "# Nett Margin Plant 2 - BB - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P2_BB_BDG = M_P2_BB - CP2_BDG\n",
    "NM_P2_BB_YGY = M_P2_BB - CP2_YGY\n",
    "NM_P2_BB_MLG = M_P2_BB - CP2_MLG\n",
    "NM_P2_BB_JKT = M_P2_BB - CP2_JKT\n",
    "\n",
    "# Nett Margin Plant 2 - CC - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P2_CC_BDG = M_P2_CC - CP2_BDG\n",
    "NM_P2_CC_YGY = M_P2_CC - CP2_YGY\n",
    "NM_P2_CC_MLG = M_P2_CC - CP2_MLG\n",
    "NM_P2_CC_JKT = M_P2_CC - CP2_JKT\n",
    "\n",
    "# Nett Margin Plant 3 - AA - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P3_AA_BDG = M_P3_AA - CP3_BDG\n",
    "NM_P3_AA_YGY = M_P3_AA - CP3_YGY\n",
    "NM_P3_AA_MLG = M_P3_AA - CP3_MLG\n",
    "NM_P3_AA_JKT = M_P3_AA - CP3_JKT\n",
    "\n",
    "# Nett Margin Plant 3 - BB - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P3_BB_BDG = M_P3_BB - CP3_BDG\n",
    "NM_P3_BB_YGY = M_P3_BB - CP3_YGY\n",
    "NM_P3_BB_MLG = M_P3_BB - CP3_MLG\n",
    "NM_P3_BB_JKT = M_P3_BB - CP3_JKT\n",
    "\n",
    "# Nett Margin Plant 3 - CC - Location [Bandung, Yogya, Malang, Jakarta]\n",
    "NM_P3_CC_BDG = M_P3_CC - CP3_BDG\n",
    "NM_P3_CC_YGY = M_P3_CC - CP3_YGY\n",
    "NM_P3_CC_MLG = M_P3_CC - CP3_MLG\n",
    "NM_P3_CC_JKT = M_P3_CC - CP3_JKT"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Nett Margin per Location\n",
    "This is to determine which location has the **highest** nett margin."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Net Margin Bandung\n",
    "NM_BDG = NM_P1_AA_BDG + NM_P1_BB_BDG + NM_P1_CC_BDG + NM_P2_AA_BDG + NM_P2_BB_BDG + NM_P2_CC_BDG + NM_P3_AA_BDG + NM_P3_BB_BDG + NM_P3_CC_BDG\n",
    "\n",
    "# Net Margin Yogyakarta\n",
    "NM_YGY = NM_P1_AA_YGY + NM_P1_BB_YGY + NM_P1_CC_YGY + NM_P2_AA_YGY + NM_P2_BB_YGY + NM_P2_CC_YGY + NM_P3_AA_YGY + NM_P3_BB_YGY + NM_P3_CC_YGY\n",
    "\n",
    "# Net Margin Malang\n",
    "NM_MLG = NM_P1_AA_MLG + NM_P1_BB_MLG + NM_P1_CC_MLG + NM_P2_AA_MLG + NM_P2_BB_MLG + NM_P2_CC_MLG + NM_P3_AA_MLG + NM_P3_BB_MLG + NM_P3_CC_MLG\n",
    "\n",
    "# Net Margin Jakarta\n",
    "NM_JKT = NM_P1_AA_JKT + NM_P1_BB_JKT + NM_P1_CC_JKT + NM_P2_AA_JKT + NM_P2_BB_JKT + NM_P2_CC_JKT + NM_P3_AA_JKT + NM_P3_BB_JKT + NM_P3_CC_JKT"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Nett Margin per Location Visualization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 39008 characters]\n",
      "text/plain": [
       "<Figure size 720x504 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "loc = ['Bandung', 'Yogya', 'Malang', 'Jakarta']\n",
    "\n",
    "data = [NM_BDG, NM_YGY, NM_MLG, NM_JKT]\n",
    "wp = { 'linewidth' : 1, 'edgecolor' : \"black\" }\n",
    "\n",
    "explode = (0.1, 0.2, 0.1, 0.0)\n",
    "colors = (\"burlywood\", \"darkorange\", \"bisque\", \"antiquewhite\")\n",
    "\n",
    "def func(pct, allvalues):\n",
    "    absolute = int(pct / 100.*np.sum(allvalues))\n",
    "    return \"{:.1f}%\\n({:d})\".format(pct, absolute)\n",
    "\n",
    "fig, ax = plt.subplots(figsize =(10, 7))\n",
    "wedges, texts, autotexts = ax.pie(data, \n",
    "                                  autopct = lambda pct: func(pct, data),\n",
    "                                  explode = explode, \n",
    "                                  labels = loc,\n",
    "                                  shadow = True,\n",
    "                                  colors = colors,\n",
    "                                  startangle = 90,\n",
    "                                  wedgeprops = wp,\n",
    "                                  textprops = dict(color =\"black\"))\n",
    "ax.set_title(\"Net Margin per Location\")\n",
    "plt.show() "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Nett Margin per Product\n",
    "This is to determine which product has the **highest** nett margin."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Net Margin AA\n",
    "NM_AA = NM_P1_AA_BDG+NM_P1_AA_YGY+NM_P1_AA_MLG+NM_P1_AA_JKT+NM_P2_AA_BDG+NM_P2_AA_YGY+NM_P2_AA_MLG+NM_P2_AA_JKT+NM_P3_AA_BDG+NM_P3_AA_YGY+NM_P3_AA_MLG+NM_P3_AA_JKT\n",
    "\n",
    "# Net Margin BB\n",
    "NM_BB = NM_P1_BB_BDG+NM_P1_BB_YGY+NM_P1_BB_MLG+NM_P1_BB_JKT+NM_P2_BB_BDG+NM_P2_BB_YGY+NM_P2_BB_MLG+NM_P2_BB_JKT+NM_P3_BB_BDG+NM_P3_BB_YGY+NM_P3_BB_MLG+NM_P3_BB_JKT\n",
    "\n",
    "# Net Margin CC\n",
    "NM_CC = NM_P1_CC_BDG+NM_P1_CC_YGY+NM_P1_CC_MLG+NM_P1_CC_JKT+NM_P2_CC_BDG+NM_P2_CC_YGY+NM_P2_CC_MLG+NM_P2_CC_JKT+NM_P3_CC_BDG+NM_P3_CC_YGY+NM_P3_CC_MLG+NM_P3_CC_JKT"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Nett Margin per Location Visualization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 43104 characters]\n",
      "text/plain": [
       "<Figure size 720x504 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "loc = ['AA', 'BB', 'CC']\n",
    "data = [NM_AA, NM_BB, NM_CC]\n",
    "\n",
    "wp = { 'linewidth' : 1, 'edgecolor' : \"black\" }\n",
    "explode = (0.1, 0.0, 0.2)\n",
    "colors = (\"burlywood\",\"bisque\",\"darkorange\")\n",
    "\n",
    "def func(pct, allvalues):\n",
    "    absolute = int(pct / 100.*np.sum(allvalues))\n",
    "    return \"{:.1f}%\\n({:d})\".format(pct, absolute)\n",
    "\n",
    "fig, ax = plt.subplots(figsize =(10, 7))\n",
    "wedges, texts, autotexts = ax.pie(data, \n",
    "                                  autopct = lambda pct: func(pct, data),\n",
    "                                  explode = explode, \n",
    "                                  labels = loc,\n",
    "                                  shadow = True,\n",
    "                                  colors = colors,\n",
    "                                  startangle = 90,\n",
    "                                  wedgeprops = wp,\n",
    "                                  textprops = dict(color =\"black\"))\n",
    "ax.set_title(\"Net Margin per Product\")\n",
    "plt.show() "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Nett Margin per Plant\n",
    "This is to determine which plant has the **highest** nett margin."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Net Margin Plant 1\n",
    "NM_P1 = NM_P1_AA_BDG+NM_P1_AA_YGY+NM_P1_AA_MLG+NM_P1_AA_JKT+NM_P1_BB_BDG+NM_P1_BB_YGY+NM_P1_BB_MLG+NM_P1_BB_JKT+NM_P1_CC_BDG+NM_P1_CC_YGY+NM_P1_CC_MLG+NM_P1_CC_JKT\n",
    "\n",
    "# Net Margin Plant 2\n",
    "NM_P2 = NM_P2_AA_BDG+NM_P2_AA_YGY+NM_P2_AA_MLG+NM_P2_AA_JKT+NM_P2_BB_BDG+NM_P2_BB_YGY+NM_P2_BB_MLG+NM_P2_BB_JKT+NM_P2_CC_BDG+NM_P2_CC_YGY+NM_P2_CC_MLG+NM_P2_CC_JKT\n",
    "\n",
    "# Net Margin Plant 3\n",
    "NM_P3 = NM_P3_AA_BDG+NM_P3_AA_YGY+NM_P3_AA_MLG+NM_P3_AA_JKT+NM_P3_BB_BDG+NM_P3_BB_YGY+NM_P3_BB_MLG+NM_P3_BB_JKT+NM_P3_CC_BDG+NM_P3_CC_YGY+NM_P3_CC_MLG+NM_P3_CC_JKT"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Nett Margin per Location Visualization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 42260 characters]\n",
      "text/plain": [
       "<Figure size 720x504 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "loc = ['Plant 1', 'Plant 2', 'Plant 3']\n",
    "data = [NM_P1, NM_P2, NM_P3]\n",
    "\n",
    "wp = { 'linewidth' : 1, 'edgecolor' : \"black\" }\n",
    "explode = (0.0, 0.2, 0.1)\n",
    "colors = (\"bisque\",\"darkorange\",\"burlywood\")\n",
    "\n",
    "def func(pct, allvalues):\n",
    "    absolute = int(pct / 100.*np.sum(allvalues))\n",
    "    return \"{:.1f}%\\n({:d})\".format(pct, absolute)\n",
    "\n",
    "fig, ax = plt.subplots(figsize =(10, 7))\n",
    "wedges, texts, autotexts = ax.pie(data, \n",
    "                                  autopct = lambda pct: func(pct, data),\n",
    "                                  explode = explode, \n",
    "                                  labels = loc,\n",
    "                                  shadow = True,\n",
    "                                  colors = colors,\n",
    "                                  startangle = 90,\n",
    "                                  wedgeprops = wp,\n",
    "                                  textprops = dict(color =\"black\"))\n",
    "ax.set_title(\"Net Margin per Plant\")\n",
    "plt.show() "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Note #3\n",
    "The calculations made, is referenced by the *Excel Case*, where it says **Nett Margin: Index Margin - Biaya handling - Ongkir**.\n",
    "\n",
    "I also took notes from the *example* Excel document, and I referenced how to get the numbers by looking at the formula bar.\n",
    "\n",
    "I admit I got confused in the **\"Distributed\"** column, I have got no clue why some cell is written, not with formula so I could not understand where it was coming from.\n",
    "\n",
    "And also there are **yellow highlight in the document**, indicating that it is an important indicator to be calculated. But I have not yet understand why some cells are highlighted as well."
   ]
  }
 ],
 "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.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
