This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Puntos iniciales #### | |
library(ggplot2) | |
library(car) | |
data("Salaries") | |
p <- ggplot(data = Salaries, aes(x=yrs.service, y=salary,fill = sex)) | |
p + geom_point(aes(shape=sex, color=sex) , size = 3) | |
p | |
p + geom_point(aes(shape=sex, color=sex) , size = 3) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Ejempo 1 : Salarios #### | |
rm(list=ls()) | |
# Cargamos los paquetes y data | |
library(ggplot2) | |
library(car) | |
data(Salaries) | |
str(Salaries) | |
help("Salaries") | |
# Creacion del grafico : Agregamos la data y configuramos las variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from datetime import datetime, timedelta | |
import matplotlib.pyplot as plt | |
from matplotlib.dates import DateFormatter | |
import matplotlib.dates as mdates | |
import numpy as np | |
%matplotlib auto | |
data = pd.read_csv("https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-andamento-nazionale/dpc-covid19-ita-andamento-nazionale.csv") | |
print (data.columns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# Abraham Zamudio [GMMNS] | |
# 2020/04/27 | |
# Lima-Peru | |
# ============================================================================= | |
def bisection(f,a,b,N): | |
'''Aproximacion de la solucion para f(x)=0 en el intervalo [a,b] | |
por el metodo de Biseccion | |
https://en.wikipedia.org/wiki/Bisection_method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# Abraham Zamudio [GMMNS] | |
# 2020/04/27 | |
# Lima-Peru | |
# ============================================================================= | |
def secant(f,a,b,N): | |
'''Aproximacion de la solucion para f(x)=0 en el intervalo [a,b] | |
por el metodo de la secante | |
https://en.wikipedia.org/wiki/Secant_method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# Abraham Zamudio [GMMNS] | |
# 2020/04/27 | |
# Lima-Peru | |
# ============================================================================= | |
def newton(f,Df,x0,epsilon,max_iter): | |
'''Aproximacion de la solucion para f(x)=0 en el intervalo [a,b] | |
por el metodo de Newton | |
Parametros de entrada |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Codigos para guardar lista a partir de archivos csv | |
""" | |
# Limpiamos la memoria ram con el magic command : reset | |
%reset | |
import pandas as pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# Abraham Zamudio [GMMNS] | |
# 2020/05/20 | |
# Lima-Peru | |
# ============================================================================= | |
#%% | |
# ============================================================================= | |
# Numpy : Algunos ejemplos [PIT2020II] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# Abraham Zamudio [GMMNS] | |
# 2020/05/22 | |
# Lima-Peru | |
# ============================================================================= | |
# https://www.datosabiertos.gob.pe/dataset/fallecidos-por-covid-19-ministerio-de-salud-minsa | |
muertos <- read.csv("FALLECIDOS_CDC.csv") | |
# Transformamos las variables FECHA a datos de tipo Date : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# Abraham Zamudio [GMMNS] | |
# 2020/06/12 | |
# Lima-Peru | |
# ============================================================================= | |
# | |
# La data proviene de : | |
# https://www.osinergmin.gob.pe/seccion/institucional/regulacion-tarifaria/publicaciones/regulacion-tarifaria | |
# Explorar : |
OlderNewer