Skip to content

Commit

Permalink
999999999_521850.py (#43): worldbank, draft of get all PS stats from …
Browse files Browse the repository at this point in the history
…topic-health
  • Loading branch information
fititnt committed Aug 3, 2022
1 parent 929943e commit c7654f9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions officina/999999999/0/999999999_521850.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@
'#{t}+rem+i_qcc+is_zxxx+ix_iso8601v{v1}+rdf_p_wdata_p{v2}_s{trivio}+rdf_t_xsd_int': r"^#(?P<t>[a-z0-9]{3,99})\+rem\+i_qcc\+is_zxxx\+ix_iso8601v(?P<v1>[0-9]{4})\+ix_xywdatap(?P<v2>[0-9]{1,12})"
}

DATA_METHODUS = {
'worldbank': {
# https://data.worldbank.org/topic/health?view=chart
'health': {
'download_url': 'https://api.worldbank.org/v2/en/topic/8?downloadformat=csv'
}
}
}

DATA_HXL_DE_CSV_REGEX = {
# @see https://data.humdata.org/tools/hxl-example/
# @see https://data.worldbank.org/indicator
Expand Down Expand Up @@ -257,6 +266,12 @@
# TODOs
# GINI https://data.worldbank.org/indicator/SI.POV.GINI?view=chart
# Redugees https://data.worldbank.org/indicator/SM.POP.REFG?view=chart

# - https://data.worldbank.org/indicator?tab=all
# From all indicators, the health bring most of agregated data
# - https://data.worldbank.org/topic/health?view=chart
# - https://api.worldbank.org/v2/en/topic/8?downloadformat=csv
'health': '#indicator+value+year{0}',
}
}

Expand Down Expand Up @@ -1249,6 +1264,14 @@ def praeparatio(self):
- praeparātiō, s, f, Nom., https://en.wiktionary.org/wiki/praeparatio
"""
# return True

if self.methodus in DATA_METHODUS['worldbank']:
self.link_fonti = DATA_METHODUS['worldbank'][self.methodus][
'download_url']
else:
self.link_fonti = 'https://api.worldbank.org/v2/en/indicator/{0}?downloadformat=csv'.format(
self.methodus)

if self.objectivum_formato == 'link-fonti':
# print(self.link_fonti)
return True
Expand Down

0 comments on commit c7654f9

Please sign in to comment.