From 5e2c5389674bb09352fb0778ef8fe144f3dd0580 Mon Sep 17 00:00:00 2001 From: Joe Cohen Date: Sat, 10 Aug 2024 15:49:18 -0700 Subject: [PATCH] Fix infraspecific names - Inserts rank between species and final epithet - Privatizes methods used `by InatObs#name_id` - Improves method name --- app/classes/inat_obs.rb | 108 +++++++++++++++------------- test/inat/README_INAT_EXAMPLES.md | 43 +++++------ test/inat/i_obliquus_f_sterilis.txt | 1 + test/models/inat_obs_test.rb | 20 ++++++ 4 files changed, 102 insertions(+), 70 deletions(-) create mode 100644 test/inat/i_obliquus_f_sterilis.txt diff --git a/app/classes/inat_obs.rb b/app/classes/inat_obs.rb index 43a6f250c5..f39ea60214 100644 --- a/app/classes/inat_obs.rb +++ b/app/classes/inat_obs.rb @@ -178,55 +178,6 @@ def name_id best_mo_name(mo_names) end - # For infrageneric ranks, the iNat `:name` string is only the epithet. - # Ex: "Distantes" - # So get a complete string. Ex: "Morchella section Distantes" - def full_name - if infrageneric? - genus_rank_epithet - else - inat_taxon[:name] - end - end - - def infrageneric? - %w[subgenus section subsection stirps series subseries]. - include?(inat_taxon[:rank]) - end - - def genus_rank_epithet - # Search the identifications of this iNat observation - # for an identification of the inat_taxon[:id] - inat_identifications.each do |identification| - next unless identifies_this_obs?(identification) - - # search the identification's ancestors to find the genus - identification[:taxon][:ancestors].each do |ancestor| - next unless ancestor[:rank] == "genus" - - # return a string comprising Genus rank epithet - # ex: "Morchella section Distantes" - return "#{ancestor[:name]} #{inat_taxon[:rank]} #{inat_taxon[:name]}" - end - end - end - - def identifies_this_obs?(identification) - identification[:taxon][:id] == inat_taxon[:id] - end - - def best_mo_name(mo_names) - return Name.unknown.id if mo_names.none? - return mo_names.first.id if mo_names.one? - - # iNat name maps to multiple MO Names - # So for the moment, just map it to Fungi - # TODO: refine this. - # Ideas: check iNat and MO authors, possibly prefer non-deprecated MO Name - # - might need a dictionary here - Name.unknown.id - end - def notes return "" if description.empty? @@ -339,6 +290,65 @@ def description @obs[:description] end + def full_name + if infrageneric? + # iNat :name string is only the epithet. Ex: "Distantes" + prepend_genus_and_rank + elsif infraspecific? + # iNat :name string omits the rank. Ex: "Inonotus obliquus sterilis" + insert_rank_between_species_and_final_epithet + else + inat_taxon[:name] + end + end + + def infrageneric? + %w[subgenus section subsection stirps series subseries]. + include?(inat_taxon[:rank]) + end + + def prepend_genus_and_rank + # Search the identifications of this iNat observation + # for an identification of the inat_taxon[:id] + inat_identifications.each do |identification| + next unless identifies_this_obs?(identification) + + # search the identification's ancestors to find the genus + identification[:taxon][:ancestors].each do |ancestor| + next unless ancestor[:rank] == "genus" + + # return a string comprising Genus rank epithet + # ex: "Morchella section Distantes" + return "#{ancestor[:name]} #{inat_taxon[:rank]} #{inat_taxon[:name]}" + end + end + end + + def infraspecific? + %w[subspecies variety form].include?(inat_taxon[:rank]) + end + + def insert_rank_between_species_and_final_epithet + words = inat_taxon[:name].split + "#{words[0..1].join(" ")} #{inat_taxon[:rank]} #{words[2]}" + end + + def identifies_this_obs?(identification) + identification[:taxon][:id] == inat_taxon[:id] + end + + def best_mo_name(mo_names) + return Name.unknown.id if mo_names.none? + return mo_names.first.id if mo_names.one? + + # iNat name maps to multiple MO Names + # So for the moment, just map it to Fungi + # TODO: refine this. + # Ideas: check iNat and MO authors, possibly prefer non-deprecated MO Name + # - might need a dictionary here + Name.unknown.id + end + def sequence_field?(field) field[:datatype] == "dna" || field[:name] =~ /DNA/ && field[:value] =~ /^[ACTG]{,10}/ diff --git a/test/inat/README_INAT_EXAMPLES.md b/test/inat/README_INAT_EXAMPLES.md index 7656c87164..fb39e5ae1e 100644 --- a/test/inat/README_INAT_EXAMPLES.md +++ b/test/inat/README_INAT_EXAMPLES.md @@ -15,28 +15,29 @@ All data as of the time of importing. (The corresponding iNat Observation may ha | File | iNat Obs | fotos | location | Other | | ---- | -------- | ----- | -------- | ----- | -| amanita_flavorubens.txt | [231104466](https://www.inaturalist.org/observations/231104466) | **0** | public | Casual | -| arrhenia_sp_NY02.txt | [184219885](https://www.inaturalist.org/observations/184219885) | 1 | public | **mo-style Provisional Species Name**, **DNA** | -| calostoma_lutescens.txt | [195434438](https://www.inaturalist.org/observations/195434438) | **0** | public | | -| ceanothus_cordulatus.txt | [219631412](https://www.inaturalist.org/observations/219631412) | 1 | public | **Plant** | -| coprinus.txt | [213450312](https://www.inaturalist.org/observations/213450312) | 1 | **obscured** | Needs ID | -| distantes.txt | [215996396](https://www.inaturalist.org/observations/215996396) | 1 | **obscured** | Needs ID, jdc Obs, taxon[:name]: "Distantes" rank:"section", rank_level:13| -| donadina_PNW01.txt | [212320801](https://www.inaturalist.org/observations/212320801) | 1 | public | **non-mo-style Provisional Species Name (PNW)**, **DNA** | -| evernia.txt | [216357655](https://www.inaturalist.org/observations/216357655) | 0 | public | Casual, lichen, no fields, place: Troutdale | -| fuligo_septica.txt | [219783802](https://www.inaturalist.org/observations/219783802) | 1 | public | slime mold **Protozoa** Richmond, CA | -| gyromitra_ancilis.txt | [216745568](https://www.inaturalist.org/observations/216745568) | 3 | public | **cc-by license**, **many projects**, US 20, Linn Co.| -| import_all.txt | | | | all fungal obss (total of 5) of iNat user devin189, 2 per page (this user had few fungal observations) | -| inocybe.txt | [222904190](https://www.inaturalist.org/observations/222904190) | 5 | public | cc-by-nc, **2 tags∆∆** | -| lentinellus_ursinus.txt | [220796026](https://inaturalist.org/observations/220796026) | 2 | obscured | **ID matches many MO names** | -| listed_ids.txt | [231104466](https://www.inaturalist.org/observations/231104466) [195434438](https://www.inaturalist.org/observations/195434438) | na | na | response to request for 2 obs by number (amanita_flavorubens, evernia) | -| lycoperdon.txt | [24970904](https://www.inaturalist.org/observations/24970904) | 2 | public | cc-by-nc, projects, **multiple ids**, many fields including **DNA**, place: E. side of Metolius River, Sisters Ranger District, Deschutes National Forest, Jefferson County, Oregon, US | -| russulaceae.txt | [216675045](https://www.inaturalist.org/observations/216675045) | 2 | public | **all rights reserved**, many projects, Activity; place: Point Defiance Park, Tacoma, WA, US | +| amanita_flavorubens| [231104466](https://www.inaturalist.org/observations/231104466) | **0** | public | Casual | +| arrhenia_sp_NY02| [184219885](https://www.inaturalist.org/observations/184219885) | 1 | public | **mo-style Provisional Species Name**, **DNA** | +| calostoma_lutescens| [195434438](https://www.inaturalist.org/observations/195434438) | **0** | public | | +| ceanothus_cordulatus| [219631412](https://www.inaturalist.org/observations/219631412) | 1 | public | **Plant** | +| coprinus| [213450312](https://www.inaturalist.org/observations/213450312) | 1 | **obscured** | Needs ID | +| distantes| [215996396](https://www.inaturalist.org/observations/215996396) | 1 | **obscured** | Needs ID, jdc Obs, taxon[:name]: "Distantes" rank:"section", rank_level:13| +| donadina_PNW01| [212320801](https://www.inaturalist.org/observations/212320801) | 1 | public | **non-mo-style Provisional Species Name (PNW)**, **DNA** | +| evernia| [216357655](https://www.inaturalist.org/observations/216357655) | 0 | public | Casual, lichen, no fields, place: Troutdale | +| fuligo_septica| [219783802](https://www.inaturalist.org/observations/219783802) | 1 | public | slime mold **Protozoa** Richmond, CA | +| gyromitra_ancilis| [216745568](https://www.inaturalist.org/observations/216745568) | 3 | public | **cc-by license**, **many projects**, US 20, Linn Co.| +| import_all| | | | all fungal obss (total of 5) of iNat user devin189, 2 per page (this user had few fungal observations) | +| inocybe| [222904190](https://www.inaturalist.org/observations/222904190) | 5 | public | cc-by-nc, **2 tags∆∆** | +| i_obliquus_f_sterilis | [232919689](https://www.inaturalist.org/observations/232919689) | 1 | public | cc-by-nc, **infraspecific name** | +| lentinellus_ursinus| [220796026](https://inaturalist.org/observations/220796026) | 2 | obscured | **ID matches many MO names** | +| listed_ids| [231104466](https://www.inaturalist.org/observations/231104466) [195434438](https://www.inaturalist.org/observations/195434438) | na | na | response to request for 2 obs by number (amanita_flavorubens, evernia) | +| lycoperdon| [24970904](https://www.inaturalist.org/observations/24970904) | 2 | public | cc-by-nc, projects, **multiple ids**, many fields including **DNA**, place: E. side of Metolius River, Sisters Ranger District, Deschutes National Forest, Jefferson County, Oregon, US | +| russulaceae| [216675045](https://www.inaturalist.org/observations/216675045) | 2 | public | **all rights reserved**, many projects, Activity; place: Point Defiance Park, Tacoma, WA, US | | somion_unicolor.json | | | | Formatted version of following; facilitates viewing iNat API response key/values test/inat/somion_unicolor.json | -| somion_unicolor.txt | [**202555552**](https://www.inaturalist.org/observations/202555552) | 5 | public | Research Grade, Notes, Activity, >1 ID, 1 field (Mushroom Observer URL), **mirrored from MO** | -| trametes.txt | [220370929](https://www.inaturalist.org/observations/220370929) | 2 | public | D. Miller observation with different collector; Notes; **Observation Fields: Collector**, place: 25th Ave NE, Seattle, WA, US, with huge error | -| tremella_mesenterica.txt | [213508767](https://www.inaturalist.org/observations/213508767) | 1 | public | place: Lewisville, TX 75057, USA | -| xeromphalina_campanella_complex.txt | [215969102](https://www.inaturalist.org/observations/215969102) | 2 | public | **Complex** | -| zero_results.txt | n.a. | | n.a. | response with total_results: 0, to expose and prevent reversion of bug | +| somion_unicolor| [**202555552**](https://www.inaturalist.org/observations/202555552) | 5 | public | Research Grade, Notes, Activity, >1 ID, 1 field (Mushroom Observer URL), **mirrored from MO** | +| trametes| [220370929](https://www.inaturalist.org/observations/220370929) | 2 | public | D. Miller observation with different collector; Notes; **Observation Fields: Collector**, place: 25th Ave NE, Seattle, WA, US, with huge error | +| tremella_mesenterica| [213508767](https://www.inaturalist.org/observations/213508767) | 1 | public | place: Lewisville, TX 75057, USA | +| xeromphalina_campanella_complex| [215969102](https://www.inaturalist.org/observations/215969102) | 2 | public | **Complex** | +| zero_results| n.a. | | n.a. | response with total_results: 0, to expose and prevent reversion of bug | ## TODO diff --git a/test/inat/i_obliquus_f_sterilis.txt b/test/inat/i_obliquus_f_sterilis.txt new file mode 100644 index 0000000000..f02c786494 --- /dev/null +++ b/test/inat/i_obliquus_f_sterilis.txt @@ -0,0 +1 @@ +{"total_results":1,"page":1,"per_page":30,"results":[{"quality_grade":"research","time_observed_at":"2023-04-10T12:06:48-04:00","taxon_geoprivacy":null,"annotations":[],"uuid":"9ada49ba-71be-4a27-8a8e-24c644e51800","observed_on_details":{"date":"2023-04-10","day":10,"month":4,"year":2023,"hour":12,"week":15},"id":232919689,"cached_votes_total":0,"identifications_most_agree":true,"created_at_details":{"date":"2024-07-31","day":31,"month":7,"year":2024,"hour":12,"week":31},"species_guess":"Chaga","identifications_most_disagree":false,"tags":[],"positional_accuracy":13,"comments_count":0,"site_id":5,"created_time_zone":"America/Thunder_Bay","license_code":"cc-by-nc","observed_time_zone":"America/Thunder_Bay","quality_metrics":[],"public_positional_accuracy":13,"reviewed_by":[2069508,6353192],"oauth_application_id":3,"flags":[],"created_at":"2024-07-31T12:10:33-04:00","description":"IOB2","time_zone_offset":"-05:00","project_ids_with_curator_id":[],"observed_on":"2023-04-10","observed_on_string":"2023-04-10 12:06:48-04:00","updated_at":"2024-08-03T19:10:29-04:00","sounds":[],"place_ids":[6712,6883,9853,27606,57637,59613,59954,59956,64423,66741,81457,82256,82257,97394,113642,120472,129312,133230,147150],"captive":false,"taxon":{"is_active":true,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527/127021","min_species_ancestry":"48460,47170,47169,492000,50814,57519,57518,57527,127021","endemic":false,"iconic_taxon_id":47170,"min_species_taxon_id":127021,"threatened":false,"rank_level":5,"introduced":false,"native":false,"parent_id":127021,"name":"Inonotus obliquus sterilis","rank":"form","extinct":false,"id":627022,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021,627022],"created_at":"2018-01-11T13:46:06+00:00","default_photo":{"id":7061469,"license_code":"cc-by-sa","attribution":"(c) Erlon Bailey, some rights reserved (CC BY-SA), uploaded by Erlon Bailey","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":933,"photos_locked":false,"universal_search_rank":933,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":null,"iconic_taxon_name":"Fungi","preferred_common_name":"Chaga"},"ident_taxon_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021,627022],"outlinks":[],"faves_count":0,"ofvs":[],"num_identification_agreements":1,"preferences":{"prefers_community_taxon":null},"comments":[],"map_scale":null,"uri":"https://www.inaturalist.org/observations/232919689","project_ids":[],"community_taxon_id":627022,"geojson":{"type":"Point","coordinates":[-88.6945416667,48.7813033333]},"owners_identification_from_vision":false,"identifications_count":1,"obscured":false,"num_identification_disagreements":0,"geoprivacy":null,"location":"48.7813033333,-88.6945416667","votes":[],"spam":false,"user":{"id":6353192,"login":"taigamushrooms","spam":false,"suspended":false,"created_at":"2022-12-01T05:26:10+00:00","site_id":5,"login_autocomplete":"taigamushrooms","login_exact":"taigamushrooms","name":"Benjamin Bohémier","name_autocomplete":"Benjamin Bohémier","orcid":null,"icon":"https://static.inaturalist.org/attachments/users/icons/6353192/thumb.jpg?1697655716","observations_count":353,"identifications_count":2313,"journal_posts_count":0,"activity_count":2666,"species_count":198,"annotated_observations_count":0,"universal_search_rank":353,"roles":[],"icon_url":"https://static.inaturalist.org/attachments/users/icons/6353192/medium.jpg?1697655716","preferences":{}},"mappable":true,"identifications_some_agree":true,"project_ids_without_curator_id":[],"place_guess":"Dorion, ON, CA","non_traditional_projects":[{"project_id":191741}],"identifications":[{"id":521730739,"uuid":"104e1076-afca-4053-9d23-406f9049508d","user":{"id":6353192,"login":"taigamushrooms","spam":false,"suspended":false,"created_at":"2022-12-01T05:26:10+00:00","login_autocomplete":"taigamushrooms","login_exact":"taigamushrooms","name":"Benjamin Bohémier","name_autocomplete":"Benjamin Bohémier","orcid":null,"icon":"https://static.inaturalist.org/attachments/users/icons/6353192/thumb.jpg?1697655716","observations_count":353,"identifications_count":2313,"journal_posts_count":0,"activity_count":2666,"species_count":198,"annotated_observations_count":0,"universal_search_rank":353,"roles":[],"site_id":5,"icon_url":"https://static.inaturalist.org/attachments/users/icons/6353192/medium.jpg?1697655716"},"created_at":"2024-07-31T12:10:34-04:00","created_at_details":{"date":"2024-07-31","day":31,"month":7,"year":2024,"hour":12,"week":31},"body":null,"category":"improving","current":true,"flags":[],"own_observation":true,"taxon_change":null,"vision":false,"disagreement":null,"previous_observation_taxon_id":627022,"spam":false,"taxon_id":627022,"hidden":false,"moderator_actions":[],"taxon":{"id":627022,"rank":"form","rank_level":5,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021],"is_active":true,"min_species_taxon_id":127021,"name":"Inonotus obliquus sterilis","parent_id":127021,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527/127021","min_species_ancestry":"48460,47170,47169,492000,50814,57519,57518,57527,127021","extinct":false,"created_at":"2018-01-11T13:46:06+00:00","default_photo":{"id":7061469,"license_code":"cc-by-sa","attribution":"(c) Erlon Bailey, some rights reserved (CC BY-SA), uploaded by Erlon Bailey","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":933,"photos_locked":false,"universal_search_rank":933,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":null,"iconic_taxon_name":"Fungi","preferred_common_name":"Chaga","ancestors":[{"id":47170,"rank":"kingdom","rank_level":70,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170],"is_active":true,"name":"Fungi","parent_id":48460,"ancestry":"48460","extinct":false,"default_photo":{"id":260296784,"license_code":"cc-by-nc","attribution":"(c) chofungi, some rights reserved (CC BY-NC)","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/square.jpg","original_dimensions":{"height":1984,"width":1587},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/medium.jpg"},"taxon_changes_count":4,"taxon_schemes_count":2,"observations_count":12731792,"flag_counts":{"resolved":51,"unresolved":1},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Fungus","complete_rank":"phylum","iconic_taxon_name":"Fungi","preferred_common_name":"Fungi Including Lichens"},{"id":47169,"rank":"phylum","rank_level":60,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169],"is_active":true,"name":"Basidiomycota","parent_id":47170,"ancestry":"48460/47170","extinct":false,"default_photo":{"id":160331738,"license_code":"cc-by-nc","attribution":"(c) Christine Young, some rights reserved (CC BY-NC), uploaded by Christine Young","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/square.jpg","original_dimensions":{"height":2048,"width":1562},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/medium.jpg"},"taxon_changes_count":8,"taxon_schemes_count":2,"observations_count":9075844,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Basidiomycota","iconic_taxon_name":"Fungi","preferred_common_name":"Basidiomycete Fungi"},{"id":492000,"rank":"subphylum","rank_level":57,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000],"is_active":true,"name":"Agaricomycotina","parent_id":47169,"ancestry":"48460/47170/47169","extinct":false,"default_photo":{"id":102914709,"license_code":"cc-by-nc","attribution":"(c) Meg Madden, some rights reserved (CC BY-NC), uploaded by Meg Madden","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/square.jpg","original_dimensions":{"height":2048,"width":1761},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/medium.jpg"},"taxon_changes_count":1,"taxon_schemes_count":0,"observations_count":8737323,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Agaricomycotina","iconic_taxon_name":"Fungi","preferred_common_name":"Higher Basidiomycetes"},{"id":50814,"rank":"class","rank_level":50,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814],"is_active":true,"name":"Agaricomycetes","parent_id":492000,"ancestry":"48460/47170/47169/492000","extinct":false,"default_photo":{"id":6993855,"license_code":"cc-by","attribution":"(c) Davide Puddu, some rights reserved (CC BY), uploaded by Davide Puddu","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/square.jpg","original_dimensions":{"height":533,"width":800},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/medium.jpg"},"taxon_changes_count":2,"taxon_schemes_count":2,"observations_count":8637719,"flag_counts":{"resolved":5,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Agaricomycetes","iconic_taxon_name":"Fungi","preferred_common_name":"mushrooms, bracket fungi, puffballs, and allies"},{"id":57519,"rank":"order","rank_level":40,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519],"is_active":true,"name":"Hymenochaetales","parent_id":50814,"ancestry":"48460/47170/47169/492000/50814","extinct":false,"default_photo":{"id":172005710,"license_code":"cc-by-nc","attribution":"(c) Luke Smithson, some rights reserved (CC BY-NC), uploaded by Luke Smithson","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/square.jpeg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":2,"observations_count":238960,"flag_counts":{"resolved":2,"unresolved":1},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Hymenochaetales","iconic_taxon_name":"Fungi"},{"id":57518,"rank":"family","rank_level":30,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518],"is_active":true,"name":"Hymenochaetaceae","parent_id":57519,"ancestry":"48460/47170/47169/492000/50814/57519","extinct":false,"default_photo":{"id":56669280,"license_code":null,"attribution":"(c) Jay L. Keller, all rights reserved, uploaded by Jay L. Keller","url":"https://static.inaturalist.org/photos/56669280/square.jpg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://static.inaturalist.org/photos/56669280/square.jpg","medium_url":"https://static.inaturalist.org/photos/56669280/medium.jpg"},"taxon_changes_count":2,"taxon_schemes_count":1,"observations_count":186936,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Hymenochaetaceae","iconic_taxon_name":"Fungi"},{"id":57527,"rank":"genus","rank_level":20,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527],"is_active":true,"name":"Inonotus","parent_id":57518,"ancestry":"48460/47170/47169/492000/50814/57519/57518","extinct":false,"default_photo":{"id":6855282,"license_code":"cc-by-nc","attribution":"(c) Almantas Kulbis, some rights reserved (CC BY-NC), uploaded by Almantas Kulbis","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/square.jpeg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/medium.jpeg"},"taxon_changes_count":3,"taxon_schemes_count":2,"observations_count":12751,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Inonotus","iconic_taxon_name":"Fungi"},{"id":127021,"rank":"species","rank_level":10,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021],"is_active":true,"name":"Inonotus obliquus","parent_id":57527,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527","extinct":false,"default_photo":{"id":96195428,"license_code":null,"attribution":"(c) Chris Wetherbee, all rights reserved, uploaded by Chris Wetherbee","url":"https://static.inaturalist.org/photos/96195428/square.jpg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://static.inaturalist.org/photos/96195428/square.jpg","medium_url":"https://static.inaturalist.org/photos/96195428/medium.jpg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":6754,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Inonotus_obliquus","iconic_taxon_name":"Fungi","preferred_common_name":"chaga"}]},"previous_observation_taxon":{"id":627022,"rank":"form","rank_level":5,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021,627022],"is_active":true,"min_species_taxon_id":127021,"name":"Inonotus obliquus sterilis","parent_id":127021,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527/127021","min_species_ancestry":"48460,47170,47169,492000,50814,57519,57518,57527,127021","extinct":false,"created_at":"2018-01-11T13:46:06+00:00","default_photo":{"id":7061469,"license_code":"cc-by-sa","attribution":"(c) Erlon Bailey, some rights reserved (CC BY-SA), uploaded by Erlon Bailey","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":933,"photos_locked":false,"universal_search_rank":933,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":null,"iconic_taxon_name":"Fungi","preferred_common_name":"Chaga"}},{"id":523091467,"uuid":"4569a807-8651-4b8c-bcad-022deac63afd","user":{"id":2069508,"login":"ebarr","spam":false,"suspended":false,"created_at":"2019-07-30T00:10:34+00:00","login_autocomplete":"ebarr","login_exact":"ebarr","name":"Erik Barr","name_autocomplete":"Erik Barr","orcid":null,"icon":"https://static.inaturalist.org/attachments/users/icons/2069508/thumb.jpeg?1589575602","observations_count":981,"identifications_count":10262,"journal_posts_count":0,"activity_count":11243,"species_count":208,"annotated_observations_count":474,"universal_search_rank":981,"roles":[],"site_id":5,"icon_url":"https://static.inaturalist.org/attachments/users/icons/2069508/medium.jpeg?1589575602"},"created_at":"2024-08-03T19:10:29-04:00","created_at_details":{"date":"2024-08-03","day":3,"month":8,"year":2024,"hour":19,"week":31},"body":null,"category":"supporting","current":true,"flags":[],"own_observation":false,"taxon_change":null,"vision":false,"disagreement":false,"previous_observation_taxon_id":627022,"spam":false,"taxon_id":627022,"hidden":false,"moderator_actions":[],"taxon":{"id":627022,"rank":"form","rank_level":5,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021],"is_active":true,"min_species_taxon_id":127021,"name":"Inonotus obliquus sterilis","parent_id":127021,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527/127021","min_species_ancestry":"48460,47170,47169,492000,50814,57519,57518,57527,127021","extinct":false,"created_at":"2018-01-11T13:46:06+00:00","default_photo":{"id":7061469,"license_code":"cc-by-sa","attribution":"(c) Erlon Bailey, some rights reserved (CC BY-SA), uploaded by Erlon Bailey","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":933,"photos_locked":false,"universal_search_rank":933,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":null,"iconic_taxon_name":"Fungi","preferred_common_name":"Chaga","ancestors":[{"id":47170,"rank":"kingdom","rank_level":70,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170],"is_active":true,"name":"Fungi","parent_id":48460,"ancestry":"48460","extinct":false,"default_photo":{"id":260296784,"license_code":"cc-by-nc","attribution":"(c) chofungi, some rights reserved (CC BY-NC)","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/square.jpg","original_dimensions":{"height":1984,"width":1587},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/medium.jpg"},"taxon_changes_count":4,"taxon_schemes_count":2,"observations_count":12731792,"flag_counts":{"resolved":51,"unresolved":1},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Fungus","complete_rank":"phylum","iconic_taxon_name":"Fungi","preferred_common_name":"Fungi Including Lichens"},{"id":47169,"rank":"phylum","rank_level":60,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169],"is_active":true,"name":"Basidiomycota","parent_id":47170,"ancestry":"48460/47170","extinct":false,"default_photo":{"id":160331738,"license_code":"cc-by-nc","attribution":"(c) Christine Young, some rights reserved (CC BY-NC), uploaded by Christine Young","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/square.jpg","original_dimensions":{"height":2048,"width":1562},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/medium.jpg"},"taxon_changes_count":8,"taxon_schemes_count":2,"observations_count":9075844,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Basidiomycota","iconic_taxon_name":"Fungi","preferred_common_name":"Basidiomycete Fungi"},{"id":492000,"rank":"subphylum","rank_level":57,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000],"is_active":true,"name":"Agaricomycotina","parent_id":47169,"ancestry":"48460/47170/47169","extinct":false,"default_photo":{"id":102914709,"license_code":"cc-by-nc","attribution":"(c) Meg Madden, some rights reserved (CC BY-NC), uploaded by Meg Madden","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/square.jpg","original_dimensions":{"height":2048,"width":1761},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/medium.jpg"},"taxon_changes_count":1,"taxon_schemes_count":0,"observations_count":8737323,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Agaricomycotina","iconic_taxon_name":"Fungi","preferred_common_name":"Higher Basidiomycetes"},{"id":50814,"rank":"class","rank_level":50,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814],"is_active":true,"name":"Agaricomycetes","parent_id":492000,"ancestry":"48460/47170/47169/492000","extinct":false,"default_photo":{"id":6993855,"license_code":"cc-by","attribution":"(c) Davide Puddu, some rights reserved (CC BY), uploaded by Davide Puddu","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/square.jpg","original_dimensions":{"height":533,"width":800},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/medium.jpg"},"taxon_changes_count":2,"taxon_schemes_count":2,"observations_count":8637719,"flag_counts":{"resolved":5,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Agaricomycetes","iconic_taxon_name":"Fungi","preferred_common_name":"mushrooms, bracket fungi, puffballs, and allies"},{"id":57519,"rank":"order","rank_level":40,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519],"is_active":true,"name":"Hymenochaetales","parent_id":50814,"ancestry":"48460/47170/47169/492000/50814","extinct":false,"default_photo":{"id":172005710,"license_code":"cc-by-nc","attribution":"(c) Luke Smithson, some rights reserved (CC BY-NC), uploaded by Luke Smithson","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/square.jpeg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":2,"observations_count":238960,"flag_counts":{"resolved":2,"unresolved":1},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Hymenochaetales","iconic_taxon_name":"Fungi"},{"id":57518,"rank":"family","rank_level":30,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518],"is_active":true,"name":"Hymenochaetaceae","parent_id":57519,"ancestry":"48460/47170/47169/492000/50814/57519","extinct":false,"default_photo":{"id":56669280,"license_code":null,"attribution":"(c) Jay L. Keller, all rights reserved, uploaded by Jay L. Keller","url":"https://static.inaturalist.org/photos/56669280/square.jpg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://static.inaturalist.org/photos/56669280/square.jpg","medium_url":"https://static.inaturalist.org/photos/56669280/medium.jpg"},"taxon_changes_count":2,"taxon_schemes_count":1,"observations_count":186936,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Hymenochaetaceae","iconic_taxon_name":"Fungi"},{"id":57527,"rank":"genus","rank_level":20,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527],"is_active":true,"name":"Inonotus","parent_id":57518,"ancestry":"48460/47170/47169/492000/50814/57519/57518","extinct":false,"default_photo":{"id":6855282,"license_code":"cc-by-nc","attribution":"(c) Almantas Kulbis, some rights reserved (CC BY-NC), uploaded by Almantas Kulbis","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/square.jpeg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/medium.jpeg"},"taxon_changes_count":3,"taxon_schemes_count":2,"observations_count":12751,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Inonotus","iconic_taxon_name":"Fungi"},{"id":127021,"rank":"species","rank_level":10,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021],"is_active":true,"name":"Inonotus obliquus","parent_id":57527,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527","extinct":false,"default_photo":{"id":96195428,"license_code":null,"attribution":"(c) Chris Wetherbee, all rights reserved, uploaded by Chris Wetherbee","url":"https://static.inaturalist.org/photos/96195428/square.jpg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://static.inaturalist.org/photos/96195428/square.jpg","medium_url":"https://static.inaturalist.org/photos/96195428/medium.jpg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":6754,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Inonotus_obliquus","iconic_taxon_name":"Fungi","preferred_common_name":"chaga"}]},"previous_observation_taxon":{"id":627022,"rank":"form","rank_level":5,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021,627022],"is_active":true,"min_species_taxon_id":127021,"name":"Inonotus obliquus sterilis","parent_id":127021,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527/127021","min_species_ancestry":"48460,47170,47169,492000,50814,57519,57518,57527,127021","extinct":false,"created_at":"2018-01-11T13:46:06+00:00","default_photo":{"id":7061469,"license_code":"cc-by-sa","attribution":"(c) Erlon Bailey, some rights reserved (CC BY-SA), uploaded by Erlon Bailey","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":933,"photos_locked":false,"universal_search_rank":933,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":null,"iconic_taxon_name":"Fungi","preferred_common_name":"Chaga"}}],"project_observations":[],"observation_photos":[{"id":385448963,"position":0,"uuid":"a1ec37e0-85bb-4b38-bf2f-0082f7666580","photo_id":413872439,"photo":{"id":413872439,"license_code":"cc-by-nc","original_dimensions":{"width":1536,"height":2048},"url":"https://inaturalist-open-data.s3.amazonaws.com/photos/413872439/square.jpeg","attribution":"(c) Benjamin Bohémier, some rights reserved (CC BY-NC)","flags":[],"moderator_actions":[],"hidden":false}}],"photos":[{"id":413872439,"license_code":"cc-by-nc","original_dimensions":{"width":1536,"height":2048},"url":"https://inaturalist-open-data.s3.amazonaws.com/photos/413872439/square.jpeg","attribution":"(c) Benjamin Bohémier, some rights reserved (CC BY-NC)","flags":[],"moderator_actions":[],"hidden":false}],"faves":[],"non_owner_ids":[{"id":523091467,"uuid":"4569a807-8651-4b8c-bcad-022deac63afd","user":{"id":2069508,"login":"ebarr","spam":false,"suspended":false,"created_at":"2019-07-30T00:10:34+00:00","login_autocomplete":"ebarr","login_exact":"ebarr","name":"Erik Barr","name_autocomplete":"Erik Barr","orcid":null,"icon":"https://static.inaturalist.org/attachments/users/icons/2069508/thumb.jpeg?1589575602","observations_count":981,"identifications_count":10262,"journal_posts_count":0,"activity_count":11243,"species_count":208,"annotated_observations_count":474,"universal_search_rank":981,"roles":[],"site_id":5,"icon_url":"https://static.inaturalist.org/attachments/users/icons/2069508/medium.jpeg?1589575602"},"created_at":"2024-08-03T19:10:29-04:00","created_at_details":{"date":"2024-08-03","day":3,"month":8,"year":2024,"hour":19,"week":31},"body":null,"category":"supporting","current":true,"flags":[],"own_observation":false,"taxon_change":null,"vision":false,"disagreement":false,"previous_observation_taxon_id":627022,"spam":false,"taxon_id":627022,"hidden":false,"moderator_actions":[],"taxon":{"id":627022,"rank":"form","rank_level":5,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021],"is_active":true,"min_species_taxon_id":127021,"name":"Inonotus obliquus sterilis","parent_id":127021,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527/127021","min_species_ancestry":"48460,47170,47169,492000,50814,57519,57518,57527,127021","extinct":false,"created_at":"2018-01-11T13:46:06+00:00","default_photo":{"id":7061469,"license_code":"cc-by-sa","attribution":"(c) Erlon Bailey, some rights reserved (CC BY-SA), uploaded by Erlon Bailey","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":933,"photos_locked":false,"universal_search_rank":933,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":null,"iconic_taxon_name":"Fungi","preferred_common_name":"Chaga","ancestors":[{"id":47170,"rank":"kingdom","rank_level":70,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170],"is_active":true,"name":"Fungi","parent_id":48460,"ancestry":"48460","extinct":false,"default_photo":{"id":260296784,"license_code":"cc-by-nc","attribution":"(c) chofungi, some rights reserved (CC BY-NC)","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/square.jpg","original_dimensions":{"height":1984,"width":1587},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/260296784/medium.jpg"},"taxon_changes_count":4,"taxon_schemes_count":2,"observations_count":12731792,"flag_counts":{"resolved":51,"unresolved":1},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Fungus","complete_rank":"phylum","iconic_taxon_name":"Fungi","preferred_common_name":"Fungi Including Lichens"},{"id":47169,"rank":"phylum","rank_level":60,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169],"is_active":true,"name":"Basidiomycota","parent_id":47170,"ancestry":"48460/47170","extinct":false,"default_photo":{"id":160331738,"license_code":"cc-by-nc","attribution":"(c) Christine Young, some rights reserved (CC BY-NC), uploaded by Christine Young","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/square.jpg","original_dimensions":{"height":2048,"width":1562},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/160331738/medium.jpg"},"taxon_changes_count":8,"taxon_schemes_count":2,"observations_count":9075844,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Basidiomycota","iconic_taxon_name":"Fungi","preferred_common_name":"Basidiomycete Fungi"},{"id":492000,"rank":"subphylum","rank_level":57,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000],"is_active":true,"name":"Agaricomycotina","parent_id":47169,"ancestry":"48460/47170/47169","extinct":false,"default_photo":{"id":102914709,"license_code":"cc-by-nc","attribution":"(c) Meg Madden, some rights reserved (CC BY-NC), uploaded by Meg Madden","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/square.jpg","original_dimensions":{"height":2048,"width":1761},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/102914709/medium.jpg"},"taxon_changes_count":1,"taxon_schemes_count":0,"observations_count":8737323,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Agaricomycotina","iconic_taxon_name":"Fungi","preferred_common_name":"Higher Basidiomycetes"},{"id":50814,"rank":"class","rank_level":50,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814],"is_active":true,"name":"Agaricomycetes","parent_id":492000,"ancestry":"48460/47170/47169/492000","extinct":false,"default_photo":{"id":6993855,"license_code":"cc-by","attribution":"(c) Davide Puddu, some rights reserved (CC BY), uploaded by Davide Puddu","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/square.jpg","original_dimensions":{"height":533,"width":800},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/square.jpg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6993855/medium.jpg"},"taxon_changes_count":2,"taxon_schemes_count":2,"observations_count":8637719,"flag_counts":{"resolved":5,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Agaricomycetes","iconic_taxon_name":"Fungi","preferred_common_name":"mushrooms, bracket fungi, puffballs, and allies"},{"id":57519,"rank":"order","rank_level":40,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519],"is_active":true,"name":"Hymenochaetales","parent_id":50814,"ancestry":"48460/47170/47169/492000/50814","extinct":false,"default_photo":{"id":172005710,"license_code":"cc-by-nc","attribution":"(c) Luke Smithson, some rights reserved (CC BY-NC), uploaded by Luke Smithson","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/square.jpeg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/172005710/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":2,"observations_count":238960,"flag_counts":{"resolved":2,"unresolved":1},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"https://en.wikipedia.org/wiki/Hymenochaetales","iconic_taxon_name":"Fungi"},{"id":57518,"rank":"family","rank_level":30,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518],"is_active":true,"name":"Hymenochaetaceae","parent_id":57519,"ancestry":"48460/47170/47169/492000/50814/57519","extinct":false,"default_photo":{"id":56669280,"license_code":null,"attribution":"(c) Jay L. Keller, all rights reserved, uploaded by Jay L. Keller","url":"https://static.inaturalist.org/photos/56669280/square.jpg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://static.inaturalist.org/photos/56669280/square.jpg","medium_url":"https://static.inaturalist.org/photos/56669280/medium.jpg"},"taxon_changes_count":2,"taxon_schemes_count":1,"observations_count":186936,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Hymenochaetaceae","iconic_taxon_name":"Fungi"},{"id":57527,"rank":"genus","rank_level":20,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527],"is_active":true,"name":"Inonotus","parent_id":57518,"ancestry":"48460/47170/47169/492000/50814/57519/57518","extinct":false,"default_photo":{"id":6855282,"license_code":"cc-by-nc","attribution":"(c) Almantas Kulbis, some rights reserved (CC BY-NC), uploaded by Almantas Kulbis","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/square.jpeg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/6855282/medium.jpeg"},"taxon_changes_count":3,"taxon_schemes_count":2,"observations_count":12751,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Inonotus","iconic_taxon_name":"Fungi"},{"id":127021,"rank":"species","rank_level":10,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021],"is_active":true,"name":"Inonotus obliquus","parent_id":57527,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527","extinct":false,"default_photo":{"id":96195428,"license_code":null,"attribution":"(c) Chris Wetherbee, all rights reserved, uploaded by Chris Wetherbee","url":"https://static.inaturalist.org/photos/96195428/square.jpg","original_dimensions":{"height":2048,"width":1536},"flags":[],"square_url":"https://static.inaturalist.org/photos/96195428/square.jpg","medium_url":"https://static.inaturalist.org/photos/96195428/medium.jpg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":6754,"flag_counts":{"resolved":3,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":"http://en.wikipedia.org/wiki/Inonotus_obliquus","iconic_taxon_name":"Fungi","preferred_common_name":"chaga"}]},"previous_observation_taxon":{"id":627022,"rank":"form","rank_level":5,"iconic_taxon_id":47170,"ancestor_ids":[48460,47170,47169,492000,50814,57519,57518,57527,127021,627022],"is_active":true,"min_species_taxon_id":127021,"name":"Inonotus obliquus sterilis","parent_id":127021,"ancestry":"48460/47170/47169/492000/50814/57519/57518/57527/127021","min_species_ancestry":"48460,47170,47169,492000,50814,57519,57518,57527,127021","extinct":false,"created_at":"2018-01-11T13:46:06+00:00","default_photo":{"id":7061469,"license_code":"cc-by-sa","attribution":"(c) Erlon Bailey, some rights reserved (CC BY-SA), uploaded by Erlon Bailey","url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","original_dimensions":{"height":1536,"width":2048},"flags":[],"square_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/square.jpeg","medium_url":"https://inaturalist-open-data.s3.amazonaws.com/photos/7061469/medium.jpeg"},"taxon_changes_count":0,"taxon_schemes_count":1,"observations_count":933,"photos_locked":false,"universal_search_rank":933,"flag_counts":{"resolved":1,"unresolved":0},"current_synonymous_taxon_ids":null,"atlas_id":null,"complete_species_count":null,"wikipedia_url":null,"iconic_taxon_name":"Fungi","preferred_common_name":"Chaga"}}]}]} \ No newline at end of file diff --git a/test/models/inat_obs_test.rb b/test/models/inat_obs_test.rb index 24c1bad53c..ad60cb4649 100644 --- a/test/models/inat_obs_test.rb +++ b/test/models/inat_obs_test.rb @@ -121,6 +121,26 @@ def test_infrageneric_name assert_equal(name.text_name, mock_inat_obs.text_name) end + def test_infraspecific_name + name = Name.create( + user: rolf, + rank: "Form", + text_name: "Inonotus obliquus f. sterilis", + search_name: "Inonotus obliquus f. sterilis (Vanin) Balandaykin & Zmitr.", + display_name: "**__Inonotus obliquus__** f. **__sterilis__** " \ + "(Vanin) Balandaykin & Zmitr.", + sort_name: "Inonotus obliquus {7f. sterilis " \ + "(Vanin) Balandaykin & Zmitr.", + author: "(Vanin) Balandaykin & Zmitr.", + icn_id: 809_726 + ) + + mock_inat_obs = mock_observation("i_obliquus_f_sterilis") + + assert_equal(name.id, mock_inat_obs.name_id) + assert_equal(name.text_name, mock_inat_obs.text_name) + end + def test_names_alternative_authors # Make sure fixtures still OK names = Name.where(text_name: "Lentinellus ursinus", rank: "Species",