-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.