## This code was written by R. Stafford (2009) and is released under the GNU GPL Open Souce Agreement ## available at: http://www.gnu.org/licenses/gpl.html ## Note, this code needs Python 2.3 and the Python Flickr API software written by James Clark (http://stuvel.eu/projects/flickrapi) ## A valid Flickr API key is also needed - available from www.Flickr.com import flickr import webbrowser search_term = 'beeid2010' search_term2 = 'processbeeid2010' list1 = flickr.photos_search(tags=search_term) list2 = flickr.photos_search(text=search_term2) print len(list1) ##print "\n in total of which \n" ## ##print len(list2) ##print "\n have been processed \n" #f = open('workfile.txt', 'a') #read = f.read() #print read count = 1 for photo in list1: skip = 0 for photo2 in list2: #print("photo1 = " + str(photo) + "\n\n") #print("photo2 = " + str(photo2) + "\n\n") if photo2.id == photo.id: skip = 1 print "Skipping photo " + str(count) + " out of " + str(len(list1)) + ". already processed \n" count = count + 1 if skip == 0: count = count + 1 print "Photo " + str(count) + " out of " + str(len(list1)) print photo x = "http://www.flickr.com/photos/" + str(photo.owner)[13:25] + "/" + str(photo.id) #x = photo.getURL() webbrowser.open(x) try: species = input(" \n Enter Species ID number: ") except: species = 999 ## ## try: ## comments = input("\n Enter any other comments (0 if no comments): ") ## except: comments = 999 #v=photo.getExif() print "\n" #print x try: #print v['GPSPosition'] store_loc = v['GPSPosition'] loc_confidence = 1 except: store_loc = str(photo.getLocation()) loc_confidence = 0 try: #print v['Date and Time (Original)'] store_time = v['Date and Time (Original)'] store_time_ok = 1 except: store_time = "N/A" store_time_ok = 0 if species == 1: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the buff-tailed bumblebee (scientific name - Bombus terrestris). \n Its normal range is throughout the UK, but it is rare in Scotland. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_buff_tail" if species == 2: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the white-tailed bumblebee (scientific name - Bombus lucorum). \n Its normal range is throughout the UK, and is more common in northern Britain. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_white_tail" if species == 3: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the common carder bee - a type of bumblebee (scientific name - Bombus pascuorum). \n Its normal range is throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_common_carder" if species == 4: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the early bumblebee (scientific name - Bombus pratorum). \n Its normal range is throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_early_bb" if species == 5: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the garden bumblebee (scientific name - Bombus hortorum). \n Its normal range is throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_garden_bb" if species == 6: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the red-tailed bumblebee (scientific name - Bombus lapidarius). \n Its normal range is throughout the UK, but is generally absent from NE Scotland. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_red_tail" if species == 7: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the Forest Cuckoo bumblebee (scientific name - Bombus sylvestris). \n Its normal range is throughout the UK - since it is associated (is a 'cuckoo') of the early bumblebee (B. pratorum). \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_forest_cuckoo" if species == 8: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the shrill carder bee (a type of bumblebee) (scientific name - Bombus sylvarum). \n Its normal range is only in the south of the UK, and is quite rare. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_shrill_carder" if species == 9: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the brown-banded carder bee (a type of bumblebee) (scientific name - Bombus humilis). \n Its normal range is only in the south of the UK and parts of Wales, and is quite rare. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_brown_band_carder" if species == 10: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the tree bumblebee (scientific name - Bombus hypnorum). \n Its normal range is only in the southeast of the UK but seems to be spreading rapidly. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_tree_bb" if species == 11: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the honey bee (scientific name - Apis spp.). \n It's found throughout the UK as it is often kept in hives to produce honey commercially \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_apis" if species == 12: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as a mining bee (a type of solitary bee) (scientific name - Colletes spp.). \n \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_Colletes" if species == 13: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as a mining bee (a type of solitary bee) (scientific name - Colletes spp.). \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_Colletes" if species == 14: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as a mining bee (a type of solitary bee) (scientific name - Andrena spp.). \n It's found throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_Andrena" if species == 15: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as a mining bee (a type of solitary bee) (scientific name - Andrena spp.). \n It's found throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_Andrena" if species == 16: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as a mining bee (a type of solitary bee) (scientific name - Andrena spp.). \n It's found throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_Andrena" if species == 17: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the hairy footed flower bee (a type of solitary bee) (scientific name - Anthophora plumipes). \n It's found throughout the UK, except in Scotland and Northern Ireland. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_hairy_footed_flower" if species == 18: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as a mining bee (a type of solitary bee) (scientific name - Lasioglossum spp.). \n It's found throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_Lasioglossum" if species == 19: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as a mining bee (a type of solitary bee) (scientific name - Lasioglossum spp.). \n It's found throughout England and Wales, but more common in the south. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_Lasioglossum" if species == 20: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the Willugby's leafcutter bee (a type of solitary bee) (scientific name - Megachile willughbiella). \n It's found throughout the UK, but more common in the south. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_will_leafcutter" if species == 21: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the common masked bee (a type of solitary bee) (scientific name - Hylaeus communis). \n It's normally found in the south and south east of England and parts of Wales. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_common_masked" if species == 22: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the harebell carpenter bee (a type of solitary bee) (scientific name - Chelostoma campanularum). \n It's found in patchy distributions in central and southern England. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_harebell_carpenter" if species == 23: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the red mason bee (a type of solitary bee) (scientific name - Osmia rufa). \n It's found in England, Wales and southern Scotland. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_red_mason" if species == 24: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the blue mason bee (a type of solitary bee) (scientific name - Osmia caerulescens). \n It's normally found throughout England and Wales. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_blue_mason" if species == 25: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the wool carder bee (a type of solitary bee) (scientific name - Anthidium manicatum). \n It's found in England, Wales and sometimes (rarely) in Scotland. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_wool carder" if species == 26: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the sharp tailed bee (a type of solitary bee) (scientific name - Coelioxys inermis). \n It's found in England and Wales but normally absent from Scotland. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_sharp_tailed" if species == 27: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the nomad bee (a type of solitary bee) (scientific name - Nomada spp.). \n It's found in England and Wales but rarer in Scotland. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_nomad" if species == 28: print "Thank you for your contribution to the Bee ID project. \n This species has been identified as the nomad bee (a type of solitary bee) (scientific name - Nomada spp.). \n It's found throughout the UK. \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_nomad" if species == 29: print "Thank you for your contribution to the Bee ID project. \n I'm afraid we can't fully identify this bee from the photo, but it is a type of bumblebee (scientific name - Bombus spp.). \n This is still a valuable contribution to our project though, so please keep uploading your pictures and keep contributing \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_bumblebee_no_id" if species == 30: print "Thank you for your contribution to the Bee ID project. \n I'm afraid we can't fully identify this bee from the photo, but it is a type of solitary bee - distinct from honeybees and bumblebees. \n This is still a valuable contribution to our project though, so please keep uploading your pictures and keep contributing \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_solitary_no_id" if species == 31: print "Thank you for your contribution to the Bee ID project. \n I'm afraid we can't fully identify this bee from the photo, so we've passed it on to bee experts to try to identify. We will add more comments shortly and keep you updated \n\n processbeeid2010_refer_no_id" if species == 32: print "Thank you for your contribution to the Bee ID project. \n I'm afraid this isn't a bee, but a type of wasp. This is still a valuable contribution to our project though, so please keep uploading your pictures and keep contributing \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_wasp" if species == 33: print "Thank you for your contribution to the Bee ID project. \n I'm afraid this isn't a bee, but a type of fly - it is likely to be able to hover and is more agile than bees generally are. This is still a valuable contribution to our project though, so please keep uploading your pictures and keep contributing \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_fly" if species == 34: print "DO NOT COPY AND PASTE THIS COMMENT OR TAG..... \n\n processbeeid2010_other_bee" if species == 35: print "Thank you for your contribution to the Bee ID project. \n I'm afraid this isn't a bee. This is still a valuable contribution to our project though, so please keep uploading your pictures and keep contributing \n Occasionally we make mistakes in our identification, \n if you think this is the case, please comment below \n\n processbeeid2010_other" raw_input("Press ENTER to continue \n") #if store_time_ok == 1: # f.write(str(x) + ",\t" + store_time[0:10] + ",\t" + store_time[11:] + ",\t" + str(loc_confidence) + ",\t" + store_loc + ",\t" + str(species) + ",\t" + str(comments) + "\n") #else: # f.write(str(x) + ",\t" + store_time + ",\t" + store_time + ",\t" + str(loc_confidence) + ",\t" + store_loc + ",\t" + str(species) + ",\t" + str(comments) + "\n") #f.close()