Closed alrichardbollans closed 1 year ago
I think we discussed this before, then maybe never implemented a solution.
The case of deciding between native and the other occurrence types seems obvious (so e.g. if some species in a genus/family/order are native to a region but some are location_doubtful/introduced/extinct it should show as native), but not sure how to decide between the others.
I feel like the priority should run native > introduced > extinct > location_doubtful
- does that sound right?
I think this really depends on individual purpose and above the species level it gets complicated having a mix of statuses. In general I would agree that native > introduced
. However, as far as I understand, where native and introduced are separate states, extinct
and location_doubtful
are modifiers of those states e.g. a species can be doubtful in a location where is is presumed to be introduced, or extinct in a location where is was native/introduced.
I would be inclined to just label regions based on native/introduced states and maybe a cross-hatching colour for where both native and introduced species are. I think it gets quite messy trying to include extinct
and doubtful
info above the species level.
I think our intention with wcvp_distribution
was that it would replicate the distributions displayed on POWO.
Looking at POWO, for individual species, it looks like:
extinct
and location_doubtful
in a region, it is displayed as location_doubtful
(e.g. Silene polypetala)extinct
and introduced
in a region, it is displayed as introduced
(e.g. Bulboschoenus glaucus)introduced
and location_doubtful
, it is displayed as introduced
(e.g. Euphorbia multinodis)For genera:
native
species in a region, the genus is native
(e.g. Acalypha is native to Alabama, Florida and Louisiana but Acalypha alopecuroidea is introduced in all 3 regions)extinct
if all species that occur there are extinct (e.g. Aldrovanda)location_doubtful
if all species that occur there are listed as doubtful (e.g. Aldrovanda)So, I'll fix wcvp_distribution
to follow that for the taxonomy from family upwards, as well, I think?
That sounds perfect @barnabywalker - I love the idea of cross-hatching @alrichardbollans but the intention is definitely to replicate the POWO mapping (though other themes in future versions is a tempting idea...).
Could you add a test for your fix too, Baz?
@barnabywalker yep this sounds good!
Just adding tests for this, but I think it should be fixed now. Maps below - Gentianales and Rubiaceae showing up pretty much everywhere, which I think is right?
Gentianales:
Rubiaceae:
Aidia pycnantha:
I've added the fix and an associated test in #48, but it would be good for someone to double-check it works as expected before merging.
Plotting the following distributions with:
returns: Gentianales:
Rubiaceae:
Aidia pycnantha:
The maps for the family and order this produces seem incorrect to me i.e. there are certainly gentianales (not doubtful!) in all/most of africa and south america, indonesia, china etc.. For example, Aidia pycnantha in Rubiaceae is found in east China and this shows up in the Rubiaceae and Aidia plots but not the Gentianales plot. Similarly, more regions are marked in the Rubiaceae plot than the Gentianales plots, which seems counterintuitive and there are also lots of regions in the Rubiaceae plot which I think should be marked as 'native'.
Maybe this is the intended behaviour, but I suspect
location_doubtful = FALSE
is removing those regions that are doubtful for any species when it should(?) remove those regions that are doubtful for all species.