diff --git a/data/animals.csv b/data/animals.csv index 877ecc9..52fa358 100644 --- a/data/animals.csv +++ b/data/animals.csv @@ -1,38 +1,38 @@ -id,date_added,common_name,other_names,region,country,reference,image,vips_smartcrop,notes -1,2024-02-12,Eland,Common eland,"Africa,Southern Africa",Kenya,https://en.wikipedia.org/wiki/Common_eland,https://upload.wikimedia.org/wikipedia/commons/f/fe/Common_eland_mara.jpg,attention, -2,2024-02-12,Cheetah,Southeast African cheetah,"Africa,Southern Africa",Kenya,https://en.wikipedia.org/wiki/Southeast_African_cheetah,https://upload.wikimedia.org/wikipedia/commons/1/13/Cheetah%2C_Masai_Mara_%2852448476886%29.jpg,entropy, -3,2024-02-12,Warthog,"Common warthog,Central African warthog","Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Common_warthog,https://upload.wikimedia.org/wikipedia/commons/0/05/Female_warthog_with_young.jpg,attention, -4,2024-02-12,Maasai ostrich,East African ostrich,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Masai_ostrich,https://upload.wikimedia.org/wikipedia/commons/9/9d/Masai_Ostrich_%287515523078%29.jpg,attention, -5,2024-02-12,Maasai giraffe,,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Masai_giraffe,https://upload.wikimedia.org/wikipedia/commons/4/4e/GiraffaCamelopardalisTippelskirchi-Masaai-Mara.JPG,attention, -6,2024-02-12,Impala,Common impala,"Africa,Southern Africa",Kenya,https://en.wikipedia.org/wiki/Impala,https://upload.wikimedia.org/wikipedia/commons/e/e1/Trotting_impala_ram%2C_crop.jpg,attention, -7,2024-02-12,Leopard,African leopard,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/African_leopard,https://upload.wikimedia.org/wikipedia/commons/2/23/Leopard_%28Panthera_pardus%29.jpg,centre, -8,2024-02-12,Grant’s zebra,Plains zebra,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Grant%27s_zebra,https://upload.wikimedia.org/wikipedia/commons/6/60/Equus_quagga.jpg,entropy, -9,2024-02-12,Elephant,"African bush elephant,African savanna elephant","Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/African_bush_elephant,https://upload.wikimedia.org/wikipedia/commons/3/37/African_Bush_Elephant.jpg,attention, -10,2024-02-12,Thomson's gazelle,,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Thomson%27s_gazelle,https://upload.wikimedia.org/wikipedia/commons/4/41/Serengeti_Thomson-Gazelle3.jpg,attention, -11,2024-02-12,Grant's gazelle,,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Grant's_gazelle,https://upload.wikimedia.org/wikipedia/commons/b/bf/Grant%27s_Gazelle_taxobox.jpg,entropy, -12,2024-02-13,Wildebeest,Blue wildebeest,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Blue_wildebeest,https://upload.wikimedia.org/wikipedia/commons/3/3a/Blue_wildebeest_%28Connochaetes_taurinus_taurinus%29_female_and_calf.jpg,centre, -13,2024-02-13,Waterbuck,East African defassa waterbuck,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Waterbuck,https://upload.wikimedia.org/wikipedia/commons/d/d7/Ugandan_defassa_waterbuck_%28Kobus_ellipsiprymnus_defassa%29_juvenile_male.jpg,centre, -14,2024-02-13,Hippopotamus,,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Hippopotamus,https://upload.wikimedia.org/wikipedia/commons/f/f2/Portrait_Hippopotamus_in_the_water.jpg,low, -15,2024-02-13,Rhinoceros,Black rhinoceros,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Black_rhinoceros,https://upload.wikimedia.org/wikipedia/commons/6/69/Black_Rhino_at_Working_with_Wildlife.jpg,attention, -16,2024-02-13,Cape buffalo,African buffalo,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/African_buffalo,https://upload.wikimedia.org/wikipedia/commons/1/13/African_buffalo_%28Syncerus_caffer_caffer%29_male_with_cattle_egret.jpg,attention, -17,2024-02-22,Secretary bird,,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Secretarybird,https://upload.wikimedia.org/wikipedia/commons/6/66/Secretary_bird_Mara_for_WC.jpg,attention, -18,2024-02-22,Kori bustard,Somali kori,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Kori_bustard,https://upload.wikimedia.org/wikipedia/commons/1/13/Koribustard.jpg,attention, -19,2024-02-22,Black-backed jackal,East African black-backed jackal,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Black-backed_jackal,https://upload.wikimedia.org/wikipedia/commons/3/3b/Black-backed_jackal_and_kill%2C_Masai_Mara%2C_Kenya_%2852465819308%29.jpg,attention, -20,2024-02-24,Spotted hyena,,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Spotted_hyena,https://upload.wikimedia.org/wikipedia/commons/3/3b/Spotted_hyena_in_Madikwe_Game_Reserve.jpg,attention, -21,2024-02-24,Striped hyena,,"Africa,Eastern Africa,Northern Africa",Kenya,https://en.wikipedia.org/wiki/Striped_hyena,https://upload.wikimedia.org/wikipedia/commons/a/a4/Striped_hyena_%28Hyaena_hyaena%29_-_cropped.jpg,attention, -22,2024-02-24,Egyptian goose,,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Egyptian_goose,https://upload.wikimedia.org/wikipedia/commons/6/6a/Alopochen-aegyptiacus.jpg,attention, -23,2024-02-24,Bat-eared fox,,"Africa,Eastern Africa,Southern Africa",Kenya,https://en.wikipedia.org/wiki/Bat-eared_fox,https://upload.wikimedia.org/wikipedia/commons/8/84/Otocyon_megalotis_-_Etosha_2014.jpg,centre, -24,2024-02-24,Kirk’s dik-dik,,"Africa,Eastern Africa",Kenya,https://en.wikipedia.org/wiki/Kirk%27s_dik-dik,https://upload.wikimedia.org/wikipedia/commons/6/67/Madoqua_kirkii_-_male_%28Namutoni%29.jpg,centre, -25,2024-02-24,Olive baboon,,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Olive_baboon,https://upload.wikimedia.org/wikipedia/commons/3/35/Olive_baboon_Ngorongoro.jpg,attention, -26,2024-02-24,Yellow baboon,,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Yellow_baboon,https://upload.wikimedia.org/wikipedia/commons/6/6d/Yellow_Baboon%2C_Amboseli_National_Park%2C_Kenya.jpg,high, -27,2024-02-24,Nile crocodile,,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Nile_crocodile,https://upload.wikimedia.org/wikipedia/commons/1/18/Nilecroc100.jpg,attention, -28,2024-02-24,Somali ostrich (male),Blue-necked ostrich,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Somali_ostrich,https://upload.wikimedia.org/wikipedia/commons/e/e1/Somali_ostrich.jpg,centre, -29,2024-02-24,Lion (male),,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Lion,https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg,centre, -30,2024-02-24,Lioness (female),,"Africa,Sub-Saharan Africa",Kenya,https://en.wikipedia.org/wiki/Lion,https://upload.wikimedia.org/wikipedia/commons/c/c6/Okonjima_Lioness.jpg,centre, -31,2024-02-26,Helmeted guineafowl,,Sub-Saharan Africa,Kenya,https://en.wikipedia.org/wiki/Helmeted_guineafowl,https://upload.wikimedia.org/wikipedia/commons/a/af/Numida_meleagris_-Serengeti_National_Park%2C_Tanzania-8_%281%29.jpg,centre, -32,2024-02-26,Yellow-necked francolin,Yellow-necked spurfowl,Eastern Africa,Kenya,https://en.m.wikipedia.org/wiki/Yellow-necked_spurfowl,https://upload.wikimedia.org/wikipedia/commons/3/3e/Francolin.jpg,attention, -33,2024-02-26,Reticulated giraffe,Somali giraffe,Eastern Africa,Kenya,https://en.wikipedia.org/wiki/Reticulated_giraffe,https://upload.wikimedia.org/wikipedia/commons/4/44/Giraffa_camelopardalis_reticulata_01%2C_flip.jpg,low, -34,2024-03-29,Coke's hartebeest,Kongoni,Eastern Africa,Kenya,https://en.wikipedia.org/wiki/Coke%27s_hartebeest,https://upload.wikimedia.org/wikipedia/commons/5/5c/Coke%27s_Hartebeest.jpg,attention, -35,2024-06-14,Grévy's zebra,Imperial zebra,Eastern Africa,"Kenya,Ethiopia",https://en.wikipedia.org/wiki/Gr%C3%A9vy%27s_zebra,https://upload.wikimedia.org/wikipedia/commons/7/74/Grevy%27s_Zebra_Stallion.jpg,centre, -36,2024-06-16,Common dwarf mongoose,,Eastern Africa,"Kenya,Ethiopia",https://en.wikipedia.org/wiki/Common_dwarf_mongoose,https://upload.wikimedia.org/wikipedia/commons/0/05/Dwarf_Mongoose_%28Helogale_parvula%29_%286002158282%29.jpg,centre, -37,2024-06-16,Grey crowned crane,Crested crane,Eastern Africa,"Kenya,Ethiopia",https://en.wikipedia.org/wiki/Grey_crowned_crane,https://upload.wikimedia.org/wikipedia/commons/c/cc/Grey-crowned-crane.jpg,attention, +id,date_added,common_name,other_names,region,country,reserve,reference,image,vips_smartcrop,notes +1,2024-02-12,Eland,Common eland,"Africa,Southern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni",https://en.wikipedia.org/wiki/Common_eland,https://upload.wikimedia.org/wikipedia/commons/f/fe/Common_eland_mara.jpg,attention, +2,2024-02-12,Cheetah,Southeast African cheetah,"Africa,Southern Africa",Kenya,"Kapiti,Ol Pejeta,Nairobi National Park",https://en.wikipedia.org/wiki/Southeast_African_cheetah,https://upload.wikimedia.org/wikipedia/commons/1/13/Cheetah%2C_Masai_Mara_%2852448476886%29.jpg,entropy, +3,2024-02-12,Warthog,"Common warthog,Central African warthog","Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Common_warthog,https://upload.wikimedia.org/wikipedia/commons/0/05/Female_warthog_with_young.jpg,attention, +4,2024-02-12,Maasai ostrich,East African ostrich,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Masai_ostrich,https://upload.wikimedia.org/wikipedia/commons/9/9d/Masai_Ostrich_%287515523078%29.jpg,attention, +5,2024-02-12,Maasai giraffe,,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni",https://en.wikipedia.org/wiki/Masai_giraffe,https://upload.wikimedia.org/wikipedia/commons/4/4e/GiraffaCamelopardalisTippelskirchi-Masaai-Mara.JPG,attention, +6,2024-02-12,Impala,Common impala,"Africa,Southern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni",https://en.wikipedia.org/wiki/Impala,https://upload.wikimedia.org/wikipedia/commons/e/e1/Trotting_impala_ram%2C_crop.jpg,attention, +7,2024-02-12,Leopard,African leopard,"Africa,Sub-Saharan Africa",Kenya,"Ol Pejeta,Oserongoni",https://en.wikipedia.org/wiki/African_leopard,https://upload.wikimedia.org/wikipedia/commons/2/23/Leopard_%28Panthera_pardus%29.jpg,centre, +8,2024-02-12,Grant’s zebra,Plains zebra,"Africa,Sub-Saharan Africa",Kenya,"Ol Pejeta,Nairobi National Park",https://en.wikipedia.org/wiki/Grant%27s_zebra,https://upload.wikimedia.org/wikipedia/commons/6/60/Equus_quagga.jpg,entropy, +9,2024-02-12,Elephant,"African bush elephant,African savanna elephant","Africa,Sub-Saharan Africa",Kenya,"Ol Pejeta,Nairobi National Park",https://en.wikipedia.org/wiki/African_bush_elephant,https://upload.wikimedia.org/wikipedia/commons/3/37/African_Bush_Elephant.jpg,attention, +10,2024-02-12,Thomson's gazelle,,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Thomson%27s_gazelle,https://upload.wikimedia.org/wikipedia/commons/4/41/Serengeti_Thomson-Gazelle3.jpg,attention, +11,2024-02-12,Grant's gazelle,,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Grant's_gazelle,https://upload.wikimedia.org/wikipedia/commons/b/bf/Grant%27s_Gazelle_taxobox.jpg,entropy, +12,2024-02-13,Wildebeest,Blue wildebeest,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Blue_wildebeest,https://upload.wikimedia.org/wikipedia/commons/3/3a/Blue_wildebeest_%28Connochaetes_taurinus_taurinus%29_female_and_calf.jpg,centre, +13,2024-02-13,Waterbuck,East African defassa waterbuck,"Africa,Eastern Africa",Kenya,"Ol Pejeta,Oserongoni",https://en.wikipedia.org/wiki/Waterbuck,https://upload.wikimedia.org/wikipedia/commons/d/d7/Ugandan_defassa_waterbuck_%28Kobus_ellipsiprymnus_defassa%29_juvenile_male.jpg,centre, +14,2024-02-13,Hippopotamus,,"Africa,Sub-Saharan Africa",Kenya,"Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Hippopotamus,https://upload.wikimedia.org/wikipedia/commons/f/f2/Portrait_Hippopotamus_in_the_water.jpg,low, +15,2024-02-13,Rhinoceros,Black rhinoceros,"Africa,Sub-Saharan Africa",Kenya,"Ol Pejeta,Nairobi National Park",https://en.wikipedia.org/wiki/Black_rhinoceros,https://upload.wikimedia.org/wikipedia/commons/6/69/Black_Rhino_at_Working_with_Wildlife.jpg,attention, +16,2024-02-13,Cape buffalo,African buffalo,"Africa,Sub-Saharan Africa",Kenya,"Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/African_buffalo,https://upload.wikimedia.org/wikipedia/commons/1/13/African_buffalo_%28Syncerus_caffer_caffer%29_male_with_cattle_egret.jpg,attention, +17,2024-02-22,Secretary bird,,"Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Secretarybird,https://upload.wikimedia.org/wikipedia/commons/6/66/Secretary_bird_Mara_for_WC.jpg,attention, +18,2024-02-22,Kori bustard,Somali kori,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Kori_bustard,https://upload.wikimedia.org/wikipedia/commons/1/13/Koribustard.jpg,attention, +19,2024-02-22,Black-backed jackal,East African black-backed jackal,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Black-backed_jackal,https://upload.wikimedia.org/wikipedia/commons/3/3b/Black-backed_jackal_and_kill%2C_Masai_Mara%2C_Kenya_%2852465819308%29.jpg,attention, +20,2024-02-24,Spotted hyena,,"Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Spotted_hyena,https://upload.wikimedia.org/wikipedia/commons/3/3b/Spotted_hyena_in_Madikwe_Game_Reserve.jpg,attention, +21,2024-02-24,Striped hyena,,"Africa,Eastern Africa,Northern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Striped_hyena,https://upload.wikimedia.org/wikipedia/commons/a/a4/Striped_hyena_%28Hyaena_hyaena%29_-_cropped.jpg,attention, +22,2024-02-24,Egyptian goose,,"Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Egyptian_goose,https://upload.wikimedia.org/wikipedia/commons/6/6a/Alopochen-aegyptiacus.jpg,attention, +23,2024-02-24,Bat-eared fox,,"Africa,Eastern Africa,Southern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Bat-eared_fox,https://upload.wikimedia.org/wikipedia/commons/8/84/Otocyon_megalotis_-_Etosha_2014.jpg,centre, +24,2024-02-24,Kirk’s dik-dik,,"Africa,Eastern Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Kirk%27s_dik-dik,https://upload.wikimedia.org/wikipedia/commons/6/67/Madoqua_kirkii_-_male_%28Namutoni%29.jpg,centre, +25,2024-02-24,Olive baboon,,"Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Olive_baboon,https://upload.wikimedia.org/wikipedia/commons/3/35/Olive_baboon_Ngorongoro.jpg,attention, +26,2024-02-24,Yellow baboon,,"Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Yellow_baboon,https://upload.wikimedia.org/wikipedia/commons/6/6d/Yellow_Baboon%2C_Amboseli_National_Park%2C_Kenya.jpg,high, +27,2024-02-24,Nile crocodile,,"Africa,Sub-Saharan Africa",Kenya,Nairobi National Park,https://en.wikipedia.org/wiki/Nile_crocodile,https://upload.wikimedia.org/wikipedia/commons/1/18/Nilecroc100.jpg,attention, +28,2024-02-24,Somali ostrich (male),Blue-necked ostrich,"Africa,Sub-Saharan Africa",Kenya,Oserongoni,https://en.wikipedia.org/wiki/Somali_ostrich,https://upload.wikimedia.org/wikipedia/commons/e/e1/Somali_ostrich.jpg,centre, +29,2024-02-24,Lion (male),,"Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Nairobi National Park",https://en.wikipedia.org/wiki/Lion,https://upload.wikimedia.org/wikipedia/commons/7/73/Lion_waiting_in_Namibia.jpg,centre, +30,2024-02-24,Lioness (female),,"Africa,Sub-Saharan Africa",Kenya,"Kapiti,Ol Pejeta,Nairobi National Park",https://en.wikipedia.org/wiki/Lion,https://upload.wikimedia.org/wikipedia/commons/c/c6/Okonjima_Lioness.jpg,centre, +31,2024-02-26,Helmeted guineafowl,,Sub-Saharan Africa,Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Helmeted_guineafowl,https://upload.wikimedia.org/wikipedia/commons/a/af/Numida_meleagris_-Serengeti_National_Park%2C_Tanzania-8_%281%29.jpg,centre, +32,2024-02-26,Yellow-necked francolin,Yellow-necked spurfowl,Eastern Africa,Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.m.wikipedia.org/wiki/Yellow-necked_spurfowl,https://upload.wikimedia.org/wikipedia/commons/3/3e/Francolin.jpg,attention, +33,2024-02-26,Reticulated giraffe,Somali giraffe,Eastern Africa,Kenya,Ol Pejeta,https://en.wikipedia.org/wiki/Reticulated_giraffe,https://upload.wikimedia.org/wikipedia/commons/4/44/Giraffa_camelopardalis_reticulata_01%2C_flip.jpg,low, +34,2024-03-29,Coke's hartebeest,Kongoni,Eastern Africa,Kenya,"Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Coke%27s_hartebeest,https://upload.wikimedia.org/wikipedia/commons/5/5c/Coke%27s_Hartebeest.jpg,attention, +35,2024-06-14,Grévy's zebra,Imperial zebra,Eastern Africa,"Kenya,Ethiopia","Ol Pejeta,Oserongoni",https://en.wikipedia.org/wiki/Gr%C3%A9vy%27s_zebra,https://upload.wikimedia.org/wikipedia/commons/7/74/Grevy%27s_Zebra_Stallion.jpg,centre, +36,2024-06-16,Common dwarf mongoose,,Eastern Africa,"Kenya,Ethiopia","Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Common_dwarf_mongoose,https://upload.wikimedia.org/wikipedia/commons/0/05/Dwarf_Mongoose_%28Helogale_parvula%29_%286002158282%29.jpg,centre, +37,2024-06-16,Grey crowned crane,Crested crane,Eastern Africa,"Kenya,Ethiopia","Kapiti,Ol Pejeta,Oserongoni,Nairobi National Park",https://en.wikipedia.org/wiki/Grey_crowned_crane,https://upload.wikimedia.org/wikipedia/commons/c/cc/Grey-crowned-crane.jpg,attention, diff --git a/generate.py b/generate.py index 30eeb73..ee75700 100755 --- a/generate.py +++ b/generate.py @@ -128,6 +128,12 @@ if __name__ == "__main__": required=True, type=argparse.FileType("r", encoding="UTF-8"), ) + parser.add_argument( + "-r", + "--reserve", + help="Reserve to limit selection of animals to (Kapiti, Nairobi National Park, Ol Pejeta, or Oserongoni).", + required=False, + ) parser.add_argument( "-o", "--output-file", @@ -148,6 +154,11 @@ if __name__ == "__main__": # Open the CSV animals_df = pd.read_csv(args.csv_file) + if args.reserve: + logger.info(f"Limiting animals to reserve: {args.reserve}") + + animals_df = animals_df.query("reserve.str.contains(@args.reserve)") + # Get a random list of animal IDs. We will build a square grid using the # "across" parameter passed by the user. animal_ids = animals_df["id"].sample(args.across * args.across)