Profile picture

Co-founder @ RMOTR

Chile vs Argentina - Analysis

Last updated: September 1st, 20192019-09-01Project preview
In [1]:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

%matplotlib inline
In [7]:
pd.set_option('display.float_format', lambda x: '%.3f' % x)
In [2]:
df = pd.read_csv('wages_by_categories.csv')

We'll keep the last recorded year: 2015

In [3]:
df = df.loc[df['year'] == 2015]
In [11]:
df['income'].describe()
Out[11]:
count      42454.000
mean      482345.563
std       623893.895
min         1086.538
25%       210056.828
50%       321303.875
75%       534538.424
max     40010824.463
Name: income, dtype: float64

Last registered year is 2017, to adjust it to 2018 we have to increase income by 1.16 (forecasted based on ENCUESTA SUPLEMENTARIA DE INGRESOS 2017):

In [9]:
INCOME_GROWTH_2015_2018 = 1.16
In [10]:
df['Income Adjusted'] = df['income'] * INCOME_GROWTH_2015_2018
In [12]:
df['Income Adjusted'].describe()
Out[12]:
count      42454.000
mean      559520.853
std       723716.918
min         1260.384
25%       243665.921
50%       372712.495
75%       620064.572
max     46412556.377
Name: Income Adjusted, dtype: float64

1st Decile in Chilean Pesos

In [13]:
df['Income Adjusted'].quantile(.1)
Out[13]:
115999.99999999997

A quick Google search shows the exchange CLP-USD as \$620 CLP per USD:

In [14]:
CLP_PER_USD = 620

1st Decile in USD

In [15]:
df['Income Adjusted'].quantile(.1) / CLP_PER_USD
Out[15]:
187.09677419354833

The lowest decile of the chilean population make $187.

Median Salary

In [16]:
df['Income Adjusted'].median()
Out[16]:
372712.4954726559

Median in USD:

In [17]:
df['Income Adjusted'].median() / CLP_PER_USD
Out[17]:
601.1491862462192

All deciles

In [21]:
deciles = [df['Income Adjusted'].quantile(x / 10) / CLP_PER_USD for x in range(1, 11)]
In [23]:
pd.Series(deciles, index=range(1, 11)).to_frame()
Out[23]:
0
1 187.097
2 359.323
3 450.903
4 526.006
5 601.149
6 748.387
7 905.856
8 1135.045
9 1777.419
10 74858.962
In [ ]:
 
Notebooks AI
Notebooks AI Profile20060