anchor.diff:  ,,"boolean","comprehensive_emoc_need_upgrade","Comprehensive EmOC needs upgrade",,"d['compr_oc_c_sections'] and (d['compr_oc_one_nursemidwife_24hr'] or d['num_doctors_fulltime'] >= 1)",,,,,
   ,,"boolean","comprehensive_emoc_fully_functional","Comprehensive EmOC is fully functional",,"d['compr_oc_available_24_7'] and d['compr_oc_antibiotics'] and d['compr_oc_oxytocin'] and d['compr_oc_misoprotol'] and d['power_access'] and d['compr_oc_antishock_garment'] and d['compr_oc_transport_referrals'] and d['compr_oc_suction_machine'] and d['compr_oc_four_midwives'] and d['compr_oc_blood_transfusions'] and d['compr_oc_c_sections'] and d['emoc_parenteral1'] and d['emoc_parenteral_anticonvulsant'] and d['emoc_forceps']",,,,,
   ,,"float","target_health_facilities_comprehensive_emoc","Target for health facilities with Comprehensive EmOC",,1,,,,,
  +,,,,,,,,,,,
  +,,,,,,,,,,,
  +,,,,,,,,,,,
  +,,,,,,,,,,,
   "LGA INDICATORS",,,,,,,,,,,
   ,,"float","health_facilities_with_power","Number of Health Facilities with Power",,,"power_access","count_true","health",,
   ,,"float","health_facilities_basic_emoc_need_upgrade","Number of Health Facilities that needs Basic EmOC upgrade",,,"basic_emoc_need_upgrade","count_true","health",,
  
positive.code: "CALCULATED VARIABLES",,,,,,,,,,,
  ,,"boolean","power_access","Access to power","Has power","not d['power_sources_none']",,,,,
  ,,"boolean","water_access","Access to Water",,"not d['water_sources_none']",,,,,
  ,,"boolean","water_source_working_condition","Working Condition","Working condition of water source","d['water_source_physical_state'] in ['well_maintained', 'newly_constructed']",,,,,
  ,,"boolean","improved_sanitation","Improved Sanitation",,"d['toilet_types_vip_latrine'] or d['toilet_types_pit_w_slab']",,,,,
  ,,"float","health_infrastructure_rating","Health Infrastructure Rating",,"sum_non_null_values(d,['water_access','power_access','improved_sanitation','mobile_signal_funct_yn'])",,,,,
  
negative.code: ,,"boolean","no_user_fees_child_health","No user fees for child health",,"not d['paid_services_child_health']",,,,,
  ,,"float","health_child_health_rating","Child Health Rating",,"sum_non_null_values(d,['child_health_routine_immunization','child_health_growth_monitor','malaria_treatment_yn','child_health_deworming','no_user_fees_child_health'])",,,,,
  ,,"float","health_disease_rating","Disease Rating",,"sum_non_null_values(d,['hiv_treatment_yn','hiv_tx_srvcs_pmtct_services','lab_tests_tb_microscopy','tb_treatment_yn','lab_tests_malaria_rdt','malaria_treatment_yn','malaria_treatment_srvcs_itn'])",,,,,
  ,,,,,,,,,,,
  ,,"boolean","potable_water","Potable Water",,"not d['water_sources_none'] and ['days_no_potable_water_pastmth'] < 7",,,,,
  ,,"boolean","education_improved_sanitation","Improved Sanitation",,"d['toilet_flush_or_pour_flush'] or d['toilet_ventilated_improved_pit_latrine'] or d['toilet_pit_latrine_with_slab']",,,,,
  ,,"boolean","education_improved_sanitation_gender_separated","Improved Sanitation and Gender Separated",,"d['education_improved_sanitation'] and d['gender_separated_toilet'] == “yes”",,,,,
  ,,"boolean","education_classroom_in_good_condition","Schools with classrooms in good condition",,"d['num_classrms_good_cond'] > 1 and ['num_classrms_need_min_repairs'] == 0 and d['num_classrms_need_maj_repairs'] == 0",,,,,
  ,,"boolean","education_classroom_minor_repairs","Schools with classrooms need minor repair",,"d['num_classrms_need_min_repairs'] >= 1 and d['num_classrms_need_maj_repairs'] == 0",,,,,
  ,,"boolean","education_classroom_major_repairs","Schools with classrooms needing major repair",,"d['num_classrms_need_maj_repairs'] >= 1",,,,,
  ,,"boolean","school_3km_catchment","Schools within 3 km from catchment area",,"d['km_to_catchment_area'] <= 3",,,,,
  ,,"boolean","school_3kmplus_catchment","Schools more then 3 km from catchment area",,"d['km_to_catchment_area'] >= 3",,,,,
  ,,"boolean","education_adequate_staffing","Schools with adequate staffing in the past month",,"d['days_school_understaffed_closed'] < 1",,,,,
  ,,"boolean","education_school_closed_staff","Schools closed for one or more days in the past month due to insufficient staff",,"d['days_school_understaffed_closed'] >=1",,,,,
  ,,"boolean","education_nat_curriculum_teacher_guides_no","National Curriculum but teachers don't have guides for all subjects",,"d['natl_curriculum_yn'] and not d['teacher_guide_yn']",,,,,
  ,,"boolean","education_nat_curriculum_teacher_guides_yes","National Curriculum and all teachers have guides for all subjects",,"d['natl_curriculum_yn'] and  d['teacher_guide_yn']",,,,,
  ,,"boolean","education_curriculum_no","No national curriculum",,"not d['natl_curriculum_yn']",,,,,
  ,,"boolean","education_adequate_pens","Adequate pencils/pens for all students",,"d['provide_pens_yn'] and d['pens_sufficient'] in ['pens_moderately_insufficient'] or ['pens_severely_insufficient']",,,,,
  ,,"float","student_teacher_ratio","Student Teacher Ratio",,"d['num_students_total'] / d['num_tchrs_total']",,,,,
  ,,"float","male_to_female_student_ratio","Male to female student ratio",,"d['num_students_male'] / d['num_students_female']",,,,,
  ,,"float","education_infrastructure_rating","Education infrastructure rating",,"sum_non_null_values(d,['power_access', 'water_access', 'potable_water', 'education_improved_sanitation', 'gender_separated_toilets_yn'])",,,,,
  ,,"float","education_classroom_rating","Education classroom state rating",,"sum_non_null_values(d,['education_classroom_in_good_condition','education_classroom_minor_repairs','education_classroom_major_repairs'])",,,,,
  ,,"float","education_access_rating","Education Access Rating",,"sum_non_null_values(d,['school_3km_catchment','school_3kmplus_catchment','fees_paid_for_by_school_none'])",,,,,
  ,,"float","education_staffing_rating","Education Staffing Rating",,"sum_non_null_values(d,['education_adequate_staffing','education_school_closed_staff'])",,,,,
  ,,"float","education_resources_rating","Education Resources Rating",,"sum_non_null_values(d,['education_nat_curriculum_teacher_guides_no','education_nat_curriculum_teacher_guides_yes','education_curriculum_no','education_adequate_pens'])",,,,,
  ,,"float","education_facility_rating","Education Facility Rating",,"sum_non_null_values(d,['education_infrastructure_rating','education_classroom_rating','education_access_rating','education_staffing_rating','education_resources_rating'])",,,,,
  ,,"boolean","basic_emoc_need_upgrade","Basic EmOC needs upgrade",,"d['emoc_antibiotics'] and (d['emoc_oxytocin'] or d['emoc_misoprotol']) and d['emoc_nurse_midwife_24_7']",,,,,
  ,,"float","health_facility_rating","Total Health Facility Rating",,"sum_non_null_values(d,['health_infrastructure_rating','health_staffing_rating','health_access_rating','health_maternal_health_rating','health_child_health_rating','health_disease_rating'])",,,,,
  ,,"float","target_health_facilities_basic_emoc","Target for health facilities with Basic EmOC",,"d['pop_population'] / 20000.0",,,,,
  