Skip to content

Commit 8210147

Browse files
committed
Update testScript.ipynb
1 parent d76fe14 commit 8210147

File tree

1 file changed

+13
-155
lines changed

1 file changed

+13
-155
lines changed

testScript.ipynb

Lines changed: 13 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 48,
5+
"execution_count": 54,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -20,57 +20,37 @@
2020
},
2121
{
2222
"cell_type": "code",
23-
"execution_count": 5,
23+
"execution_count": 55,
2424
"metadata": {},
2525
"outputs": [],
2626
"source": [
27-
"expt_num = 1 "
27+
"expt_num = 2 "
2828
]
2929
},
3030
{
3131
"cell_type": "code",
32-
"execution_count": 7,
32+
"execution_count": 56,
3333
"metadata": {},
3434
"outputs": [
3535
{
3636
"data": {
3737
"text/plain": [
38-
"b'42f1422\\n'"
38+
"b'5fe66aa\\n'"
3939
]
4040
},
41-
"execution_count": 7,
41+
"execution_count": 56,
4242
"metadata": {},
4343
"output_type": "execute_result"
4444
}
4545
],
4646
"source": [
4747
"# grab version of code \n",
48-
" subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])"
49-
]
50-
},
51-
{
52-
"cell_type": "code",
53-
"execution_count": 51,
54-
"metadata": {},
55-
"outputs": [
56-
{
57-
"data": {
58-
"text/plain": [
59-
"b'https://github.com/DataKind-DC/rcp2.git\\n'"
60-
]
61-
},
62-
"execution_count": 51,
63-
"metadata": {},
64-
"output_type": "execute_result"
65-
}
66-
],
67-
"source": [
68-
" subprocess.check_output(['git', 'config', '--get', 'remote.origin.url'])"
48+
"subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])"
6949
]
7050
},
7151
{
7252
"cell_type": "code",
73-
"execution_count": 10,
53+
"execution_count": 59,
7454
"metadata": {},
7555
"outputs": [],
7656
"source": [
@@ -81,14 +61,14 @@
8161
},
8262
{
8363
"cell_type": "code",
84-
"execution_count": 21,
64+
"execution_count": 66,
8565
"metadata": {},
8666
"outputs": [],
8767
"source": [
8868
"expt_log = pd.DataFrame( {'Experiment Number': expt_num ,\n",
8969
" 'Date': datetime.now(),\n",
90-
" 'Log_folder' : expt_path,,\n",
91-
" 'Code_Repo' : subprocess.check_output(['git', 'config', '--get', 'remote.origin.url']) \n",
70+
" 'Log_folder' : expt_path,\n",
71+
" 'Code_Repo' : subprocess.check_output(['git', 'config', '--get', 'remote.origin.url']), \n",
9272
" 'Code_Version': subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip(),\n",
9373
" 'ACS_Version': '2016',\n",
9474
" 'Level': 'block_group',\n",
@@ -129,129 +109,7 @@
129109
},
130110
{
131111
"cell_type": "code",
132-
"execution_count": 39,
133-
"metadata": {},
134-
"outputs": [
135-
{
136-
"data": {
137-
"text/html": [
138-
"<div>\n",
139-
"<style scoped>\n",
140-
" .dataframe tbody tr th:only-of-type {\n",
141-
" vertical-align: middle;\n",
142-
" }\n",
143-
"\n",
144-
" .dataframe tbody tr th {\n",
145-
" vertical-align: top;\n",
146-
" }\n",
147-
"\n",
148-
" .dataframe thead th {\n",
149-
" text-align: right;\n",
150-
" }\n",
151-
"</style>\n",
152-
"<table border=\"1\" class=\"dataframe\">\n",
153-
" <thead>\n",
154-
" <tr style=\"text-align: right;\">\n",
155-
" <th></th>\n",
156-
" <th>Experiment Number</th>\n",
157-
" <th>Date</th>\n",
158-
" <th>Log_folder</th>\n",
159-
" <th>Code_Version</th>\n",
160-
" <th>ACS_Version</th>\n",
161-
" <th>Level</th>\n",
162-
" <th>NFIRS_Years_used_start</th>\n",
163-
" <th>NFIRS_Years_used_end</th>\n",
164-
" <th>NFIRS_Year_predicted</th>\n",
165-
" <th>Severity_dollar_estimate</th>\n",
166-
" <th>ACS_cols_used</th>\n",
167-
" </tr>\n",
168-
" </thead>\n",
169-
" <tbody>\n",
170-
" <tr>\n",
171-
" <th>0</th>\n",
172-
" <td>1</td>\n",
173-
" <td>2022-08-01</td>\n",
174-
" <td>/Users/kelson/Documents/GitHub/rcp2/Data/Logs/...</td>\n",
175-
" <td>b'42f1422'</td>\n",
176-
" <td>2016</td>\n",
177-
" <td>block_group</td>\n",
178-
" <td>2012</td>\n",
179-
" <td>2017</td>\n",
180-
" <td>2018</td>\n",
181-
" <td>10000</td>\n",
182-
" <td>['did_not_work_past_12_mo', 'house_pct_live_al...</td>\n",
183-
" </tr>\n",
184-
" <tr>\n",
185-
" <th>1</th>\n",
186-
" <td>1</td>\n",
187-
" <td>2022-08-01</td>\n",
188-
" <td>/Users/kelson/Documents/GitHub/rcp2/Data/Logs/...</td>\n",
189-
" <td>b'42f1422'</td>\n",
190-
" <td>2016</td>\n",
191-
" <td>block_group</td>\n",
192-
" <td>2012</td>\n",
193-
" <td>2017</td>\n",
194-
" <td>2018</td>\n",
195-
" <td>10000</td>\n",
196-
" <td>['did_not_work_past_12_mo', 'house_pct_live_al...</td>\n",
197-
" </tr>\n",
198-
" <tr>\n",
199-
" <th>2</th>\n",
200-
" <td>1</td>\n",
201-
" <td>2022-08-01</td>\n",
202-
" <td>/Users/kelson/Documents/GitHub/rcp2/Data/Logs/...</td>\n",
203-
" <td>b'42f1422'</td>\n",
204-
" <td>2016</td>\n",
205-
" <td>block_group</td>\n",
206-
" <td>2012</td>\n",
207-
" <td>2017</td>\n",
208-
" <td>2018</td>\n",
209-
" <td>10000</td>\n",
210-
" <td>['did_not_work_past_12_mo', 'house_pct_live_al...</td>\n",
211-
" </tr>\n",
212-
" </tbody>\n",
213-
"</table>\n",
214-
"</div>"
215-
],
216-
"text/plain": [
217-
" Experiment Number Date \\\n",
218-
"0 1 2022-08-01 \n",
219-
"1 1 2022-08-01 \n",
220-
"2 1 2022-08-01 \n",
221-
"\n",
222-
" Log_folder Code_Version \\\n",
223-
"0 /Users/kelson/Documents/GitHub/rcp2/Data/Logs/... b'42f1422' \n",
224-
"1 /Users/kelson/Documents/GitHub/rcp2/Data/Logs/... b'42f1422' \n",
225-
"2 /Users/kelson/Documents/GitHub/rcp2/Data/Logs/... b'42f1422' \n",
226-
"\n",
227-
" ACS_Version Level NFIRS_Years_used_start NFIRS_Years_used_end \\\n",
228-
"0 2016 block_group 2012 2017 \n",
229-
"1 2016 block_group 2012 2017 \n",
230-
"2 2016 block_group 2012 2017 \n",
231-
"\n",
232-
" NFIRS_Year_predicted Severity_dollar_estimate \\\n",
233-
"0 2018 10000 \n",
234-
"1 2018 10000 \n",
235-
"2 2018 10000 \n",
236-
"\n",
237-
" ACS_cols_used \n",
238-
"0 ['did_not_work_past_12_mo', 'house_pct_live_al... \n",
239-
"1 ['did_not_work_past_12_mo', 'house_pct_live_al... \n",
240-
"2 ['did_not_work_past_12_mo', 'house_pct_live_al... "
241-
]
242-
},
243-
"execution_count": 39,
244-
"metadata": {},
245-
"output_type": "execute_result"
246-
}
247-
],
248-
"source": [
249-
"pd.read_csv(expt_path.parent / 'MasterLog.csv')"
250-
]
251-
},
252-
{
253-
"cell_type": "code",
254-
"execution_count": 33,
112+
"execution_count": 64,
255113
"metadata": {},
256114
"outputs": [],
257115
"source": [
@@ -260,7 +118,7 @@
260118
},
261119
{
262120
"cell_type": "code",
263-
"execution_count": 38,
121+
"execution_count": 68,
264122
"metadata": {},
265123
"outputs": [],
266124
"source": [

0 commit comments

Comments
 (0)