NULL = ""

# See http://iatistandard.org/105/codelists/Sector/ for
# the codes and description
SECTOR_TO_CAUSE_AREA = {
    "Advanced technical and managerial training": "Education/Advanced technical and managerial training",
    "Agrarian reform": "Agriculture/agrarian reform",
    "Agricultural co-operatives": "Agriculture/agricultural co-operatives",
    "Agricultural development": "Agriculture/agricultural development",
    "Agricultural education/training": "Agriculture/agricultural education/training",
    "Agricultural extension": "Agriculture/agricultural extension",
    "Agricultural financial services": "Agriculture/agricultural financial services",
    "Agricultural inputs": "Agriculture/agricultural inputs",
    "Agricultural land resources": "Agriculture/agricultural land resources",
    "Agricultural policy and administrative management": "Agriculture/agricultural policy and administrative management",
    "Agricultural research": "Agriculture/agricultural research",
    "Agricultural services": "Agriculture/agricultural services",
    "Agricultural water resources": "Agriculture/agricultural water resources",
    "Agro-industries": "Agriculture/agro-industries",
    "Basic drinking water supply": "Water/basic drinking water supply",
    "Basic drinking water supply and basic sanitation": "Water/basic drinking water supply and basic sanitation",
    "Basic health care": "Global health/basic health care",
    "Basic health infrastructure": "Global health/basic health infrastructure",
    "Basic life skills for youth": "Education/Basic life skills for youth",
    "Basic life skills for youth and adults": "Education/Basic life skills for youth and adults",
    "Basic nutrition": "Nutrition/basic nutrition",
    "Basic sanitation": "Sanitation/basic sanitation",
    "Business support services and institutions": "Business support services and institutions",
    "Civilian peace-building, conflict prevention and resolution": "Conflict resolution/Civilian peace-building, conflict prevention and resolution",
    "Communications policy and administrative management": "Communications policy and administrative management",
    "Culture and recreation": "Culture and recreation",
    "Debt for development swap": "Global development/Debt for development swap",
    "Democratic participation and civil society": "Democratic participation and civil society",
    "Disaster prevention and preparedness": "Disaster prevention and preparedness",
    "Domestic Revenue Mobilisation": "Domestic revenue mobilisation",
    "Early childhood education": "Education/Early childhood education",
    "Educational research": "Education/Educational research",
    "Education and training in water supply and sanitation": "Water/Education and training in water supply and sanitation",
    "Education facilities and training": "Education/Education facilities and training",
    "Education policy and administrative management": "Education/Education policy and administrative management",
    "Education/training in banking and financial services": "Education/training in banking and financial services",
    "Emergency food aid": "Food aid/Emergency food aid",
    "Ending violence against women and girls": "Gender equality/Ending violence against women and girls",
    "Environmental policy and administrative management": "Environmental policy and administrative management",
    "Family planning": "Family planning",
    "Financial policy and administrative management": "Financial policy and administrative management",
    "Food aid/Food security programmes": "Food aid/Food security programmes",
    "Food crop production": "Food crop production",
    "Formal sector financial intermediaries": "Financing/Formal sector financial intermediaries",
    "Health education": "Global health/Health education",
    "Health personnel development": "Global health/Health personnel development",
    "Health policy and administrative management": "Global health/Health policy and administrative management",
    "Higher education": "Education/Higher education",
    "Human rights": "Human rights",
    "Industrial crops/export crops": "Global health/Industrial crops/export crops",
    "Infectious disease control": "Global health/infectious disease control",
    "Informal/semi-formal financial intermediaries": "Financing/Informal/semi-formal financial intermediaries",
    "Information and communication technology (ICT)": "Information and communication technology (ICT)",
    "Legal and judicial development": "Legal and judicial development",
    "Livestock": "Animal agriculture/Livestock",
    "Livestock/veterinary services": "Animal agriculture/Livestock/veterinary services",
    "Malaria control": "Global health/malaria",
    "Material relief assistance and services": "Material relief assistance and services",
    "Media and free flow of information": "Media and free flow of information",
    "Medical education/training": "Global health/Medical education/training",
    "Medical research": "Global health/Medical research",
    "Medical services": "Global health/Medical services",
    "Multisector aid": "Multisector aid",
    "Multisector aid for basic social services": "Multisector aid/Multisector aid for basic social services",
    "Multisector education/training": "Education/Multisector education/training",
    "Personnel development for population and reproductive health": "Personnel development for population and reproductive health",
    "Plant and post-harvest protection and pest control": "Agriculture/Plant and post-harvest protection and pest control",
    "Population policy and administrative management": "Population/Population policy and administrative management",
    "Primary education": "Education/Primary education",
    "Promotion of development awareness": "Global development/Promotion of development awareness",
    "Promotion of development awareness (non-sector allocable)": "Global development/Promotion of development awareness (non-sector allocable)",
    "Public finance management": "Financing/Public finance management",
    "Public Finance Management (PFM)": "Financing/Public finance management",
    "Public sector policy and administrative management": "Public policy/Public sector policy and administrative management",
    "Radio/television/print media": "Radio/television/print media",
    "Recreation and sport": "Recreation and sport",
    "Reconstruction relief and rehabilitation": "Reconstruction relief and rehabilitation",
    "Relief co-ordination; protection and support services": "Relief co-ordination; protection and support services",
    "Relief of multilateral debt": "Financing/Relief of multilateral debt",
    "Reproductive health care": "Global health/Reproductive health care",
    "Research/scientific institutions": "Scientific research/scientific institutions",
    "Rural development": "Rural development",
    "Secondary education": "Education/Secondary education",
    "Sectors not specified": "Sectors not specified",
    "Security system management and reform": "Security system management and reform",
    "Social mitigation of HIV/AIDS": "Global health/Social mitigation of HIV/AIDS",
    "Social/ welfare services": "Social services/welfare services",
    "Social services (incl youth development and women+ children)": "Social services/Social services (incl youth development and women+ children)",
    "Statistical capacity building": "Statistical capacity building",
    "STD control including HIV/AIDS": "Global health/STD control including HIV/AIDS",
    "Tax policy and administration support": "Public policy/Tax policy and administration support",
    "Telecommunications": "Telecommunications",
    "Transport policy and administrative management": "Public policy/Transport policy and administrative management",
    "Tuberculosis control": "Global health/Tuberculosis control",
    "Upper secondary education": "Education/Upper secondary education",
    "Urban development and management": "Urban development and management",
    "Vocational training": "Education/Vocational training",
    "Waste management / disposal": "Waste management / disposal",
    "Water sector policy and administrative management": "Water/Water sector policy and administrative management",
    "Water supply and sanitation - large systems": "Water/Water supply and sanitation - large systems",
    "Women’s equality organisations and institutions": "Gender equality/Women’s equality organisations and institutions",
}

# See http://iatistandard.org/105/codelists/Sector/ for
# the codes and description
SECTOR_TO_DONOR_CAUSE_AREA_URL = {
    "Advanced technical and managerial training": NULL,
    "Agrarian reform": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural co-operatives": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural development": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural education/training": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural extension": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural financial services": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural inputs": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural land resources": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural policy and administrative management": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural research": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural services": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agricultural water resources": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Agro-industries": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Basic drinking water supply": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Water-Sanitation-and-Hygiene",
    "Basic drinking water supply and basic sanitation": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Water-Sanitation-and-Hygiene",
    "Basic health care": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Integrated-Delivery",
    "Basic health infrastructure": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Integrated-Delivery",
    "Basic life skills for youth": NULL,
    "Basic life skills for youth and adults": NULL,
    "Basic nutrition": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Nutrition",
    "Basic sanitation": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Water-Sanitation-and-Hygiene",
    "Business support services and institutions": NULL,
    "Civilian peace-building, conflict prevention and resolution": NULL,
    "Communications policy and administrative management": NULL,
    "Culture and recreation": NULL,
    "Debt for development swap": NULL,
    "Democratic participation and civil society": NULL,
    "Disaster prevention and preparedness": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Emergency-Response",
    "Domestic Revenue Mobilisation": NULL,
    "Early childhood education": NULL,
    "Educational research": NULL,
    "Education and training in water supply and sanitation": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Water-Sanitation-and-Hygiene",
    "Education facilities and training": NULL,
    "Education policy and administrative management": NULL,
    "Education/training in banking and financial services": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Financial-Services-for-the-Poor",
    "Emergency food aid": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Emergency-Response",
    "Ending violence against women and girls": NULL,
    "Environmental policy and administrative management": NULL,
    "Family planning": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Family-Planning",
    "Financial policy and administrative management": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Financial-Services-for-the-Poor",
    "Food aid/Food security programmes": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Nutrition",
    "Food crop production": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Developmen",
    "Formal sector financial intermediaries": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Financial-Services-for-the-Poor",
    "Health education": NULL,
    "Health personnel development": NULL,
    "Health policy and administrative management": NULL,
    "Higher education": NULL,
    "Human rights": NULL,
    "Industrial crops/export crops": NULL,
    "Infectious disease control": "https://www.gatesfoundation.org/What-We-Do/Global-Health/Neglected-Tropical-Diseases",
    "Informal/semi-formal financial intermediaries": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Financial-Services-for-the-Poor",
    "Information and communication technology (ICT)": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Integrated-Delivery",
    "Legal and judicial development": NULL,
    "Livestock": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Livestock/veterinary services": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Agricultural-Development",
    "Malaria control": "https://www.gatesfoundation.org/What-We-Do/Global-Health/Malaria",
    "Material relief assistance and services": NULL,
    "Media and free flow of information": NULL,
    "Medical education/training": NULL,
    "Medical research": NULL,
    "Medical services": NULL,
    "Multisector aid": NULL,
    "Multisector aid for basic social services": NULL,
    "Multisector education/training": NULL,
    "Personnel development for population and reproductive health": NULL,
    "Plant and post-harvest protection and pest control": NULL,
    "Population policy and administrative management": NULL,
    "Primary education": NULL,
    "Promotion of development awareness": NULL,
    "Promotion of development awareness (non-sector allocable)": NULL,
    "Public finance management": "https://www.gatesfoundation.org/What-We-Do/Global-Policy/Development-Policy-Finance",
    "Public Finance Management (PFM)": "https://www.gatesfoundation.org/What-We-Do/Global-Policy/Development-Policy-Finance",
    "Public sector policy and administrative management": "https://www.gatesfoundation.org/What-We-Do/Global-Policy/Development-Policy-Finance",
    "Radio/television/print media": NULL,
    "Reconstruction relief and rehabilitation": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Emergency-Response",
    "Recreation and sport": NULL,
    "Relief co-ordination; protection and support services": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Emergency-Response",
    "Relief of multilateral debt": NULL,
    "Reproductive health care": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Family-Planning",
    "Research/scientific institutions": "https://www.gatesfoundation.org/What-We-Do/Global-Health/Discovery-and-Translational-Sciences",
    "Rural development": NULL,
    "Secondary education": NULL,
    "Sectors not specified": NULL,
    "Security system management and reform": NULL,
    "Social mitigation of HIV/AIDS": "https://www.gatesfoundation.org/What-We-Do/Global-Health/HIV",
    "Social/ welfare services": NULL,
    "Social services (incl youth development and women+ children)": NULL,
    "Statistical capacity building": NULL,
    "STD control including HIV/AIDS": "https://www.gatesfoundation.org/What-We-Do/Global-Health/HIV",
    "Tax policy and administration support": NULL,
    "Telecommunications": NULL,
    "Transport policy and administrative management": NULL,
    "Tuberculosis control": "https://www.gatesfoundation.org/What-We-Do/Global-Health/Tuberculosis",
    "Upper secondary education": NULL,
    "Urban development and management": NULL,
    "Vocational training": NULL,
    "Waste management / disposal": NULL,
    "Water sector policy and administrative management": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Water-Sanitation-and-Hygiene",
    "Water supply and sanitation - large systems": "https://www.gatesfoundation.org/What-We-Do/Global-Development/Water-Sanitation-and-Hygiene",
    "Women’s equality organisations and institutions": NULL,
}

DONEE_RENAME = {
    'Board of Trustees of the University of Illinois': 'University of Illinois',
    'Farm Foundation NFP': 'Farm Foundation',
    'Foundation for the National Institute of Health': 'Foundation for the National Institutes of Health',
    'Foundation of the University of Medicine and Dentistry of New Jersey': 'University of Medicine and Dentistry of New Jersey',
    'George Mason University Foundation': 'George Mason University',
    'Henry J. Kaiser Family Foundation': 'Kaiser Family Foundation',
    'Houston Independent School District Foundation': 'Houston Independent School District',
    'ID Insight': 'IDinsight',
    'International Centre for Genetic Engineering & Biotechnology': 'International Centre for Genetic Engineering and Biotechnology',
    'Measures for Justice Institute': 'Measures for Justice',
    'Ohio State University Foundation': 'Ohio State University',
    'Oklahoma State University': 'Oklahoma State University Foundation',
    'Oregon Health and Science University Foundation': 'Oregon Health & Science University',
    'Oxfam-America': 'Oxfam America',
    'President and Fellows of Harvard College': 'Harvard University',
    'President & Fellows of Harvard College': 'Harvard University',
    'Regents of the University of Colorado': 'University of Colorado',
    'Regents of the University of Michigan': 'University of Michigan',
    'Regents of the University of Minnesota': 'University of Minnesota',
    "Research Triangle Institute" : "RTI International",
    'Rutgers University Foundation': 'Rutgers University',
    "Seattle Children's Hospital Foundation": "Seattle Children's Hospital",
    'The Board of Trustees of the University of Illinois': 'University of Illinois',
    'The GAVI Campaign': 'GAVI Alliance',
    'The Henry J. Kaiser Family Foundation': 'Kaiser Family Foundation',
    'The Oakland Public Education Fund': 'Oakland Public Education Fund',
    'The Pennsylvania State University': 'Pennsylvania State University',
    'The Regents of the University of California, Berkeley': 'University of California, Berkeley',
    'The Regents of the University of California, Irvine': 'University of California, Irvine',
    'The Regents of the University of California, Los Angeles': 'University of California, Los Angeles',
    'The Regents of the University of California, San Diego': 'University of California, San Diego',
    'The Regents of the University of California, San Francisco': 'University of California, San Francisco',
    'The Regents of the University of California, Santa Barbara': 'University of California, Santa Barbara',
    'The Regents of the University of Michigan': 'University of Michigan',
    'The Research Foundation of State University of New York': 'Research Foundation of State University of New York',
    'The Trustees of Princeton University': 'Princeton University',
    'The University of Chicago': 'University of Chicago',
    'The University of Tennessee': 'University of Tennessee',
    'The University of Texas at Austin': 'University of Texas at Austin',
    'The University of Texas at Dallas': 'University of Texas at Dallas',
    'Trustees of Boston University': 'Boston University',
    'Trustees of Indiana University': 'Indiana University',
    'Trustees Of Princeton University': 'Princeton University',
    'Trustees of the University of Pennsylvania': 'University of Pennsylvania',
    'University of Arizona Foundation': 'University of Arizona',
    'University of California at San Diego': 'University of California, San Diego',
    'University of California - Berkeley': 'University of California, Berkeley',
    'University of California San Francisco': 'University of California, San Francisco',
    'University of California Santa Barbara': 'University of California, Santa Barbara',
    'University of Colorado Foundation': 'University of Colorado',
    'University of Colorado': 'University of Colorado Foundation',
    'University of Maryland Baltimore Foundation': 'University of Maryland, Baltimore',
    'University of Washington Foundation': 'University of Washington',
    'Ursuline Academy of Dallas Foundation': 'Ursuline Academy of Dallas',
    'Washington State University Foundation': 'Washington State University',
}

