code: def construct_FAO_ontology():
      
      df = pd.read_csv("south_sudan_data_fao.csv")
      gb = df.groupby("Element")
  
      d = [
          {
              "events": [
                  {
                      k: [
                          {e: [process_variable_name(k, e)]}
                          for e in list(set(gb.get_group(k)["Item"].tolist()))
                      ]
                  }
                  for k in gb.groups.keys()
              ]
          }
      ]
  
      yaml = YAML()
      yaml.default_flow_style = False
  
      with open("fao_variable_ontology.yml", "w") as f:
          yaml.dump(d, f)
docs: Construct FAO variable ontology for use with Eidos.