-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgetdataold.R
More file actions
138 lines (122 loc) · 7.36 KB
/
getdataold.R
File metadata and controls
138 lines (122 loc) · 7.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#Change the working directory to the directory where the scripts are stored>
source("geographies.R", local = TRUE)
source("measures.R", local = TRUE)
#2010 Measures Intermediate data
benchmarks2010_B25003 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B25003", col.names = "pretty")
benchmarks2010_B25101 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B25101", col.names = "pretty")
benchmarks2010_B25106 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B25106", col.names = "pretty")
benchmarks2010_B25077 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B25077", col.names = "pretty")
benchmarks2010_B25111 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B25111", col.names = "pretty")
# Not available for this year benchmarks2010_B08136 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B08136")#
benchmarks2010_B17001 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B17001", col.names = "pretty")
benchmarks2010_B19013 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B19013", col.names = "pretty")
# Not available for this year benchmarks2010_B23025 = acs.fetch(endyear = years[1], geography = allstates, table.number = "B23025")#
#2011 Measures Intermediate data
benchmarks2011_B25003 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B25003", col.names = "pretty")
benchmarks2011_B25101 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B25101", col.names = "pretty")
benchmarks2011_B25106 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B25106", col.names = "pretty")
benchmarks2011_B25077 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B25077", col.names = "pretty")
benchmarks2011_B25111 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B25111", col.names = "pretty")
benchmarks2011_B08136 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B08136", col.names = "pretty")
benchmarks2011_B17001 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B17001", col.names = "pretty")
benchmarks2011_B19013 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B19013", col.names = "pretty")
benchmarks2011_B23025 = acs.fetch(endyear = years[2], geography = allstates, table.number = "B23025", col.names = "pretty")
#2012 Measures Intermediate data
benchmarks2012_B25003 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B25003", col.names = "pretty")
benchmarks2012_B25101 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B25101", col.names = "pretty")
benchmarks2012_B25106 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B25106", col.names = "pretty")
benchmarks2012_B25077 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B25077", col.names = "pretty")
benchmarks2012_B25111 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B25111", col.names = "pretty")
# Not available for this year benchmarks2012_B08136 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B08136")
benchmarks2012_B17001 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B17001", col.names = "pretty")
benchmarks2012_B19013 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B19013", col.names = "pretty")
# Not available for this year benchmarks2012_B23025 = acs.fetch(endyear = years[3], geography = allstates, table.number = "B23025")
#2013 Measures Intermediate data
benchmarks2013_B25003 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B25003", col.names = "pretty")
benchmarks2013_B25101 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B25101", col.names = "pretty")
benchmarks2013_B25106 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B25106", col.names = "pretty")
benchmarks2013_B25077 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B25077", col.names = "pretty")
benchmarks2013_B25111 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B25111", col.names = "pretty")
benchmarks2013_B08136 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B08136", col.names = "pretty")
benchmarks2013_B17001 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B17001", col.names = "pretty")
benchmarks2013_B19013 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B19013", col.names = "pretty")
benchmarks2013_B23025 = acs.fetch(endyear = years[4], geography = allstates, table.number = "B23025", col.names = "pretty")
#Create benchmarks for 2010
benchmarks2010 = list(benchmarks2010_B25003,
benchmarks2010_B25101,
benchmarks2010_B25106,
benchmarks2010_B25077,
benchmarks2010_B25111,
#benchmarks2010_B08136,
benchmarks2010_B17001,
benchmarks2010_B19013
#benchmarks2010_B23025
)
#Create benchmarks for 2011
benchmarks2011 = list(benchmarks2011_B25003,
benchmarks2011_B25101,
benchmarks2011_B25106,
benchmarks2011_B25077,
benchmarks2011_B25111,
benchmarks2011_B08136,
benchmarks2011_B17001,
benchmarks2011_B19013,
benchmarks2011_B23025)
#Create benchmarks for 2012
benchmarks2012 = list(benchmarks2012_B25003,
benchmarks2012_B25101,
benchmarks2012_B25106,
benchmarks2012_B25077,
benchmarks2012_B25111,
#benchmarks2012_B08136,
benchmarks2012_B17001,
benchmarks2012_B19013
#benchmarks2012_B23025
)
#Create benchmarks for 2013
benchmarks2013 = list(benchmarks2013_B25003,
benchmarks2013_B25101,
benchmarks2013_B25106,
benchmarks2013_B25077,
benchmarks2013_B25111,
benchmarks2013_B08136,
benchmarks2013_B17001,
benchmarks2013_B19013,
benchmarks2013_B23025)
#dump intermediate data
rm(benchmarks2010_B25003,
benchmarks2010_B25101,
benchmarks2010_B25106,
benchmarks2010_B25077,
benchmarks2010_B25111,
#benchmarks2010_B08136,
benchmarks2010_B17001,
benchmarks2010_B19013,
#benchmarks2010_B23025
benchmarks2011_B25003,
benchmarks2011_B25101,
benchmarks2011_B25106,
benchmarks2011_B25077,
benchmarks2011_B25111,
benchmarks2011_B08136,
benchmarks2011_B17001,
benchmarks2011_B19013,
benchmarks2011_B23025,
benchmarks2012_B25003,
benchmarks2012_B25101,
benchmarks2012_B25106,
benchmarks2012_B25077,
benchmarks2012_B25111,
#benchmarks2012_B08136,
benchmarks2012_B17001,
benchmarks2012_B19013,
#benchmarks2012_B23025
benchmarks2013_B25003,
benchmarks2013_B25101,
benchmarks2013_B25106,
benchmarks2013_B25077,
benchmarks2013_B25111,
benchmarks2013_B08136,
benchmarks2013_B17001,
benchmarks2013_B19013,
benchmarks2013_B23025)