課程介紹

Course Objectives

本課程針對已有R知識的初學者而設計,課程目標有三大面向:

  1. 學習進階R程式設計概念,內容含蓋:
  • 區塊式程式設計,演算流程控管,泛函編程,套件開發。
  1. 學習圖形繪製文法:
  • 由淺入深探索ggplot2的專業繪圖世界。
  1. 學習其他專業繪圖技術:
  • 如何處理地理圖資
  • 如何後製處理可延展向量圖檔(SVG)

This is an advanced course for those who are R beginners. The design of this course is three folds.

  1. Advancing R skills:
  • block programmings, development of a reproducible plan, development of packages, functional programming.
  1. Learning the Grammar of Graphics:
  • Explore ggplot2 package in detail.
  1. Learning other graphing tools:
  • To deal with the geographic information data.
  • To deal with the SVG (scalable vector graphics) ex post.

Assessment

作業:70%

期末專題:30%

作業

  • 2-3人一組(成員可隨時自由變化)

  • 每週一圖,於第3週開始

  • 依econDV模版(econDV weekly chart Rmd模版)完成。

  • 完成之作業Rmd檔連同資料檔,請上傳至Google classroom.


作業打分方式

  • 每次有交即得10分,有幾次作業會有小組互評(另外宣佈),評分如下:

  • 小組互評分數,其中7分來自各組互評,3分為老師評分:

    • 各組互評不評自己組
    • 排除最高及最低分後之平均為各組互評分數。

Before you start

Before your start, please do the following:

  1. Register a Gmail.

  2. Install Google Chrome.

  3. Install R, then RStudio.

  4. Buy and install Boxy SVG.

  5. Register a GitHub account, then install Github Desktop.

完成以上步驟請填寫以下google表單: 學生資訊帳號單

  1. 課程聊天室設定(gitter.im)
  1. 電子書筆記工具(hypothes.is)

以下為使用Hypothes.is線上註記工具步驟:

環境設定

In-class repo

課堂範習repo使用

設定課程RStudio環境

1. 安裝課程套件

  • 一學期只做一次。
.ghToken="To be announced in Google classroom"
install.packages("devtools")
install.packages("remotes")
remotes::install_github(
  "tpemartin/econDV",
  auth_token = .ghToken
)

library(econDV)
init_courseSetup()

學期中若有需要進行套件的更新或重安裝,可重複執行remotes::install_github,若有問題可以試試以下的指令:

remotes::install_github(
  "tpemartin/econDV",
  auth_token = .ghToken, force =T
)

2. 設定RStudio環境

  • 在課程repo底下尋找自己的folder (即自己的GitHub usernamen),假設你的是superman,而這週要上新單元data_cleaning,請:

2.1 New Project > New Directory 選superman folder,Project name寫data_cleaning.

2.2 在data_cleaning project下:

dv_setup()

2.3 重啟RStudio project