def create_ids(data):
    """Generate IDs for the species in the dataset, by combining:
    - original species name
    - trait
    - reference
    - latitude
    - longitude"""

    ids = {}

    for row in data:
        species = row[0]
        reference = row[2]
        trait = row[3]
        lat = row[7]
        lon = row[8]

        ids[species + reference + trait +
            str(lat) + str(lon)] = [species, reference, trait, lat, lon]

    return ids