...
 
Commits (4)
This diff is collapsed.
......@@ -76,8 +76,9 @@ def main():
nb_expected_datasets = 0
# Download "old" datasets (see https://git.nomics.world/dbnomics-fetchers/management/issues/526#note_12424)
log.info("* Old datasets")
for table_code in ine_fetcher_common.OTHER_DATASETS_TO_TREAT:
for table_node in ine_fetcher_common.OTHER_DATASETS_TO_TREAT:
nb_expected_datasets += 1
table_code = table_node['code']
try:
json_answer = download_table(table_code)
except:
......
......@@ -23,7 +23,42 @@
# List of datasets codes to download and convert (some updates appends sometimes) but that are not present
# category tree (see https://git.nomics.world/dbnomics-fetchers/management/issues/526#note_12424)
OTHER_DATASETS_TO_TREAT = [3284, 3280, 3285, 3286, 3289, 3293, 3295, 3296]
OTHER_DATASETS_TO_TREAT = [
{
'code': '3284',
'name': 'National indices and by Autonomous Community: general and by economic destination of the goods',
},
{
'code': '3280',
'name': 'National indices and by section Autonomous Community',
},
{
'code': '3285',
'name': 'Export price index export of industrial products / National indices: general and by economic destination of the goods',
},
{
'code': '3286',
'name': 'Export price index export of industrial products / National section indices',
},
{
'code': '3289',
'name': 'Industrial price indices / National indices: general and by economic destination of the goods',
},
{
'code': '3293',
'name': 'Industrial price indices / National section indices',
},
{
'code': '3295',
'name': 'Import price index import of industrial products / National indices: general and by economic destination of the goods',
},
{
'code': '3296',
'name': 'Import price index import of industrial products / National section indices',
},
]
def yield_final_nodes(tree, path=[]):
""" Recursively walk given category tree and yield final nodes and their path.
......@@ -41,4 +76,3 @@ def yield_final_nodes(tree, path=[]):
else:
# final node
yield tree, path