Closed andylolz closed 5 years ago
Changed a bit:
import pyandi
sector = pyandi.sector(12230, 1) # "Basic health infrastructure"
pyandi.data().activities.find(sector=sector).sector
# [<Sector (Basic health infrastructure (12230), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>, <Sector (Basic health care (12220), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>, <Sector (Basic nutrition (12240), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>, <Sector (Reproductive health care (13020), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>, <Sector (Basic drinking water supply and basic sanitation (14030), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>, <Sector (Relief co-ordination; protection and support services (72050), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>, <Sector (Food aid/Food security programmes (52010), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>, <Sector (Social services (incl youth development and women+ children) (16015), Vocabulary: OECD DAC CRS Purpose Codes (5 digit))>]
Here’s a demo:
The output is currently a tuple of
(code, vocabulary, percentage)
. This probably needs to be turned into aSector
model.