Skip to content

Instantly share code, notes, and snippets.

@andyrufasto
Last active September 18, 2022 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyrufasto/2b92e91715b3ba693b24062f178e250f to your computer and use it in GitHub Desktop.
Save andyrufasto/2b92e91715b3ba693b24062f178e250f to your computer and use it in GitHub Desktop.
Expectativas de Inversion - Data
fecha empleo consumo_privado
03/31/99 -4.4 2.8
06/30/99 -5.8 -0.5
09/30/99 -7.1 -2.0
12/31/99 -6.0 -5.8
03/31/00 -4.3 -0.5
06/30/00 -2.5 0.7
09/30/00 -1.4 1.7
12/31/00 -2.2 8.5
03/31/01 -2.5 1.2
06/30/01 -2.0 2.1
09/30/01 -1.9 1.4
12/31/01 -1.1 -0.6
03/31/02 -2.0 5.1
06/30/02 -0.3 4.4
09/30/02 0.3 4.9
12/31/02 1.7 5.0
03/31/03 2.2 1.0
06/30/03 1.6 3.0
09/30/03 1.4 3.0
12/31/03 1.7 3.0
03/31/04 1.9 4.7
06/30/04 2.7 3.1
09/30/04 2.7 3.1
12/31/04 3.5 2.7
03/31/05 3.9 3.4
06/30/05 3.8 3.2
09/30/05 5.2 3.8
12/31/05 5.2 4.2
03/31/06 6.1 5.8
06/30/06 6.4 6.3
09/30/06 7.4 6.3
12/31/06 8.9 6.5
03/31/07 8.8 7.5
06/30/07 8.0 9.0
09/30/07 8.1 8.4
12/31/07 8.3 9.6
03/31/08 8.8 8.7
06/30/08 9.4 12.1
09/30/08 8.3 9.9
12/31/08 6.9 5.0
03/31/09 3.4 3.5
06/30/09 1.5 1.1
09/30/09 0.2 3.1
12/31/09 0.1 4.7
03/31/10 2.1 6.8
06/30/10 4.0 9.4
09/30/10 5.0 10.6
12/31/10 5.3 9.4
03/31/11 5.6 9.4
06/30/11 5.4 8.8
09/30/11 5.5 5.4
12/31/11 5.0 5.5
03/31/12 3.6 7.7
06/30/12 3.9 6.9
09/30/12 4.2 6.9
12/31/12 4.0 8.4
03/31/13 3.8 5.6
06/30/13 3.3 5.7
09/30/13 2.3 5.5
12/31/13 2.1 6.1
03/31/14 1.9 5.0
06/30/14 2.1 4.2
09/30/14 1.8 3.5
12/31/14 1.6 2.9
03/31/15 1.1 3.6
06/30/15 0.8 3.9
09/30/15 0.8 4.2
12/31/15 0.8 4.2
03/31/16 0.7 3.5
06/30/16 -0.1 2.9
09/30/16 0.5 3.7
12/31/16 0.4 3.0
03/31/17 0.8 2.2
06/30/17 0.2 2.5
09/30/17 -0.6 2.7
12/31/17 -1.0 2.6
03/31/18 -0.3 3.2
06/30/18 -0.1 4.5
09/30/18 0.0 3.3
12/31/18 0.7 3.8
03/31/19 0.3 3.2
06/30/19 0.3 2.5
09/30/19 0.2 2.7
fecha expectativas inversion
03/31/03 9 8.9
06/30/03 -6 6.1
09/30/03 2 8.8
12/31/03 11 1.7
03/31/04 9 10.1
06/30/04 13 8.8
09/30/04 22 3.6
12/31/04 27 10.2
03/31/05 31 4.2
06/30/05 34 9.4
09/30/05 39 13.6
12/31/05 28 20.3
03/31/06 6 27.8
06/30/06 35 19
09/30/06 63 15.4
12/31/06 58 18.9
03/31/07 64 13.4
06/30/07 62 23.3
09/30/07 56 30.6
12/31/07 63 25.7
03/31/08 48 22.7
06/30/08 59 32.2
09/30/08 44 27.5
12/31/08 -22 14.6
03/31/09 -26 -0.4
06/30/09 0 -16
09/30/09 27.5 -12.8
12/31/09 50.3 -5.1
03/31/10 57.3 15.4
06/30/10 54 30.3
09/30/10 56.1 29.2
12/31/10 45 28
03/31/11 51.8 14.5
06/30/11 -11.3 12.2
09/30/11 13.1 8.8
12/31/11 20.3 9.1
03/31/12 35 15.8
06/30/12 31 17.3
09/30/12 16.7 14.9
12/31/12 21.9 14.7
03/31/13 33 12.2
06/30/13 3.5 10.6
09/30/13 1.2 4.9
12/31/13 20 1.6
03/31/14 23.1 -1
06/30/14 7.5 -2.1
09/30/14 12.3 -4.4
12/31/14 9.1 -1.3
03/31/15 4 -3.8
06/30/15 3 -7.7
09/30/15 -6 -3.6
12/31/15 -5 -1.7
03/31/16 7 -4.3
06/30/16 18 -5.1
09/30/16 27 -7.7
12/31/16 16 -4.5
03/31/17 13 -5.3
06/30/17 6 -2.6
09/30/17 20 5.5
12/31/17 19 3.1
03/31/18 17.5 5.3
06/30/18 17 8.5
09/30/18 27 1.4
12/31/18 24.5 2.1
03/31/19 27 2.9
06/30/19 -6 5.1
09/30/19 -17 4.4
fecha Inversión privada Empleo
03/31/99 -23.6 -4.4
06/30/99 -10.9 -5.8
09/30/99 -1.4 -7.1
12/31/99 9.0 -6.0
03/31/00 -4.7 -4.3
06/30/00 -7.0 -2.5
09/30/00 -3.4 -1.4
12/31/00 -10.8 -2.2
03/31/01 -0.4 -2.5
06/30/01 1.7 -2.0
09/30/01 -8.3 -1.9
12/31/01 -2.4 -1.1
03/31/02 -0.6 -2.0
06/30/02 -2.7 -0.3
09/30/02 6.6 0.3
12/31/02 8.9 1.7
03/31/03 6.1 2.2
06/30/03 8.8 1.6
09/30/03 1.7 1.4
12/31/03 10.1 1.7
03/31/04 8.8 1.9
06/30/04 3.6 2.7
09/30/04 10.2 2.7
12/31/04 4.2 3.5
03/31/05 9.4 3.9
06/30/05 13.6 3.8
09/30/05 20.3 5.2
12/31/05 27.8 5.2
03/31/06 19.0 6.1
06/30/06 15.4 6.4
09/30/06 18.9 7.4
12/31/06 13.4 8.9
03/31/07 23.3 8.8
06/30/07 30.6 8.0
09/30/07 25.7 8.1
12/31/07 22.7 8.3
03/31/08 32.2 8.8
06/30/08 27.5 9.4
09/30/08 14.6 8.3
12/31/08 -0.4 6.9
03/31/09 -16.0 3.4
06/30/09 -12.8 1.5
09/30/09 -5.1 0.2
12/31/09 15.4 0.1
03/31/10 30.3 2.1
06/30/10 29.2 4.0
09/30/10 28.0 5.0
12/31/10 14.5 5.3
03/31/11 12.2 5.6
06/30/11 8.8 5.4
09/30/11 9.1 5.5
12/31/11 15.8 5.0
03/31/12 17.3 3.6
06/30/12 14.9 3.9
09/30/12 14.7 4.2
12/31/12 12.2 4.0
03/31/13 10.6 3.8
06/30/13 4.9 3.3
09/30/13 1.6 2.3
12/31/13 -1.0 2.1
03/31/14 -2.1 1.9
06/30/14 -4.4 2.1
09/30/14 -1.3 1.8
12/31/14 -3.8 1.6
03/31/15 -7.7 1.1
06/30/15 -3.6 0.8
09/30/15 -1.7 0.8
12/31/15 -4.3 0.8
03/31/16 -5.1 0.7
06/30/16 -7.7 -0.1
09/30/16 -4.5 0.5
12/31/16 -5.3 0.4
03/31/17 -2.6 0.8
06/30/17 5.5 0.2
09/30/17 3.1 -0.6
12/31/17 5.3 -1.0
03/31/18 8.5 -0.3
06/30/18 1.4 -0.1
09/30/18 2.1 0.0
12/31/18 2.9 0.7
03/31/19 5.1 0.3
06/30/19 4.4 0.3
09/30/19 0.2
Period X16 X50 traspaso_de_1 Traspaso_de_10
1 15.13672 0.42031 0.0277675744811293 0.28
2 27.18795 1.133365 0.0416862985256336 0.42
3 33.41174 2.020939 0.0604858950775985 0.60
4 36.20485 2.899651 0.0800901260466484 0.80
5 37.01791 3.589909 0.0969776251549588 0.97
6 36.71185 4.004556 0.109080746407495 1.09
7 36.0453 4.176413 0.115865674581707 1.16
8 35.55252 4.196213 0.118028567313934 1.18
9 35.47163 4.153256 0.117086697171796 1.17
10 35.78938 4.1096 0.114827359401029 1.15
@andyrufasto
Copy link
Author

Code:

inversion_empleo <- read.csv('https://gist.githubusercontent.com/andyrufasto/2b92e91715b3ba693b24062f178e250f/raw/1c062b15ac983aa4813fe0374761827eefd62e3f/inversion-empleo.csv')

inversion_empleo$fecha <-as.Date(inversion_empleo$fecha, format = "%m/%d/%y")

library(dygraphs)
library(xts) 

don=xts(x=inversion_empleo[,-1], order.by=inversion_empleo$fecha)

# Chart
p <- dygraph(don, main ="Inversión y empleo (var interanuales)
2003 - 2019",) %>%
dySeries("Inversión.privada", color = "#B53838", label = "Inversion Privada (t-1)")%>%
dySeries("Empleo", color = "#0C0f16", label = "Empleo (der.)")
p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment