Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Kasidis Satangmongkol toyeiei

🎯
Focusing
View GitHub Profile
@toyeiei
toyeiei / volcano_example.csv
Created Jan 23, 2021
volcano dataset for ggplot raster
View volcano_example.csv
Var1 Var2 value
1 1 100
2 1 101
3 1 102
4 1 103
5 1 104
6 1 105
7 1 105
8 1 106
9 1 107
View worldphone_long.csv
Year Region Sales
1951 N.Amer 45939
1951 Europe 21574
1951 Asia 2876
1951 S.Amer 1815
1951 Oceania 1646
1951 Africa 89
1951 Mid.Amer 555
1956 N.Amer 60423
1956 Europe 29990
View worldphone.csv
Year N.Amer Europe Asia S.Amer Oceania Africa Mid.Amer
1951 45939 21574 2876 1815 1646 89 555
1956 60423 29990 4708 2568 2366 1411 733
1957 64721 32510 5230 2695 2526 1546 773
1958 68484 35218 6662 2845 2691 1663 836
1959 71799 37598 6856 3000 2868 1769 911
1960 76036 40341 8220 3145 3054 1905 1008
1961 79831 43173 9053 3338 3224 2005 1076
View employees_for_R.json
{
"ID":["1","2","3","4","5","6","7","8" ],
"Name":["Rick","Dan","Michelle","Ryan","Gary","Nina","Simon","Guru" ],
"Salary":["623.3","515.2","611","729","843.25","578","632.8","722.5" ],
"StartDate":[ "1/1/2012","9/23/2013","11/15/2014","5/11/2014","3/27/2015","5/21/2013","7/30/2013","6/17/2014"],
"Dept":[ "IT","Operations","IT","HR","Finance","IT","Operations","Finance"]
}
View school_website.html
<html>
<head>
<title>Welcome to our school website</title>
</head>
<body>
<h2>Our Innovative Teachers</h1>
<ul>
<li>Liam Nielson</li>
<li>Jack Dorsey</li>
<li>Reed Hastings</li>
@toyeiei
toyeiei / test_email.xml
Last active Jan 15, 2021
example email in XML format
View test_email.xml
<email>
<first>
<from>toy@datarockie</from>
<to>students@data-science-bootcamp.com</to>
<subject>Welcome to our course</subject>
<content>I hope you enjoy the class</content>
<date>16 January 2021</date>
</first>
<second>
<from>toy@datarockie</from>
View stock_exercise.py
## I've tried below codes and all failed the test
## none of these worked ..
stock = stock.drop_duplicates('item')
stock = stock.drop_duplicates('item').reset_index()
stock = stock.drop_duplicates('item').reset_index(drop=True)
stock = stock.drop_duplicates(['item'])
stock = stock.drop_duplicates(['item']).reset_index()
stock = stock.drop_duplicates(['item']).reset_index(drop=True)
stock = stock['item'].drop_duplicates()
stock = stock['item'].drop_duplicates().reset_index()
@toyeiei
toyeiei / techjam_data_prep.R
Last active Nov 22, 2019
TECHJAM 2019 data preparation
View techjam_data_prep.R
## -------------------------------------
## Import Libraries --------------------
## -------------------------------------
library(dplyr)
library(readr)
library(lubridate)
library(tidyr)
library(DescTools)
## load dataset
@toyeiei
toyeiei / kfold_regression.R
Created Nov 15, 2019
train linear regression in R using kfold method
View kfold_regression.R
## R version 3.6.1
## Created by DataRockie 15 November 2019
## load library
library(caret)
library(mlbench)
library(dplyr)
## load dataset
data("BostonHousing")
View intro-web-html.html
<html>
<head>
<title>This is my first webpage</title>
</head>
<body>
<h1>Hello World</h1>
<p>Let's learn web development in two months.</p>
</body>
</html>