1
Fork 0
mirror of https://github.com/Steffo99/sdmx-sandbox.git synced 2025-01-03 04:34:19 +00:00

Try ISTAT source

This commit is contained in:
Steffo 2021-04-06 19:56:21 +02:00
parent 854ee798a1
commit 79a00bf4fa
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -49,8 +49,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"execution_count": 2,
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/mnt/tera/ext4/code/sdmx-sandbox/venv/lib/python3.9/site-packages/pandasdmx/remote.py:11: RuntimeWarning: optional dependency requests_cache is not installed; cache options to Session() have no effect\n",
" warn(\n"
]
}
],
"source": [
"import pandas\n",
"import pandasdmx\n",
@ -593,11 +602,39 @@
}
}
},
{
"cell_type": "markdown",
"source": [
"## Proviamo con l'`ISTAT`"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"execution_count": 5,
"outputs": [
{
"data": {
"text/plain": "(101_1015 Crops\n 101_1030 PDO, PGI and TSG quality products\n 101_1033 slaughtering\n 101_1039 Agritourism - municipalities\n 101_1077 PDO, PGI and TSG products: operators - munici...\n ... \n 97_953 Environmental protection expenditure\n 98_1066 Productivity measures - Accounts in the 2014 v...\n 98_1067 Productivity measures - Accounts in the 2011 v...\n 98_197 Productivity measures\n 9_951 Mining and quarrying\n Length: 458, dtype: object,\n DCSP_COLTIVAZIONI \n DCSP_DOPIGP \n DCSP_MACELLAZIONI \n DCSP_AGRITURISMO_COM \n DCSP_DOPIGP_COM \n ..\n DCCN_SPESAPROTAMB \n DCCN_PRODUTTIVITA_B14 \n DCCN_PRODUTTIVITA_B11 \n DCCN_PRODUTTIVITA \n DCCV_CAVE_MIN \n Length: 447, dtype: object)"
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"istat: pandasdmx.Request = pandasdmx.Request(\"ISTAT\")\n",
"istat_flows_msg: pandasdmx.message.Message = istat.dataflow()\n",
"_dict: dict[str, pandas.Series] = istat_flows_msg.to_pandas()\n",
"istat_flows: pandas.Series = _dict[\"dataflow\"]\n",
"istat_structs: pandas.Series = _dict[\"structure\"]\n",
"istat_flows, istat_structs"
],
"metadata": {
"collapsed": false,
"pycharm": {