Skip to content

Commit

Permalink
FIX: country concept not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
semio committed Feb 26, 2016
1 parent f7025d1 commit 666e376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion output/ddf--concepts--discrete.csv
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ latest_agricultural_census,Latest agricultural census,string
latest_industrial_data,Latest industrial data,string
latest_trade_data,Latest trade data,string
latest_water_withdrawal_data,Latest water withdrawal data,string
series_code,Series Code,entity domain
series_code,Series Code,string
topic,Topic,string
indicator_name,Indicator Name,string
short_definition,Short definition,string
Expand All @@ -50,4 +50,5 @@ related_source_links,Related source links,string
other_web_links,Other web links,string
related_indicators,Related indicators,string
license_type,License Type,string
country,Country,entity_domain
year,Year,time
7 changes: 3 additions & 4 deletions script/wdi.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ def extract_concept_discrete(country, series):
# assign all concepts' type to string, then change the non string concepts
# to their correct type.
concepts_discrete['type'] = 'string'
ix_change = [31] # the index of 'country' concept.
concepts_discrete['type'].iloc[ix_change] = 'entity domain'

# adding a year concept
# adding 'year' and 'country' concept
concepts_discrete = concepts_discrete.append(
pd.DataFrame([['year', 'Year', 'time']], index=[53],
pd.DataFrame([['country', 'Country', 'entity_domain'],
['year', 'Year', 'time']], index=[0, 53],
columns=concepts_discrete.columns))

return concepts_discrete
Expand Down

0 comments on commit 666e376

Please sign in to comment.