View matplotloib_sample.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View py_kinji.py
import pandas as pd
from matplotlib import pyplot as plt
import seaborn as sns
import numpy as np
from scipy import optimize as opt
kion = pd.read_csv("kion_20160501.csv")
kion.head()
Px = np.arange(0, len(kion), 1)
View kion_kinji.r
library(ggplot2)
kion = read.csv("kion_20160501.csv", header = T, colClasses = c("POSIXct", "numeric"))
head(kion)
summary(kion)
g = ggplot(kion, aes(1:nrow(kion), temp)) + geom_line(colour="blue") + labs(title="2016/05/01")
plot(g)
x = 1:nrow(kion)
View ggpairs_color.r
library(ggplot2)
library(GGally)
ggpairs(iris, aes_string(colour="Species", alpha=0.5))
View ggpairs_bw.r
library(GGally)
ggpairs(iris, colour="Species", alpha=0.5)
View my_number_checkdigit.py
def validate(mynum):
if type(mynum) == str:
if not mynum.isnumeric():
return "not numeric1"
elif not type(mynum) == int:
return "not numeric2"
mynum = str(mynum)
digits = list(mynum)
View user_paste.r
"+" = function(e1, e2){
if(is.character(c(e1, e2))){
paste(e1, e2, sep="")
}else{
base::"+"(e1, e2)
}
}
View ARIMA_temp.r
library(forecast)
# データ読み込み
d = read.csv("temp.csv")
# unixtimeをPOSIXctに変換
tsPOSIX = as.POSIXct(d[,1], origin="1970-01-01")
d = cbind(tsPOSIX, d)
colnames(d)[1] = "ts"
head(d)
View airq_multiple_line.r
library(ggplot2)
library(reshape2)
airq.df = data.frame(airquality)
airq.df = cbind(1:nrow(airq.df), airq.df)
colnames(airq.df)[1] = "id"
airq.melt = melt(airq.df, id = "id", measure = c("Ozone", "Solar.R", "Wind", "Temp"))
airq_g = ggplot(airq.melt, aes(x=id, y=value, group=variable, colour=variable))
View hello_ggplot.r
library(ggplot2)
g = ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, colour=Species))
g + geom_point() + geom_smooth(method=glm)