Skip to content

Commit

Permalink
Switched from pandaSDMX to sdmx1 libary for retrieving data from the …
Browse files Browse the repository at this point in the history
…OECD and ECB
  • Loading branch information
ilchen committed Sep 7, 2024
1 parent 311cb53 commit 876166a
Show file tree
Hide file tree
Showing 3 changed files with 189 additions and 216 deletions.
78 changes: 38 additions & 40 deletions Money_Supply_Eurozone.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"# Uncomment if running in Google Colaboratory\n",
"\n",
"# Install the latest version of pandaSDMX\n",
"# !pip install pandaSDMX -U\n",
"# !pip install sdmx1 -U\n",
"# !pip install eurostat -U"
]
},
Expand All @@ -51,9 +51,7 @@
"from pandas.tseries.offsets import BDay\n",
"\n",
"import eurostat\n",
"import warnings\n",
"warnings.filterwarnings('ignore', message='optional dependency requests_cache*', category=RuntimeWarning)\n",
"import pandasdmx as sdmx\n",
"import sdmx\n",
"\n",
"from datetime import date\n",
"\n",
Expand Down Expand Up @@ -103,7 +101,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "serious-lightning",
"metadata": {},
"outputs": [],
Expand All @@ -113,14 +111,14 @@
"# M.U2.N.V.M20.X.1.U2.2300.Z01.E <-- M2\n",
"# M.U2.N.V.M30.X.1.U2.2300.Z01.E <-- M3\n",
"# Retrieving them all in one go \n",
"ecb = sdmx.Request('ECB') \n",
"ecb = sdmx.Client('ECB') \n",
"data_msg = ecb.data('BSI', key='M.U2.N.V..X.1.U2.2300.Z01.E', params={'startPeriod': report_start, \n",
" 'endPeriod': report_end})"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "neural-camcorder",
"metadata": {},
"outputs": [],
Expand All @@ -131,7 +129,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"id": "compressed-damages",
"metadata": {},
"outputs": [],
Expand All @@ -143,7 +141,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"id": "thrown-traveler",
"metadata": {},
"outputs": [],
Expand All @@ -158,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"id": "impossible-marijuana",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -324,7 +322,7 @@
"[190 rows x 5 columns]"
]
},
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -335,7 +333,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"id": "central-playlist",
"metadata": {},
"outputs": [],
Expand All @@ -356,7 +354,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"id": "undefined-safety",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -522,7 +520,7 @@
"[190 rows x 5 columns]"
]
},
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -541,7 +539,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"id": "controlled-bonus",
"metadata": {},
"outputs": [],
Expand All @@ -562,7 +560,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"id": "cross-wholesale",
"metadata": {},
"outputs": [
Expand All @@ -586,7 +584,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"id": "spare-basis",
"metadata": {},
"outputs": [
Expand All @@ -612,7 +610,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"id": "convertible-static",
"metadata": {},
"outputs": [
Expand All @@ -627,7 +625,7 @@
"dtype: float64"
]
},
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -646,7 +644,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 17,
"id": "banner-exhibition",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -676,7 +674,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 18,
"id": "robust-camel",
"metadata": {},
"outputs": [
Expand All @@ -690,7 +688,7 @@
"dtype: float64"
]
},
"execution_count": 17,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -717,7 +715,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 19,
"id": "assigned-genre",
"metadata": {},
"outputs": [
Expand All @@ -743,7 +741,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 20,
"id": "preliminary-buffer",
"metadata": {},
"outputs": [
Expand All @@ -769,7 +767,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 21,
"id": "parental-glucose",
"metadata": {},
"outputs": [
Expand All @@ -784,7 +782,7 @@
"dtype: float64"
]
},
"execution_count": 20,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -803,7 +801,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 22,
"id": "accurate-cheat",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -840,7 +838,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 23,
"id": "wicked-mexican",
"metadata": {},
"outputs": [],
Expand All @@ -850,7 +848,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 24,
"id": "continuous-minute",
"metadata": {},
"outputs": [],
Expand All @@ -861,7 +859,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 25,
"id": "boolean-reception",
"metadata": {},
"outputs": [
Expand All @@ -888,7 +886,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 26,
"id": "abroad-weapon",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1061,7 +1059,7 @@
"2024-07-01 23.623% "
]
},
"execution_count": 25,
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1081,7 +1079,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 27,
"id": "center-library",
"metadata": {},
"outputs": [],
Expand All @@ -1093,7 +1091,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 28,
"id": "hundred-deviation",
"metadata": {},
"outputs": [
Expand All @@ -1118,7 +1116,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 29,
"id": "ecological-administrator",
"metadata": {},
"outputs": [],
Expand All @@ -1129,7 +1127,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 30,
"id": "grave-maldives",
"metadata": {},
"outputs": [],
Expand All @@ -1141,7 +1139,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 31,
"id": "swedish-threat",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1174,7 +1172,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 32,
"id": "fabulous-johns",
"metadata": {},
"outputs": [],
Expand All @@ -1186,7 +1184,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 33,
"id": "e54486ab-fd96-486c-815a-a9ecf3066805",
"metadata": {},
"outputs": [],
Expand All @@ -1198,7 +1196,7 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 34,
"id": "682744f8-df75-4041-9802-b18901aad0b0",
"metadata": {},
"outputs": [
Expand Down
Loading

0 comments on commit 876166a

Please sign in to comment.