Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
buba-fetcher
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dbnomics-fetchers
buba-fetcher
Commits
62c00844
Commit
62c00844
authored
4 years ago
by
Enzo Buthiot
Browse files
Options
Downloads
Patches
Plain Diff
Add correct HELP_ON_TIMESERIES_URL
parent
cb944149
No related branches found
No related tags found
1 merge request
!4
Fix download
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
download.py
+5
-15
5 additions, 15 deletions
download.py
with
5 additions
and
15 deletions
download.py
+
5
−
15
View file @
62c00844
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment