Skip to content

Commit efcd1c3

Browse files
committed
Renamed zurcher_data and adapted all functions.
1 parent f1d9d80 commit efcd1c3

File tree

8 files changed

+36
-29
lines changed

8 files changed

+36
-29
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "promotion/replication/zurcher-data"]
2+
path = promotion/replication/zurcher-data
3+
url = https://github.com/OpenSourceEconomics/zurcher-data.git

promotion/replication/__init__.py

Whitespace-only changes.

promotion/replication/init_replication.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

promotion/replication/replication.ipynb

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
"import yaml\n",
1111
"import os\n",
1212
"import pandas as pd\n",
13-
"from zurcher_data.data.data_reading import data_reading\n",
14-
"from zurcher_data.data.data_processing import data_processing\n",
1513
"\n",
1614
"from ruspy.estimation.estimation import estimate\n",
1715
"\n"
@@ -23,16 +21,40 @@
2321
"metadata": {},
2422
"outputs": [],
2523
"source": [
26-
"with open(\"init_replication.yml\") as y:\n",
27-
" init_dict = yaml.safe_load(y)\n",
28-
"\n",
24+
"import sys # TODO: Extract data functions, such that they can be imported as functions.\n",
25+
"sys.path.append('zurcher-data/data/')\n",
26+
"from data_processing import data_processing\n",
27+
"from data_reading import data_reading"
28+
]
29+
},
30+
{
31+
"cell_type": "code",
32+
"execution_count": 4,
33+
"metadata": {},
34+
"outputs": [],
35+
"source": [
36+
"init_dict = {\n",
37+
" 'groups': 'group_4',\n",
38+
" 'binsize': 5000,\n",
39+
" 'beta': 0.9999,\n",
40+
" 'states': 90,\n",
41+
" 'maint_func': 'linear',\n",
42+
"}"
43+
]
44+
},
45+
{
46+
"cell_type": "code",
47+
"execution_count": 6,
48+
"metadata": {},
49+
"outputs": [],
50+
"source": [
2951
"data_reading()\n",
30-
"data = data_processing(init_dict[\"replication\"])"
52+
"data = data_processing(init_dict)"
3153
]
3254
},
3355
{
3456
"cell_type": "code",
35-
"execution_count": 3,
57+
"execution_count": 7,
3658
"metadata": {},
3759
"outputs": [
3860
{
@@ -58,16 +80,9 @@
5880
}
5981
],
6082
"source": [
61-
"result_transitions, result_fixp = estimate(init_dict[\"replication\"], data, repl_4=True)\n",
83+
"result_transitions, result_fixp = estimate(init_dict, data, repl_4=True)\n",
6284
"print(result_transitions, result_fixp)"
6385
]
64-
},
65-
{
66-
"cell_type": "code",
67-
"execution_count": null,
68-
"metadata": {},
69-
"outputs": [],
70-
"source": []
7186
}
7287
],
7388
"metadata": {
@@ -86,7 +101,7 @@
86101
"name": "python",
87102
"nbconvert_exporter": "python",
88103
"pygments_lexer": "ipython3",
89-
"version": "3.7.0"
104+
"version": "3.7.4"
90105
}
91106
},
92107
"nbformat": 4,

promotion/replication/zurcher-data

Submodule zurcher-data added at 3df30de

promotion/replication/zurcher_data

Lines changed: 0 additions & 1 deletion
This file was deleted.

promotion/simulation/__init__.py

Whitespace-only changes.

promotion/simulation/simulation_convergence.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
"name": "python",
140140
"nbconvert_exporter": "python",
141141
"pygments_lexer": "ipython3",
142-
"version": "3.7.0"
142+
"version": "3.7.4"
143143
}
144144
},
145145
"nbformat": 4,

0 commit comments

Comments
 (0)