Index

GitHub Index
made By @YoonHwa-P


Python

DBS


올려야 하는 Posting List

  • 의사결정트리, Regression
  • seaborn
  • matplotlib

수정 해야 할것도 넘넘 많다.
일단 이번 주 주말에는 Kaggle 먼저 (Team project 닌까.)

  • * : 수정중
1
2
3
<hr style="dashed 10px pink;">
<hr align="center" style="border: solid 10px #304A84; width: 50%;">
<span style="font-size:150%; color: Red;"> * </span>

※ 참고 할 Github

ㅁ https://github.com/dschloe/R_edu

ㅁ https://github.com/JunghoGIT

ㅁ https://github.com/kimgoden/JAVA01

ㅁ https://github.com/WDWDWWDff/Red

ㅁ https://github.com/OliverKang

ㅁ https://github.com/hanbeen1992

ㅁ https://github.com/kjw1390

1.4 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/cpp11_0.4.2.zip'
Content type ‘application/zip’ length 327396 bytes (319 KB)
downloaded 319 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/brio_1.1.3.zip'
Content type ‘application/zip’ length 48880 bytes (47 KB)
downloaded 47 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/evaluate_0.14.zip'
Content type ‘application/zip’ length 76790 bytes (74 KB)
downloaded 74 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/praise_1.0.0.zip'
Content type ‘application/zip’ length 19849 bytes (19 KB)
downloaded 19 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/ps_1.6.0.zip'
Content type ‘application/zip’ length 775912 bytes (757 KB)
downloaded 757 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/waldo_0.3.1.zip'
Content type ‘application/zip’ length 96434 bytes (94 KB)
downloaded 94 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/bit64_4.0.5.zip'
Content type ‘application/zip’ length 565517 bytes (552 KB)
downloaded 552 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/blob_1.2.2.zip'
Content type ‘application/zip’ length 48321 bytes (47 KB)
downloaded 47 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/DBI_1.1.1.zip'
Content type ‘application/zip’ length 686681 bytes (670 KB)
downloaded 670 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/memoise_2.0.1.zip'
Content type ‘application/zip’ length 50131 bytes (48 KB)
downloaded 48 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/Rcpp_1.0.7.zip'
Content type ‘application/zip’ length 3263462 bytes (3.1 MB)
downloaded 3.1 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/plogr_0.2.0.zip'
Content type ‘application/zip’ length 18943 bytes (18 KB)
downloaded 18 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/callr_3.7.0.zip'
Content type ‘application/zip’ length 437774 bytes (427 KB)
downloaded 427 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/pkgbuild_1.3.0.zip'
Content type ‘application/zip’ length 146266 bytes (142 KB)
downloaded 142 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/pkgload_1.2.4.zip'
Content type ‘application/zip’ length 156265 bytes (152 KB)
downloaded 152 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/rcmdcheck_1.4.0.zip'
Content type ‘application/zip’ length 170257 bytes (166 KB)
downloaded 166 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/roxygen2_7.1.2.zip'
Content type ‘application/zip’ length 1352846 bytes (1.3 MB)
downloaded 1.3 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/rversions_2.1.1.zip'
Content type ‘application/zip’ length 67399 bytes (65 KB)
downloaded 65 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/sessioninfo_1.2.2.zip'
Content type ‘application/zip’ length 186234 bytes (181 KB)
downloaded 181 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/testthat_3.1.1.zip'
Content type ‘application/zip’ length 2545637 bytes (2.4 MB)
downloaded 2.4 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/stringr_1.4.0.zip'
Content type ‘application/zip’ length 216715 bytes (211 KB)
downloaded 211 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/hash_2.2.6.1.zip'
Content type ‘application/zip’ length 178061 bytes (173 KB)
downloaded 173 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/tau_0.0-24.zip'
Content type ‘application/zip’ length 186662 bytes (182 KB)
downloaded 182 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/Sejong_0.01.zip'
Content type ‘application/zip’ length 1617954 bytes (1.5 MB)
downloaded 1.5 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/RSQLite_2.2.9.zip'
Content type ‘application/zip’ length 2511267 bytes (2.4 MB)
downloaded 2.4 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/devtools_2.4.3.zip'
Content type ‘application/zip’ length 423398 bytes (413 KB)
downloaded 413 KB

package ‘fastmap’ successfully unpacked and MD5 sums checked
package ‘highr’ successfully unpacked and MD5 sums checked
package ‘xfun’ successfully unpacked and MD5 sums checked
package ‘diffobj’ successfully unpacked and MD5 sums checked
package ‘rematch2’ successfully unpacked and MD5 sums checked
package ‘bit’ successfully unpacked and MD5 sums checked
package ‘cachem’ successfully unpacked and MD5 sums checked
package ‘processx’ successfully unpacked and MD5 sums checked
package ‘prettyunits’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘xopen’ successfully unpacked and MD5 sums checked
package ‘brew’ successfully unpacked and MD5 sums checked
package ‘commonmark’ successfully unpacked and MD5 sums checked
package ‘knitr’ successfully unpacked and MD5 sums checked
package ‘cpp11’ successfully unpacked and MD5 sums checked
package ‘brio’ successfully unpacked and MD5 sums checked
package ‘evaluate’ successfully unpacked and MD5 sums checked
package ‘praise’ successfully unpacked and MD5 sums checked
package ‘ps’ successfully unpacked and MD5 sums checked
package ‘waldo’ successfully unpacked and MD5 sums checked
package ‘bit64’ successfully unpacked and MD5 sums checked
package ‘blob’ successfully unpacked and MD5 sums checked
package ‘DBI’ successfully unpacked and MD5 sums checked
package ‘memoise’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘plogr’ successfully unpacked and MD5 sums checked
package ‘callr’ successfully unpacked and MD5 sums checked
package ‘pkgbuild’ successfully unpacked and MD5 sums checked
package ‘pkgload’ successfully unpacked and MD5 sums checked
package ‘rcmdcheck’ successfully unpacked and MD5 sums checked
package ‘roxygen2’ successfully unpacked and MD5 sums checked
package ‘rversions’ successfully unpacked and MD5 sums checked
package ‘sessioninfo’ successfully unpacked and MD5 sums checked
package ‘testthat’ successfully unpacked and MD5 sums checked
package ‘stringr’ successfully unpacked and MD5 sums checked
package ‘hash’ successfully unpacked and MD5 sums checked
package ‘tau’ successfully unpacked and MD5 sums checked
package ‘Sejong’ successfully unpacked and MD5 sums checked
package ‘RSQLite’ successfully unpacked and MD5 sums checked
package ‘devtools’ successfully unpacked and MD5 sums checked





명사 분리기(KoNLP) 설치를 위한 remotes packages 설치 (in R)

1
2
3
4
5
# install.packages("remotes")
remotes::install_github("haven-jeon/KoNLP",
upgrade = "never",
force = TRUE,
INSTALL_opts = c("--no-multiarch"))


# install.packages(“remotes”)
remotes::install_github(“haven-jeon/KoNLP”,

‘C:/Users/brill/Documents/R/win-library/4.1’의 위치에 패키지(들)을 설치합니다.
(왜냐하면 ‘lib’가 지정되지 않았기 때문입니다)

[1] TRUE
[1] 5744974
Successfully installed Scala runtime library in C:/Users/brill/Documents/R/win-library/4.1/00LOCK-KoNLP/00new/KoNLP/java/scala-library-2.11.8.jar
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path




명사 분리기 KoNLP 설치

1
2
library(KoNLP)
useNIADic()


library(KoNLP)
useNIADic()
Backup was just finished!
Downloading package from url: https://github.com/haven-jeon/NIADic/releases/download/0.0.1/NIADic_0.0.1.tar.gz
Installing 16 packages: colorspace, viridisLite, RColorBrewer, munsell, labeling, farver, base64enc, htmltools, scales, isoband, gtable, jquerylib, tinytex, ggplot2, data.table, rmarkdown
‘C:/Users/brill/Documents/R/win-library/4.1’의 위치에 패키지(들)을 설치합니다.
(왜냐하면 ‘lib’가 지정되지 않았기 때문입니다)
trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/colorspace_2.0-2.zip'
Content type ‘application/zip’ length 2645307 bytes (2.5 MB)
downloaded 2.5 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/viridisLite_0.4.0.zip'
Content type ‘application/zip’ length 1299504 bytes (1.2 MB)
downloaded 1.2 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/RColorBrewer_1.1-2.zip'
Content type ‘application/zip’ length 55707 bytes (54 KB)
downloaded 54 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/munsell_0.5.0.zip'
Content type ‘application/zip’ length 245486 bytes (239 KB)
downloaded 239 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/labeling_0.4.2.zip'
Content type ‘application/zip’ length 62679 bytes (61 KB)
downloaded 61 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/farver_2.1.0.zip'
Content type ‘application/zip’ length 1752621 bytes (1.7 MB)
downloaded 1.7 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/base64enc_0.1-3.zip'
Content type ‘application/zip’ length 43156 bytes (42 KB)
downloaded 42 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/htmltools_0.5.2.zip'
Content type ‘application/zip’ length 347310 bytes (339 KB)
downloaded 339 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/scales_1.1.1.zip'
Content type ‘application/zip’ length 558895 bytes (545 KB)
downloaded 545 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/isoband_0.2.5.zip'
Content type ‘application/zip’ length 2726764 bytes (2.6 MB)
downloaded 2.6 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/gtable_0.3.0.zip'
Content type ‘application/zip’ length 434327 bytes (424 KB)
downloaded 424 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/jquerylib_0.1.4.zip'
Content type ‘application/zip’ length 525848 bytes (513 KB)
downloaded 513 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/tinytex_0.35.zip'
Content type ‘application/zip’ length 126495 bytes (123 KB)
downloaded 123 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/ggplot2_3.3.5.zip'
Content type ‘application/zip’ length 4130301 bytes (3.9 MB)
downloaded 3.9 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/data.table_1.14.2.zip'
Content type ‘application/zip’ length 2600846 bytes (2.5 MB)
downloaded 2.5 MB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/4.1/rmarkdown_2.11.zip'
Content type ‘application/zip’ length 3660449 bytes (3.5 MB)
downloaded 3.5 MB

package ‘colorspace’ successfully unpacked and MD5 sums checked
package ‘viridisLite’ successfully unpacked and MD5 sums checked
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘munsell’ successfully unpacked and MD5 sums checked
package ‘labeling’ successfully unpacked and MD5 sums checked
package ‘farver’ successfully unpacked and MD5 sums checked
package ‘base64enc’ successfully unpacked and MD5 sums checked
package ‘htmltools’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
package ‘isoband’ successfully unpacked and MD5 sums checked
package ‘gtable’ successfully unpacked and MD5 sums checked
package ‘jquerylib’ successfully unpacked and MD5 sums checked
package ‘tinytex’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked
package ‘data.table’ successfully unpacked and MD5 sums checked
package ‘rmarkdown’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\brill\AppData\Local\Temp\RtmpmuDZXg\downloaded_packages
√ checking for file ‘C:\Users\brill\AppData\Local\Temp\RtmpmuDZXg\remotes2cd0437ea43\NIADic/DESCRIPTION’ …

‘C:/Users/brill/Documents/R/win-library/4.1’의 위치에 패키지(들)을 설치합니다.
(왜냐하면 ‘lib’가 지정되지 않았기 때문입니다)




명사 분리기 설치 후 확인

New

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

text = "뿌리산업’의 기반이 되는 공정기술의 범위가 관련법 제정 10년 만에 확대 개편된다. 뿌리기업 우대 지원과 청년층 등 신규인력 유입 지원을 강화하기 위한 법적 토대도 마련된다.
산업통상자원부는 이 같은 내용을 담은 ‘뿌리산업 진흥과 첨단화에 관한 법률(뿌리산업법) 시행령’ 개정안이 14일 국무회의에서 의결돼 오는 16일부터 시행된다고 밝혔다.
먼저 뿌리산업법 기반 공정기술(뿌리기술)의 범위가 기존 6개(주조, 금형, 소성가공, 용접, 표면처리, 열처리)에서 14개로 늘어난다.
구체적으로 소재 다원화 공정기술에 사출·프레스, 정밀가공, 적층제조, 산업용 필름 및 지류 등 4개 기술이 포함된다. 산업부는 이를 통해 세라믹, 플라스틱, 탄성소재, 탄소, 펄프 등 다양한 소재 기반 제조 공정을 확산할 계획이다. 또 지능화 공정기술로 로봇, 센서, 산업 지능형 소프트웨어, 엔지니어링 설계 등 4개 기술이 추가된다.
뿌리기술 범위가 확대되면서 뿌리산업의 범위도 기존 6대 산업, 76개 업종에서 14대 산업, 111개 업종으로 늘어난다.

이번 개정을 통해 뿌리기업 확인 절차, 확인서 유효기간(3년), 사후관리 등에 관한 규정도 신설됐다. 뿌리기업은 뿌리기술을 활용해 사업을 영위하는 업종 또는 뿌리기술에 활용되는 장비 제조 분야를 말한다.
뿌리기업 확인 제도는 외국인 근로자 고용 우대 혜택 등이 주어지는 뿌리산업 관련 우대 지원 대상을 명확히 정하기 위한 것으로 국가뿌리산업진흥센터에서 확인서를 발급해오고 있다. 2012년부터 1만1766건이 발급됐으며 현재 5843건이 유효한 것으로 집계됐다.

‘일하기 좋은 뿌리기업’ 선정을 위한 기준과 절차, 지원 내용 등에 관한 규정도 새로 만들어졌다. ‘일하기 좋은 뿌리기업’은 뿌리산업에 청년층 등 신규 인력 유입을 촉진하기 위해 근로·복지 환경, 성장 역량 등이 우수한 기업을 산업부가 선정해 홍보 등을 지원하는 제도다.
산업부는 이번 개정 사항이 원활히 시행될 수 있도록 업종별 협·단체, 뿌리기업, 지자체 등을 대상으로 적극 홍보할 방침이다. 아울러 매년 발간하는 뿌리산업 백서를 통해 새롭게 추가되는 8대 차세대 공정기술에 대한 내용, 기술 동향 등을 상세하게 제공하기로 했다.
산업부 관계자는 “이번 개정은 2011년 뿌리산업법 제정 후 10년 만에 뿌리기술을 소재다원화와 지능화 중심으로 확장한 것으로, 뿌리산업의 기술 융복합화와 첨단화를 촉진하고 신규 인력 유입 지원을 강화하기 위한 법적 토대를 마련하였다는 데에 의의가 있다”고 말했다."

extractNoun(text)



extractNoun(text)
[1] “뿌리산업’” “기반” “공정기술”
[4] “범위” “관련” “법”
[7] “제정” “10” “년”
[10] “만” “확대” “개편”
[13] “뿌리” “기업” “우대”
[16] “지원” “청년층” “등”
[19] “신규인력” “유입” “지원”
[22] “강화” “하기” “토대”
[25] “마련” “산업” “통상”
[28] “자원” “부” “내용”
[31] “담” “‘뿌리산업” “진흥”
[34] “첨단화” “법률(뿌리산업법)” “시행령’”
[37] “개정안” “14” “국무회의”
[40] “의결” “16” “일”
[43] “시행” “뿌리” “산업”
[46] “법” “기반” “공정기술(뿌리기술)”
[49] “범위” “기존” “6개(주조”
[52] “금형” “소성” “가공”
[55] “용접” “표면처리” “열처리”
[58] “14” “개” “구체”
[61] “적” “소재” “다원화”
[64] “공정기술” “사출·프레스” “정밀가공”
[67] “적층” “제조” “산업용”
[70] “필름” “지류” “등”
[73] “4” “개” “기술”
[76] “포함” “산업” “부”
[79] “이” “세라믹” “플라스틱”
[82] “탄성소” “재” “탄소”
[85] “펄프” “등” “다양”
[88] “한” “소재” “기반”
[91] “제조” “공정” “확산”
[94] “할” “계획” “지능화”
[97] “공정기술” “로봇” “센서”
[100] “산업” “지능형” “소프트웨어”
[103] “엔지니어링” “설계” “등”
[106] “4” “개” “기술”
[109] “추가” “뿌리” “기술”
[112] “범위” “확대” “되”
[115] “뿌리” “산업” “범위”
[118] “기존” “6” “대”
[121] “산업” “76” “개”
[124] “업종” “14” “대”
[127] “산업” “111” “개”
[130] “업종” “이번” “개정”
[133] “뿌리” “기업” “확인”
[136] “절차” “확인” “유효”
[139] “기” “3” “년”
[142] “사후관리” “등” “규정도”
[145] “신설” “뿌리” “기업”
[148] “뿌리” “기술” “활용”
[151] “해” “사업” “영위”
[154] “하” “업종” “뿌리”
[157] “기술” “활용” “되”
[160] “장비” “제조” “분야”
[163] “말” “뿌리” “기업”
[166] “확인” “제” “외국”
[169] “근로자” “고용” “우대”
[172] “혜택” “등” “뿌리”
[175] “산업” “관련” “우대”
[178] “지원” “대상” “것”
[181] “국가” “뿌리” “산업진흥”
[184] “센터” “확인서” “발급”
[187] “해오” “2012” “년”
[190] “1” “만” “1766”
[193] “건” “발급” “5843”
[196] “건” “유효” “한”
[199] “것” “집계” “‘일하기”
[202] “뿌리기업’” “선정” “기준”
[205] “절차” “지원” “내용”
[208] “등” “규정도” “‘일하기”
[211] “뿌리기업’은” “뿌리” “산업”
[214] “청년층” “등” “신규”
[217] “인력” “유입” “촉진”
[220] “하기” “근로·복지” “환경”
[223] “성장” “역량” “등”
[226] “우수” “한” “기업”
[229] “산업” “부” “선정”
[232] “해” “홍보” “등”
[235] “지원” “하” “제도”
[238] “산업” “부” “이번”
[241] “개정” “사항” “시행”
[244] “수” “업종” “별”
[247] “협·단체” “뿌리” “기업”
[250] “지자체” “등” “대상”
[253] “적극” “홍보” “할”
[256] “방침” “발간” “하”
[259] “뿌리” “산업” “백서”
[262] “추가” “되” “8”
[265] “대” “차세대” “공정기술”
[268] “내용” “기술” “동향”
[271] “등” “상세” “하게”
[274] “제공” “하기” “산업”
[277] “부” “관계자” ““이번”
[280] “개정” “2011” “년”
[283] “뿌리” “산업” “법”
[286] “제정” “후” “10”
[289] “년” “만” “뿌리”
[292] “기술” “소재” “다원화”
[295] “지능화” “중심” “확장”
[298] “한” “것” “뿌리”
[301] “산업” “기술” “융복합”
[304] “화” “첨단화” “촉진”
[307] “신규” “인력” “유입”
[310] “지원” “강화” “하기”
[313] “토대” “마련” “데”
[316] “의의” “있다”고” “말”

- 명사 분리기 설치 끝

R for DS_03 ggplot2

Welcome


  • 저작권 : “R for DataScience by Hadley Wickham and Garrett Grolemund(O’Reilly). Copyright 2017 Garrett Grolemund, Hadley Wickham, 978-1-491-91039-9





Introduction


  • how to visualise your data using ggplot2. R
  • ggplot2는 그래프를 그려주는 프로그램
    ggplot2 이론배경

3.1.1 Prerequisites


1
2
3
4
5
6
7
8
9
10
11
12
13
install.packages("tidyverse")

library(tidyverse)
#> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
#> ✔ ggplot2 3.3.2 ✔ purrr 0.3.4
#> ✔ tibble 3.0.3 ✔ dplyr 1.0.2
#> ✔ tidyr 1.1.2 ✔ stringr 1.4.0
#> ✔ readr 1.4.0 ✔ forcats 0.5.0
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()

install.packages(c("nycflights13", "gapminder", "Lahman"))

3.2 First steps


3.2.1 The mpg data frame

  • US Environmental Protection Agency on 38 models of car
  • A data frame is a rectangular
1
mpg

mpg

  • displ = car’s engine size, in litres
  • hwy = fuel efficiency in miles per gallon (mpg)

3.2.2 Creating a ggplot

1
2
ggplot(data = mpg) +
geom_point(mapping = aes(x= displ, y = hwy))
  • ggplot(data = mpg) : 비어있는 Graph를 만들어 준다.
  • geom_point() : Layers 추가
  • scatterplot

scatterplot_mpg

  • mapping = aes(x= displ, y = hwy) : x와 y를 mapping 해 준다.

3.2.3 A graphing template

ggplot(data = <DATA>) + 
  <GEOM_FUNCTION>(mapping = aes(<MAPPINGS>))

이런 식으로 쓰면 된다고 함. (모형)

3.3 Aesthetic mappings


aesthetic : 래전드 모양, 색 크기

  • value : data
  • level : aesthetic properties
  • size : 크기
  • color = colour, aesthetic의 색
  • alpha = shape , aesthetic의 모양
1
2
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy, color = class))

mpg_color

1
2
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy, size = class))

mpg_Size

colour , color : 모두 써도 됨.

1
2
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y= hwy, alpha = class))

mpg_alpha

1
2
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy, shape = class))

mpg_shape


(수동으로 색 설정)

래전드를 생성 하지 않으면서 color만 바꿀 수 있다.

1
2
ggplot(data = mpg) + 
geom_point(mapping = aes(x = displ, y = hwy), color = "blue")

mpg3.1_Bulet25



1
2
ggplot(data = mpg) + 
geom_point(mapping = aes(x = displ, y = hwy, color = "blue"))

mpg 내의 data가 color이라는 column이 있다.

그 data가 “blue”인 data들의 displ과 hwy의 Graph

mpg_Color_Blue


아직 덜 했다 !

rmarkdown_Book

R publishing

Rggplot
RPubs

R for DS_01 welcome & Introduction

Welcome


R_Welcome

  • 저작권 : “R for DataScience by Hadley Wickham and Garrett Grolemund(O’Reilly). Copyright 2017 Garrett Grolemund, Hadley Wickham, 978-1-491-91039-9





Introduction


Data science is an exciting discipline that allows you to turn raw data into understanding, insight, and knowledge. The goal of “R for Data Science” is to help you learn the most important tools in R that will allow you to do data science. After reading this book, you’ll have the tools to tackle a wide variety of data science challenges, using the best parts of R.

R을 이용한 data science를 해 봅시다.

1.1 What you will learn


R4ds_Learn

1.2 How this book is organised

1.3 What you won’t learn

1.4 Prerequisites

1.4.1 R

  • 설치 해야 할 programs : 확인
    Rprograms_install

1.4.3 The tidyverse

1
install.packages("tidyverse")
1
2
3
4
5
6
7
8
9
library(tidyverse)
#> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
#> ✔ ggplot2 3.3.2 ✔ purrr 0.3.4
#> ✔ tibble 3.0.3 ✔ dplyr 1.0.2
#> ✔ tidyr 1.1.2 ✔ stringr 1.4.0
#> ✔ readr 1.4.0 ✔ forcats 0.5.0
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()
  • tidyverse : ggplot2, tibble, tidyr, readr, purrr, and dplyr packages

    1.4.4 Other packages

    1
    install.packages(c("nycflights13", "gapminder", "Lahman"))

1.5 Running R code

1.6 Getting help and learning more

1.7 Acknowledgements

1.8 Colophon

My_rpubs


ref.

introduction

Part 3 more