Skip to content

Commit

Permalink
Publish the homework.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjisato committed Apr 5, 2018
1 parent 9dc4df7 commit 4aadcb9
Show file tree
Hide file tree
Showing 9 changed files with 442 additions and 0 deletions.
36 changes: 36 additions & 0 deletions R/pwt-setup.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Data Folder setup ----
#
# This script will download pwt90.dta under ~/Data
# so that you can read the file with haven::read_dta("~/Data/pwt90.dta")
# regardless of your working directory.
#
# If you already have "Data" folder and if you don't want "pwt90.dta"
# to be there, please choose an appropriate value for dir_name object below.

dir_name <- "Data"


# Create a new folder "Data" in home ----

data_dir <- file.path(Sys.getenv("HOME"), dir_name)
dir.create(data_dir, showWarnings = FALSE)


# Download Penn World Table ----

pwt_src <- "http://www.rug.nl/ggdc/docs/pwt90.dta"
pwt_dst <- file.path(data_dir, basename(pwt_src))

if (file.exists(pwt_dst)) {
message(pwt_dst, " already exists.\n")
} else {
download.file(url = pwt_src, destfile = pwt_dst, mode = "wb")
}

message("To load the file, run\n\n",
'pwt90 <- haven::read_dta("~/Data/pwt90.dta")')

# Cleaning up

rm(data_dir, dir_name, pwt_dst, pwt_src)

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# hw02: Macroeconomics MA18Q1

Publish: 2018-04-06
Suggested Deadline: 2018-04-20

## Goal

To become familiar with R and **tidyverse** and
to play with the Penn World Table.

## Assignment

Clone, create a new branch as always. Read `problem.pdf` and follow the instructions therein. Open a Pull Request by the deadline.


## Need help?

If you have questions about this assignment, ask on Slack giving us the repository name, hw02.
18 changes: 18 additions & 0 deletions asset/bib/R.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% Created for Kenji SATO at 2017-06-11 07:33:08 +0900
%% Saved with string encoding Unicode (UTF-8)
@book{r4ds,
Annote = {Online version available at http://r4ds.had.co.nz},
Author = {Garrett Grolemund and Hadley Wickham},
Date-Added = {2017-06-10 22:31:44 +0000},
Date-Modified = {2017-06-10 22:32:45 +0000},
Publisher = {O'Reilly},
Title = {R for Data Science},
Year = {2016}}
21 changes: 21 additions & 0 deletions asset/bib/econ.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% Created for Kenji SATO at 2017-06-11 17:03:53 +0900
%% Saved with string encoding Unicode (UTF-8)
@article{pwt,
Annote = {available for download at www.ggdc.net/pwt},
Author = {Feenstra, Robert C. and Robert Inklaar and Marcel P. Timmer},
Date-Added = {2017-06-10 23:26:20 +0000},
Date-Modified = {2017-06-10 23:27:29 +0000},
Journal = {American Economic Review},
Number = {10},
Pages = {3150--3182},
Title = {The Next Generation of the Penn World Table},
Volume = {105},
Year = {2015}}
13 changes: 13 additions & 0 deletions asset/latex/custom.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\usepackage{graphicx}
\usepackage{mathpazo}
\usepackage{booktabs}

\usepackage{xcolor}
\hypersetup{
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}

\usepackage[margin=20mm, a4paper]{geometry}
13 changes: 13 additions & 0 deletions hw02.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: knitr
LaTeX: pdfLaTeX
Loading

0 comments on commit 4aadcb9

Please sign in to comment.