Work Description
Title: Supply Chain data for iron ore to finished good in the U.S. Open Access Deposited
Attribute | Value |
---|---|
Methodology |
|
Description |
|
Creator | |
Depositor |
|
Contact information | |
Discipline | |
Funding agency |
|
Keyword | |
Date coverage |
|
Citations to related material |
|
Resource type | |
Last modified |
|
Published |
|
Language | |
DOI |
|
License |
(2020). Supply Chain data for iron ore to finished good in the U.S [Data set], University of Michigan - Deep Blue Data. https://doi.org/10.7302/rrws-xc78
Relationships
- This work is not a member of any user collections.
Files (Count: 2; Size: 82.7 KB)
Thumbnailthumbnail-column | Title | Original Upload | Last Modified | File Size | Access | Actions |
---|---|---|---|---|---|---|
SPLC_data.csv | 2020-04-19 | 2020-04-19 | 32.1 KB | Open Access |
|
|
SPLC_Network.ipynb | 2020-04-20 | 2020-04-20 | 50.7 KB | Open Access |
|
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import networkx as nx\n",
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"from mpl_toolkits.basemap import Basemap as Basemap\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Below are calculations for edge and node weights using financial data from the Bloomberg Terminal and FactSet. Edges are calculated as the product of Inventory Turnover * Node Weight * Percent Revenue. \n",
"Node Weight for CLF, AKS, X, and MT are assumed to be 1\n",
"Downstream node weight is calculated as the sum of the supplier edges connecting each customer in the supply chain. "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
"\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",
"\n",
"\n",
" \n",
" \n",
" \n",
" Supplier\n",
" 5 year Average Inventory Turnover Ratio\n",
" Customer\n",
" Percent Revenue\n",
" Value (M)\n",
" #connections\n",
" Weighted Turnover\n",
" 2017 Inventory Turnover Ratio\n",
" \n",
" \n",
" \n",
" \n",
" 0\n",
" AK Steel\n",
" 5.26\n",
" Ford Motor Co\n",
" 0.1200\n",
" $705.90\n",
" 23\n",
" 0.631200\n",
" 4.96\n",
" \n",
" \n",
" 1\n",
" AK Steel\n",
" 5.26\n",
" Fiat Chrysler\n",
" 0.1100\n",
" $647.08\n",
" 23\n",
" 0.578600\n",
" 4.96\n",
" \n",
" \n",
" 2\n",
" AK Steel\n",
" 5.26\n",
" General Motors Co\n",
" 0.0985\n",
" $144.90\n",
" 23\n",
" 0.518110\n",
" 4.96\n",
" \n",
" \n",
" 3\n",
" AK Steel\n",
" 5.26\n",
" Toyota Motors\n",
" 0.0632\n",
" $92.91\n",
" 23\n",
" 0.332432\n",
" 4.96\n",
" \n",
" \n",
" 4\n",
" AK Steel\n",
" 5.26\n",
" Honda Motor Co\n",
" 0.0366\n",
" $53.86\n",
" 23\n",
" 0.192516\n",
" 4.96\n",
" \n",
" \n",
"\n",
"
],
"text/plain": [
" Supplier 5 year Average Inventory Turnover Ratio Customer \\\n",
"0 AK Steel 5.26 Ford Motor Co \n",
"1 AK Steel 5.26 Fiat Chrysler \n",
"2 AK Steel 5.26 General Motors Co \n",
"3 AK Steel 5.26 Toyota Motors \n",
"4 AK Steel 5.26 Honda Motor Co \n",
"\n",
" Percent Revenue Value (M) #connections Weighted Turnover \\\n",
"0 0.1200 $705.90 23 0.631200 \n",
"1 0.1100 $647.08 23 0.578600 \n",
"2 0.0985 $144.90 23 0.518110 \n",
"3 0.0632 $92.91 23 0.332432 \n",
"4 0.0366 $53.86 23 0.192516 \n",
"\n",
" 2017 Inventory Turnover Ratio \n",
"0 4.96 \n",
"1 4.96 \n",
"2 4.96 \n",
"3 4.96 \n",
"4 4.96 "
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#nodes, test sheet\n",
"SPLC = pd.read_csv('SPLC_data.csv')#, index_col='Supplier')\n",
"SPLC.head()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
"\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",
"\n",
"\n",
" \n",
" \n",
" \n",
" index\n",
" 5 year Average Inventory Turnover Ratio\n",
" Customer\n",
" Percent Revenue\n",
" Value (M)\n",
" #connections\n",
" Weighted Turnover\n",
" 2017 Inventory Turnover Ratio\n",
" Node Weight\n",
" \n",
" \n",
" Supplier\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" AK Steel\n",
" 0\n",
" 5.26\n",
" Ford Motor Co\n",
" 0.1200\n",
" $705.90\n",
" 23\n",
" 0.631200\n",
" 4.96\n",
" 1.0\n",
" \n",
" \n",
" AK Steel\n",
" 1\n",
" 5.26\n",
" Fiat Chrysler\n",
" 0.1100\n",
" $647.08\n",
" 23\n",
" 0.578600\n",
" 4.96\n",
" 1.0\n",
" \n",
" \n",
" AK Steel\n",
" 2\n",
" 5.26\n",
" General Motors Co\n",
" 0.0985\n",
" $144.90\n",
" 23\n",
" 0.518110\n",
" 4.96\n",
" 1.0\n",
" \n",
" \n",
" AK Steel\n",
" 3\n",
" 5.26\n",
" Toyota Motors\n",
" 0.0632\n",
" $92.91\n",
" 23\n",
" 0.332432\n",
" 4.96\n",
" 1.0\n",
" \n",
" \n",
" AK Steel\n",
" 4\n",
" 5.26\n",
" Honda Motor Co\n",
" 0.0366\n",
" $53.86\n",
" 23\n",
" 0.192516\n",
" 4.96\n",
" 1.0\n",
" \n",
" \n",
"\n",
"
],
"text/plain": [
" index 5 year Average Inventory Turnover Ratio Customer \\\n",
"Supplier \n",
"AK Steel 0 5.26 Ford Motor Co \n",
"AK Steel 1 5.26 Fiat Chrysler \n",
"AK Steel 2 5.26 General Motors Co \n",
"AK Steel 3 5.26 Toyota Motors \n",
"AK Steel 4 5.26 Honda Motor Co \n",
"\n",
" Percent Revenue Value (M) #connections Weighted Turnover \\\n",
"Supplier \n",
"AK Steel 0.1200 $705.90 23 0.631200 \n",
"AK Steel 0.1100 $647.08 23 0.578600 \n",
"AK Steel 0.0985 $144.90 23 0.518110 \n",
"AK Steel 0.0632 $92.91 23 0.332432 \n",
"AK Steel 0.0366 $53.86 23 0.192516 \n",
"\n",
" 2017 Inventory Turnover Ratio Node Weight \n",
"Supplier \n",
"AK Steel 4.96 1.0 \n",
"AK Steel 4.96 1.0 \n",
"AK Steel 4.96 1.0 \n",
"AK Steel 4.96 1.0 \n",
"AK Steel 4.96 1.0 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Sets initial node weights for CLF, AKS, X, MT to 1 and SUN to 0.5\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Cleveland Cliffs','Node Weight']=1\n",
"SPLC.loc['AK Steel','Node Weight']=1\n",
"SPLC.loc['ArcelorMittal','Node Weight']=1\n",
"SPLC.loc['US Steel','Node Weight']=1\n",
"SPLC.loc['Suncoke Energy','Node Weight']=0.5\n",
"SPLC.loc['Suncoke Energy Partners','Node Weight']=0.5\n",
"SPLC.head()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
"\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",
"\n",
"\n",
" \n",
" \n",
" \n",
" index\n",
" 5 year Average Inventory Turnover Ratio\n",
" Customer\n",
" Percent Revenue\n",
" Value (M)\n",
" #connections\n",
" Weighted Turnover\n",
" 2017 Inventory Turnover Ratio\n",
" Node Weight\n",
" Edge Weight\n",
" \n",
" \n",
" Supplier\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" AK Steel\n",
" 0\n",
" 5.26\n",
" Ford Motor Co\n",
" 0.1200\n",
" $705.90\n",
" 23\n",
" 0.631200\n",
" 4.96\n",
" 1.0\n",
" 0.631200\n",
" \n",
" \n",
" AK Steel\n",
" 1\n",
" 5.26\n",
" Fiat Chrysler\n",
" 0.1100\n",
" $647.08\n",
" 23\n",
" 0.578600\n",
" 4.96\n",
" 1.0\n",
" 0.578600\n",
" \n",
" \n",
" AK Steel\n",
" 2\n",
" 5.26\n",
" General Motors Co\n",
" 0.0985\n",
" $144.90\n",
" 23\n",
" 0.518110\n",
" 4.96\n",
" 1.0\n",
" 0.518110\n",
" \n",
" \n",
" AK Steel\n",
" 3\n",
" 5.26\n",
" Toyota Motors\n",
" 0.0632\n",
" $92.91\n",
" 23\n",
" 0.332432\n",
" 4.96\n",
" 1.0\n",
" 0.332432\n",
" \n",
" \n",
" AK Steel\n",
" 4\n",
" 5.26\n",
" Honda Motor Co\n",
" 0.0366\n",
" $53.86\n",
" 23\n",
" 0.192516\n",
" 4.96\n",
" 1.0\n",
" 0.192516\n",
" \n",
" \n",
"\n",
"
],
"text/plain": [
" index 5 year Average Inventory Turnover Ratio Customer \\\n",
"Supplier \n",
"AK Steel 0 5.26 Ford Motor Co \n",
"AK Steel 1 5.26 Fiat Chrysler \n",
"AK Steel 2 5.26 General Motors Co \n",
"AK Steel 3 5.26 Toyota Motors \n",
"AK Steel 4 5.26 Honda Motor Co \n",
"\n",
" Percent Revenue Value (M) #connections Weighted Turnover \\\n",
"Supplier \n",
"AK Steel 0.1200 $705.90 23 0.631200 \n",
"AK Steel 0.1100 $647.08 23 0.578600 \n",
"AK Steel 0.0985 $144.90 23 0.518110 \n",
"AK Steel 0.0632 $92.91 23 0.332432 \n",
"AK Steel 0.0366 $53.86 23 0.192516 \n",
"\n",
" 2017 Inventory Turnover Ratio Node Weight Edge Weight \n",
"Supplier \n",
"AK Steel 4.96 1.0 0.631200 \n",
"AK Steel 4.96 1.0 0.578600 \n",
"AK Steel 4.96 1.0 0.518110 \n",
"AK Steel 4.96 1.0 0.332432 \n",
"AK Steel 4.96 1.0 0.192516 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates Edge Weight as the Product of Inventory Turnover * Node Weight * Percent Revenue\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']\n",
"SPLC.head()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"#Assigns Customer Column as index column\n",
"SPLC = SPLC.reset_index()\n",
"SPLC = SPLC.set_index('Customer')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"#Calculates Node Weight for Koppers Holdings and Shiloh Industries\n",
"#SPLC.loc['Koppers Holdings Inc']\n",
"Kop=SPLC.loc['Koppers Holdings Inc','Edge Weight'].sum()\n",
"Shiloh=SPLC.loc['Shiloh Industries','Edge Weight'].sum()\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
"\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",
"\n",
"\n",
" \n",
" \n",
" \n",
" Customer\n",
" index\n",
" 5 year Average Inventory Turnover Ratio\n",
" Percent Revenue\n",
" Value (M)\n",
" #connections\n",
" Weighted Turnover\n",
" 2017 Inventory Turnover Ratio\n",
" Node Weight\n",
" Edge Weight\n",
" \n",
" \n",
" Supplier\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" Koppers Holdings Inc\n",
" CSX Corp\n",
" 216\n",
" 6.07\n",
" 0.0610\n",
" $21.95\n",
" 3\n",
" 0.370270\n",
" 5.21\n",
" 0.002819\n",
" 0.001044\n",
" \n",
" \n",
" Koppers Holdings Inc\n",
" Berkshire Hathaway (BNSF)\n",
" 217\n",
" 6.07\n",
" 0.0604\n",
" $20.22\n",
" 3\n",
" 0.366628\n",
" 5.21\n",
" 0.002819\n",
" 0.001034\n",
" \n",
" \n",
" Koppers Holdings Inc\n",
" Canadian National Railway Co\n",
" 218\n",
" 6.07\n",
" 0.0445\n",
" $15.45\n",
" 3\n",
" 0.270115\n",
" 5.21\n",
" 0.002819\n",
" 0.000761\n",
" \n",
" \n",
"\n",
"
],
"text/plain": [
" Customer index \\\n",
"Supplier \n",
"Koppers Holdings Inc CSX Corp 216 \n",
"Koppers Holdings Inc Berkshire Hathaway (BNSF) 217 \n",
"Koppers Holdings Inc Canadian National Railway Co 218 \n",
"\n",
" 5 year Average Inventory Turnover Ratio \\\n",
"Supplier \n",
"Koppers Holdings Inc 6.07 \n",
"Koppers Holdings Inc 6.07 \n",
"Koppers Holdings Inc 6.07 \n",
"\n",
" Percent Revenue Value (M) #connections \\\n",
"Supplier \n",
"Koppers Holdings Inc 0.0610 $21.95 3 \n",
"Koppers Holdings Inc 0.0604 $20.22 3 \n",
"Koppers Holdings Inc 0.0445 $15.45 3 \n",
"\n",
" Weighted Turnover 2017 Inventory Turnover Ratio \\\n",
"Supplier \n",
"Koppers Holdings Inc 0.370270 5.21 \n",
"Koppers Holdings Inc 0.366628 5.21 \n",
"Koppers Holdings Inc 0.270115 5.21 \n",
"\n",
" Node Weight Edge Weight \n",
"Supplier \n",
"Koppers Holdings Inc 0.002819 0.001044 \n",
"Koppers Holdings Inc 0.002819 0.001034 \n",
"Koppers Holdings Inc 0.002819 0.000761 "
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Shiloh Industries','Node Weight']=Shiloh\n",
"SPLC.loc['Koppers Holdings Inc','Node Weight']=Kop\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']\n",
"SPLC.loc['Koppers Holdings Inc']"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"#Calculates Node Weight for Faurecia\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"SPLC.loc['Faurecia']\n",
"Faurecia=SPLC.loc['Faurecia','Edge Weight'].sum()\n",
"Gestamp=SPLC.loc['Gestamp Automocion','Edge Weight'].sum()\n",
"Caterpillar=SPLC.loc['Caterpillar','Edge Weight'].sum()\n",
"Friedman=SPLC.loc['Friedman Industries','Edge Weight'].sum()\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.182792"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#This calculates an intermediate weight for Nucor. There is a feedback loop between Nucor, Steel Dynamics, and Reliance Steel & Aluminimum\n",
"SPLC.loc['Nucor']\n",
"Nucor=SPLC.loc['Nucor','Edge Weight'].sum()\n",
"Nucor"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
"\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",
"\n",
"\n",
" \n",
" \n",
" \n",
" Supplier\n",
" index\n",
" 5 year Average Inventory Turnover Ratio\n",
" Percent Revenue\n",
" Value (M)\n",
" #connections\n",
" Weighted Turnover\n",
" 2017 Inventory Turnover Ratio\n",
" Node Weight\n",
" Edge Weight\n",
" \n",
" \n",
" Customer\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" Ford Motor Co\n",
" AK Steel\n",
" 0\n",
" 5.26\n",
" 0.1200\n",
" $705.90\n",
" 23\n",
" 0.631200\n",
" 4.96\n",
" 1.0\n",
" 0.631200\n",
" \n",
" \n",
" Fiat Chrysler\n",
" AK Steel\n",
" 1\n",
" 5.26\n",
" 0.1100\n",
" $647.08\n",
" 23\n",
" 0.578600\n",
" 4.96\n",
" 1.0\n",
" 0.578600\n",
" \n",
" \n",
" General Motors Co\n",
" AK Steel\n",
" 2\n",
" 5.26\n",
" 0.0985\n",
" $144.90\n",
" 23\n",
" 0.518110\n",
" 4.96\n",
" 1.0\n",
" 0.518110\n",
" \n",
" \n",
" Toyota Motors\n",
" AK Steel\n",
" 3\n",
" 5.26\n",
" 0.0632\n",
" $92.91\n",
" 23\n",
" 0.332432\n",
" 4.96\n",
" 1.0\n",
" 0.332432\n",
" \n",
" \n",
" Honda Motor Co\n",
" AK Steel\n",
" 4\n",
" 5.26\n",
" 0.0366\n",
" $53.86\n",
" 23\n",
" 0.192516\n",
" 4.96\n",
" 1.0\n",
" 0.192516\n",
" \n",
" \n",
"\n",
"
],
"text/plain": [
" Supplier index 5 year Average Inventory Turnover Ratio \\\n",
"Customer \n",
"Ford Motor Co AK Steel 0 5.26 \n",
"Fiat Chrysler AK Steel 1 5.26 \n",
"General Motors Co AK Steel 2 5.26 \n",
"Toyota Motors AK Steel 3 5.26 \n",
"Honda Motor Co AK Steel 4 5.26 \n",
"\n",
" Percent Revenue Value (M) #connections \\\n",
"Customer \n",
"Ford Motor Co 0.1200 $705.90 23 \n",
"Fiat Chrysler 0.1100 $647.08 23 \n",
"General Motors Co 0.0985 $144.90 23 \n",
"Toyota Motors 0.0632 $92.91 23 \n",
"Honda Motor Co 0.0366 $53.86 23 \n",
"\n",
" Weighted Turnover 2017 Inventory Turnover Ratio \\\n",
"Customer \n",
"Ford Motor Co 0.631200 4.96 \n",
"Fiat Chrysler 0.578600 4.96 \n",
"General Motors Co 0.518110 4.96 \n",
"Toyota Motors 0.332432 4.96 \n",
"Honda Motor Co 0.192516 4.96 \n",
"\n",
" Node Weight Edge Weight \n",
"Customer \n",
"Ford Motor Co 1.0 0.631200 \n",
"Fiat Chrysler 1.0 0.578600 \n",
"General Motors Co 1.0 0.518110 \n",
"Toyota Motors 1.0 0.332432 \n",
"Honda Motor Co 1.0 0.192516 "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SPLC.head()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Nucor','Node Weight']=Nucor\n",
"SPLC.loc['Faurecia','Node Weight']=Faurecia\n",
"SPLC.loc['Gestamp Automocion','Node Weight']=Gestamp\n",
"SPLC.loc['Friedman Industries','Node Weight']=Friedman\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']\n",
"#SPLC"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.10385162792000001"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"SPLC.loc['Steel Dynamics']\n",
"StlDyn=SPLC.loc['Steel Dynamics','Edge Weight'].sum()\n",
"StlDyn"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Steel Dynamics','Node Weight']=StlDyn\n",
"#SPLC.loc['Faurecia','Node Weight']=Faurecia\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.0036282427424171202"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"CSX=SPLC.loc['CSX Corp','Edge Weight'].sum()\n",
"CSX"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['CSX Corp','Node Weight']=CSX\n",
"#SPLC.loc['Faurecia','Node Weight']=Faurecia\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
"\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",
"\n",
"\n",
" \n",
" \n",
" \n",
" Supplier\n",
" index\n",
" 5 year Average Inventory Turnover Ratio\n",
" Percent Revenue\n",
" Value (M)\n",
" #connections\n",
" Weighted Turnover\n",
" 2017 Inventory Turnover Ratio\n",
" Node Weight\n",
" Edge Weight\n",
" \n",
" \n",
" Customer\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" Nucor\n",
" Cleveland Cliffs\n",
" 140\n",
" 5.84\n",
" 0.0313\n",
" $21.87\n",
" 10\n",
" 0.182792\n",
" 6.68\n",
" 1.000000\n",
" 0.182792\n",
" \n",
" \n",
" Nucor\n",
" CSX Corp\n",
" 146\n",
" 24.62\n",
" 0.0295\n",
" $79.99\n",
" 10\n",
" 0.726290\n",
" 19.35\n",
" 0.003628\n",
" 0.002635\n",
" \n",
" \n",
"\n",
"
],
"text/plain": [
" Supplier index 5 year Average Inventory Turnover Ratio \\\n",
"Customer \n",
"Nucor Cleveland Cliffs 140 5.84 \n",
"Nucor CSX Corp 146 24.62 \n",
"\n",
" Percent Revenue Value (M) #connections Weighted Turnover \\\n",
"Customer \n",
"Nucor 0.0313 $21.87 10 0.182792 \n",
"Nucor 0.0295 $79.99 10 0.726290 \n",
"\n",
" 2017 Inventory Turnover Ratio Node Weight Edge Weight \n",
"Customer \n",
"Nucor 6.68 1.000000 0.182792 \n",
"Nucor 19.35 0.003628 0.002635 "
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"Nucor=SPLC.loc['Nucor','Edge Weight'].sum()\n",
"SPLC.loc['Nucor']"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Nucor','Node Weight']=Nucor\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']\n",
"#SPLC.loc['Nucor']"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.10391753318209898"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"SPLC.loc['Steel Dynamics']\n",
"StlDyn=SPLC.loc['Steel Dynamics','Edge Weight'].sum()\n",
"StlDyn"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"#Calculates Node Size for Worthington Industries and Union Pacific\n",
"SPLC.loc['Worthington Industries']\n",
"Worth=SPLC.loc['Worthington Industries','Edge Weight'].sum()\n",
"Union=SPLC.loc['Union Pacific','Edge Weight'].sum()\n",
"Atkore=SPLC.loc['Atkore International','Edge Weight'].sum()\n"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Worthington Industries','Node Weight']=Worth\n",
"SPLC.loc['Union Pacific','Node Weight']=Union\n",
"SPLC.loc['Atkore International','Node Weight']=Atkore\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"#calculate Node Weight for Reliance Steel & Aluminum\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"Rel=SPLC.loc['Reliance Steel & Aluminum','Edge Weight'].sum()"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Reliance Steel & Aluminum','Node Weight']=Rel\n",
"#SPLC.loc['Union Pacific','Node Weight']=Union\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']\n"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.039763963481430076"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"Ten=SPLC.loc['Tenneco Inc','Edge Weight'].sum()\n",
"Ten"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"#Recalculates Edge Weights with newly calculated node weights\n",
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Supplier')\n",
"SPLC.loc['Tenneco Inc','Node Weight']=Ten\n",
"SPLC['Edge Weight']=SPLC['5 year Average Inventory Turnover Ratio']*SPLC['Node Weight']*SPLC['Percent Revenue']\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.1973681496240502"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SPLC=SPLC.reset_index()\n",
"SPLC=SPLC.set_index('Customer')\n",
"#Calculates node weight for GM with 11 in-degree edges\n",
"GM=SPLC.loc['General Motors Co','Edge Weight'].sum()\n",
"GM\n",
"#SPLC.loc['General Motors Co']"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.0110018947001709"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Ford with 10 in-degree edges\n",
"Ford=SPLC.loc['Ford Motor Co','Edge Weight'].sum()\n",
"Ford\n",
"#SPLC.loc['Ford Motor Co']"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.7808928128493202"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Fiat Chrysler with 8 in-degree edges\n",
"Fiat=SPLC.loc['Fiat Chrysler','Edge Weight'].sum()\n",
"Fiat\n",
"#SPLC.loc['Fiat Chrysler']"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.6489270164144629"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Volkswagen with 10 in-degree edges\n",
"VW=SPLC.loc['Volkswagen','Edge Weight'].sum()\n",
"VW\n",
"#SPLC.loc['Volkswagen']"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.4259901227339424"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Daimler with 7 in-degree edges\n",
"Daimler=SPLC.loc['Daimler AG','Edge Weight'].sum()\n",
"Daimler\n",
"#SPLC.loc['Daimler AG']"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.4001946770418564"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Toyota with 8 in-degree edges\n",
"Toyota=SPLC.loc['Toyota Motors','Edge Weight'].sum()\n",
"Toyota\n",
"#SPLC.loc['Toyota Motors']"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.2410820956217228"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Honda with 9 in-degree edges\n",
"Honda=SPLC.loc['Honda Motor Co','Edge Weight'].sum()\n",
"Honda\n",
"#SPLC.loc['Honda Motor Co']"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.196747907218708"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for BMW with 7 in-degree edges\n",
"BMW=SPLC.loc['Bayerische Motorenwerks','Edge Weight'].sum()\n",
"BMW\n",
"#SPLC.loc['Bayerische Motorenwerks']"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.14376938364050218"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Hyundai with 8 in-degree edges\n",
"Hyundai=SPLC.loc['Hyundai Motor Corp','Edge Weight'].sum()\n",
"Hyundai\n",
"#SPLC.loc['Hyundai Motor Corp']"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.0858189071206128"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Kia with 5 in-degree edges\n",
"Kia=SPLC.loc['Kia Motors Corp','Edge Weight'].sum()\n",
"Kia\n",
"#SPLC.loc['Kia Motors Corp']"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.006002081369729405"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Isuzu with 4 in-degree edges\n",
"Isuzu=SPLC.loc['Isuzu Motors','Edge Weight'].sum()\n",
"Isuzu\n",
"#SPLC.loc['Isuzu Motors']"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.04717847847666626"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Tata with 5 in-degree edges\n",
"Tata=SPLC.loc['Tata Motor Corp','Edge Weight'].sum()\n",
"Tata\n",
"#SPLC.loc['Tata Motor Corp']"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.18542715642139013"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Nucor\n",
"#SPLC.loc['Nucor']"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.15969683449016447"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Rel\n",
"#SPLC.loc['Reliance Steel & Aluminum']"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.10391753318209898"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"StlDyn\n",
"#SPLC.loc['Steel Dynamics']"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.09866383167551765"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Worth\n",
"#SPLC.loc['Worthington Industries']"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.078722470166"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Faurecia\n",
"#SPLC.loc['Faurecia']"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.04502792962416832"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Magna with 3 in-degree edges\n",
"Magna=SPLC.loc['Magna International Inc','Edge Weight'].sum()\n",
"Magna\n",
"#SPLC.loc['Magna International Inc']"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.039763963481430076"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Ten \n",
"#SPLC.loc['Tenneco Inc']"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.0009110928397990283"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Ford with 3 in-degree edges\n",
"Axle=SPLC.loc['American Axle','Edge Weight'].sum()\n",
"Axle\n",
"#SPLC.loc['American Axle']"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.010981"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Shiloh\n",
"#SPLC.loc['Shiloh Industries']"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.21577536941430817"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Whirlpool with 4 in-degree edges\n",
"Whirlpool=SPLC.loc['Whirlpool Corp','Edge Weight'].sum()\n",
"Whirlpool\n",
"#SPLC.loc['Whirlpool Corp']"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.03959009649001224"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for John Deere with 5 in-degree edges\n",
"Deere=SPLC.loc['Deere & Co','Edge Weight'].sum()\n",
"Deere\n",
"#SPLC.loc['Deere & Co']"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.029345166434820297"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for General Electric with 3 in-degree edges\n",
"GE=SPLC.loc['General Electric','Edge Weight'].sum()\n",
"GE\n",
"#SPLC.loc['General Electric']"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.025812127737388915"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Calculates node weight for Electrolux with 3 in-degree edges\n",
"Electrolux=SPLC.loc['Electrolux','Edge Weight'].sum()\n",
"Electrolux\n",
"#SPLC.loc['Electrolux']"
]
},
{
"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.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}