Skip to content
Snippets Groups Projects
Commit 62c00844 authored by Enzo Buthiot's avatar Enzo Buthiot
Browse files

Add correct HELP_ON_TIMESERIES_URL

parent cb944149
No related branches found
No related tags found
1 merge request!4Fix download
......@@ -36,7 +36,7 @@ import requests
import buba_common as bc
HELP_ON_TIMESERIES_URL = "https://www.bundesbank.de/en/statistics/time-series-databases/help-on-the-time-series-databases" # noqa
HELP_ON_TIMESERIES_URL = "https://www.bundesbank.de/en/statistics/time-series-databases/help-on-the-time-series-databases/download-options" # noqa
DATASETS_URL = "https://www.bundesbank.de/cae/servlet/StatisticDownload?its_fileFormat=Archive&mode=its" # noqa
TOPICS_URL = "https://www.bundesbank.de/cae/servlet/StatisticDownload?its_fileFormat=Archive&mode=its&tree=" # noqa
STRUCTURE_URL = "https://www.bundesbank.de/cae/servlet/StatisticDownload?metaDSI="
......@@ -162,24 +162,14 @@ def main():
parser.error("Target dir %r not found", target_dir)
# Download main zip to get all the datasets
# download_main_zip(DATASETS_URL, target_dir)
download_main_zip(DATASETS_URL, target_dir)
# Downloads HTML page that contains topics reference table
# topics_html_filepath = target_dir / bc.TOPICS_HTML_PAGE_NAME
# download_html(HELP_ON_TIMESERIES_URL, topics_html_filepath)
topics_html_filepath = target_dir / bc.TOPICS_HTML_PAGE_NAME
download_html(HELP_ON_TIMESERIES_URL, topics_html_filepath)
# Extract topics_dict
# topics_dict = bc.extract_topics_dict_from_html_help_page(topics_html_filepath)
topics_dict = {'BANKEN': 'Banks and other financial corporations',
'KONJUNKTUR': 'Economic activity and price',
'UNTERNEHMEN': 'Enterprises and households',
'WECHSELKURSE': 'Exchange rates',
'AUSSENWIRTSCHAFT': 'External sector',
'FINANZSTAB': 'Financial stability',
'GESAMT': 'Macroeconomic accounting systems',
'GELD': 'Money and capital markets',
'FINANZEN': 'Public finances',
'INDIKATOR': 'Sets of indicators'}
topics_dict = bc.extract_topics_dict_from_html_help_page(topics_html_filepath)
# Downloads by topics to be able to sort datasets by topic
# Note: some datasets appear in more than one topic
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment