library(rio)
library(ggplot2)
library(ggcorrplot)
library(reticulate)
##
## Attaching package: 'reticulate'
## The following object is masked from 'package:rio':
##
## import
use_python("C:/Users/Charles/anaconda3")
rm(list = ls())
obraslink= "https://github.com/Pepix2345/Proyecto-Magallanes/raw/main/Trabajo%20de%20investigaci%C3%B3n/data/obras_long.pkl"
pd<-import("pandas")
obrastats<- pd$read_pickle(obraslink)
str(obrastats)
## 'data.frame': 41 obs. of 4 variables:
## $ ano : num 2002 2008 2010 2010 2011 ...
## $ modalidad: chr "Contrata" "Contrata" "Administracion directa" "Contrata" ...
## $ variable : chr "casesum" "casesum" "casesum" "casesum" ...
## $ value : num 1 4 2 6 7 9 15 15 25 21 ...
## - attr(*, "pandas.index")=RangeIndex(start=0, stop=41, step=1)
graf1= ggplot(data=obrastats,
aes(x=ano,y=value,color=modalidad)) + theme_light() +
scale_y_log10(labels=scales::comma)
graf1 +
geom_smooth() +
facet_grid(variable~.,scales = 'free_y')
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small. fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : at 2017
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : radius 0.000225
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : all data on boundary of neighborhood. make span bigger
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 2017
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 0.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : at 2020
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : radius 0.000225
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : all data on boundary of neighborhood. make span bigger
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 0.000225
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : zero-width neighborhood. make span bigger
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : zero-width neighborhood. make span bigger
## Warning: Failed to fit group 4.
## Caused by error in `predLoess()`:
## ! NA/NaN/Inf en llamada a una función externa (arg 5)
