Skip to content

Commit

Permalink
Add gslab_make submodule for #9
Browse files Browse the repository at this point in the history
  • Loading branch information
Zong Huang authored and Zong Huang committed Dec 6, 2018
1 parent 9347b53 commit 47e6840
Show file tree
Hide file tree
Showing 34 changed files with 301,241 additions and 57 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/gslab_make"]
path = lib/gslab_make
url = ssh://git@github.com/gentzkow/gslab_make.git
5 changes: 4 additions & 1 deletion analysis/code/descriptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
import matplotlib.pyplot as plt

def main():
data = np.genfromtxt('input/data.txt', skip_header = 1)
data = np.genfromtxt('input/data_table.txt', skip_header = 1)

with open('output/tables.txt', 'w') as f:
f.write('<tab:table>\n')
f.write('%s\n%.3f\n%d\n%d' % (np.mean(data), np.std(data, ddof = 1), np.max(data), np.min(data)))

data = np.genfromtxt('input/data_graph.txt', skip_header = 1)

plt.hist(data)
plt.savefig('output/plot.eps')

# EXECUTE
main()
1 change: 0 additions & 1 deletion analysis/input/data.txt

This file was deleted.

1 change: 1 addition & 0 deletions analysis/input/data_graph.txt
1 change: 1 addition & 0 deletions analysis/input/data_table.txt
5 changes: 3 additions & 2 deletions analysis/inputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
# Lines beginning with # are ignored
# Some text editors automatically replace tabs with spaces--watch out for this

# Symlink Target
data.txt ../data/output/data.txt
# Symlink Target
data_table.txt ../data/output/data_table.txt
data_graph.txt ../data/output/data_graph.txt
15 changes: 14 additions & 1 deletion analysis/log/link_heads.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
File headers
--------------------------------------------------------------------------------
/Users/zong/template/data/output/data.txt
/Users/zong/template/data/output/data_table.txt
--------------------------------------------------------------------------------
x
1
2
3
4
5
6
7
8
9
--------------------------------------------------------------------------------
/Users/zong/template/data/output/data_graph.txt
--------------------------------------------------------------------------------
x
1
Expand Down
3 changes: 2 additions & 1 deletion analysis/log/link_map.log
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
target symlink
/Users/zong/template/data/output/data.txt /Users/zong/template/analysis/input/data.txt
/Users/zong/template/data/output/data_table.txt /Users/zong/template/analysis/input/data_table.txt
/Users/zong/template/data/output/data_graph.txt /Users/zong/template/analysis/input/data_graph.txt
3 changes: 2 additions & 1 deletion analysis/log/link_stats.log
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
file name last modified file size
/Users/zong/template/data/output/data.txt 2018-11-29 19:34:18 1988897
/Users/zong/template/data/output/data_table.txt 2018-12-05 19:54:39 1988897
/Users/zong/template/data/output/data_graph.txt 2018-12-05 19:54:40 1988897
4 changes: 2 additions & 2 deletions analysis/log/make.log
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
--------------------------------------------------------------------------------
Makelog started: 2018-12-04 11:03:46
Makelog started: 2018-12-05 11:54:46
Working directory: /Users/zong/template/analysis
--------------------------------------------------------------------------------
Links successfully created!
Link logs successfully written!
Executing: "python /Users/zong/template/analysis/code/descriptive.py "
Output logs successfully written!
--------------------------------------------------------------------------------
Makelog ended: 2018-12-04 11:03:48
Makelog ended: 2018-12-05 11:54:50
Working directory: /Users/zong/template/analysis
--------------------------------------------------------------------------------
2 changes: 1 addition & 1 deletion analysis/log/output_heads.log
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ File headers
%!PS-Adobe-3.0 EPSF-3.0
%%Title: output/plot.eps
%%Creator: matplotlib version 2.2.3, http://matplotlib.org/
%%CreationDate: Tue Dec 4 11:03:48 2018
%%CreationDate: Wed Dec 5 11:54:50 2018
%%Orientation: portrait
%%BoundingBox: 75 223 536 568
%%EndComments
Expand Down
4 changes: 2 additions & 2 deletions analysis/log/output_stats.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file name last modified file size
/Users/zong/template/analysis/output/plot.eps 2018-12-04 19:03:48 12340
/Users/zong/template/analysis/output/tables.txt 2018-12-04 19:03:48 39
/Users/zong/template/analysis/output/plot.eps 2018-12-05 19:54:50 12340
/Users/zong/template/analysis/output/tables.txt 2018-12-05 19:54:48 39
2 changes: 1 addition & 1 deletion analysis/output/plot.eps

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 47e6840

Please sign in to comment.