Skip to content

Commit

Permalink
adding mosses back in to the correct families following tropicos
Browse files Browse the repository at this point in the history
  • Loading branch information
wcornwell committed Aug 6, 2017
1 parent fd4392f commit d7bbc63
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 27 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,6 +1,6 @@
Package: taxonlookup
Title: A dynamically-updating versioned taxonomic resource for vascular plants
Version: 1.1.2
Version: 1.1.3
Date: 2016-01-29
Description: This is a taxon lookup table for land plants. It is built from a
set of scripts that dynamically build a versioned genus-family-order-higher taxa
Expand Down
41 changes: 18 additions & 23 deletions README.md
Expand Up @@ -74,37 +74,32 @@ The scripts are in the repository but not in the package. Only the data and ways
You can download and load the data into `R` using the `plant_lookup()` function:

``` r
head(plant_lookup())
kable(head(plant_lookup()))
```

## genus family order group
## 1 Acorus Acoraceae Acorales Angiosperms
## 2 Albidella Alismataceae Alismatales Angiosperms
## 3 Alisma Alismataceae Alismatales Angiosperms
## 4 Astonia Alismataceae Alismatales Angiosperms
## 5 Baldellia Alismataceae Alismatales Angiosperms
## 6 Burnatia Alismataceae Alismatales Angiosperms
| genus | family | order | group |
|:----------|:-------------|:------------|:------------|
| Acorus | Acoraceae | Acorales | Angiosperms |
| Albidella | Alismataceae | Alismatales | Angiosperms |
| Alisma | Alismataceae | Alismatales | Angiosperms |
| Astonia | Alismataceae | Alismatales | Angiosperms |
| Baldellia | Alismataceae | Alismatales | Angiosperms |
| Burnatia | Alismataceae | Alismatales | Angiosperms |

The first call to `plant_lookup` will download the data, but subsequent calls will be essentially instantaneous. If you are interested in diversity data, the data object also stores the number of accepted species within each genus as per the plant list:

``` r
head(plant_lookup(include_counts = TRUE))
kable(head(plant_lookup(include_counts = TRUE)[,c(1,3,4)]))
```

## number.of.accepted.species number.of.accepted.and.unresolved.species
## 1 2 5
## 2 1 1
## 3 8 16
## 4 1 1
## 5 3 5
## 6 1 1
## genus family order group
## 1 Acorus Acoraceae Acorales Angiosperms
## 2 Albidella Alismataceae Alismatales Angiosperms
## 3 Alisma Alismataceae Alismatales Angiosperms
## 4 Astonia Alismataceae Alismatales Angiosperms
## 5 Baldellia Alismataceae Alismatales Angiosperms
## 6 Burnatia Alismataceae Alismatales Angiosperms
| number.of.accepted.species| genus | family |
|---------------------------:|:----------|:-------------|
| 2| Acorus | Acoraceae |
| 1| Albidella | Alismataceae |
| 8| Alisma | Alismataceae |
| 1| Astonia | Alismataceae |
| 3| Baldellia | Alismataceae |
| 1| Burnatia | Alismataceae |

For taxonomic groups higher than order, use the `add_higher_order()` function. Because currently the higher taxonomy of plants does not have a nested structure, the format of that lookup table is a little more complicated. Check the help file for more details. To get the version number of the dataset run:

Expand Down
4 changes: 2 additions & 2 deletions README.rmd
Expand Up @@ -70,13 +70,13 @@ The scripts are in the repository but not in the package. Only the data and way
You can download and load the data into `R` using the `plant_lookup()` function:

```{r}
head(plant_lookup())
kable(head(plant_lookup()))
```

The first call to `plant_lookup` will download the data, but subsequent calls will be essentially instantaneous. If you are interested in diversity data, the data object also stores the number of accepted species within each genus as per the plant list:

```{r}
head(plant_lookup(include_counts = TRUE))
kable(head(plant_lookup(include_counts = TRUE)[,c(1,3,4)]))
```

For taxonomic groups higher than order, use the `add_higher_order()` function. Because currently the higher taxonomy of plants does not have a nested structure, the format of that lookup table is a little more complicated. Check the help file for more details. To get the version number of the dataset run:
Expand Down
6 changes: 6 additions & 0 deletions createlookup.R
Expand Up @@ -77,6 +77,12 @@ combineGeneraLists<-function(path,tf){
return(tplGenera)
}

patchTPL<-function(tplGenera,additions){
out<-rbind(tplGenera,additions)
return(out)
}


matchPlantListFamiliesToApweb<-function(tplGenera){
apFamilies<-apgFamilies()
#Some commas come in from apWeb and they cause problems later unless we take them out
Expand Down
3 changes: 3 additions & 0 deletions plant_lookup.csv
Expand Up @@ -20540,6 +20540,7 @@ number.of.accepted.species,number.of.accepted.and.unresolved.species,genus,famil
1,2,Podanthe,Acrobolbaceae,Acrobolbaceae,Undeter_peristomate_moss,Bryophytes
1,3,Symphyomitra,Acrobolbaceae,Acrobolbaceae,Undeter_peristomate_moss,Bryophytes
14,19,Tylimanthus,Acrobolbaceae,Acrobolbaceae,Undeter_peristomate_moss,Bryophytes
10,10,Adelanthus,Adelanthaceae,Adelanthaceae,Undeter_peristomate_moss,Bryophytes
1,1,Adelocolia,Adelanthaceae,Adelanthaceae,Undeter_peristomate_moss,Bryophytes
6,6,Calyptrocolea,Adelanthaceae,Adelanthaceae,Undeter_peristomate_moss,Bryophytes
3,3,Pseudomarsupidium,Adelanthaceae,Adelanthaceae,Undeter_peristomate_moss,Bryophytes
Expand Down Expand Up @@ -21046,6 +21047,7 @@ number.of.accepted.species,number.of.accepted.and.unresolved.species,genus,famil
2,2,Levierella,Fabroniaceae,Fabroniaceae,Undeter_peristomate_moss,Bryophytes
1,1,Macgregorella,Fabroniaceae,Fabroniaceae,Undeter_peristomate_moss,Bryophytes
2,2,Merrilliobryum,Fabroniaceae,Fabroniaceae,Undeter_peristomate_moss,Bryophytes
4,4,Myrinia,Fabroniaceae,Fabroniaceae,Undeter_peristomate_moss,Bryophytes
3,3,Rhizofabronia,Fabroniaceae,Fabroniaceae,Undeter_peristomate_moss,Bryophytes
6,7,Schwetschkeopsis,Fabroniaceae,Fabroniaceae,Undeter_peristomate_moss,Bryophytes
1,1,Taxitheliella,Fabroniaceae,Fabroniaceae,Undeter_peristomate_moss,Bryophytes
Expand Down Expand Up @@ -21886,6 +21888,7 @@ number.of.accepted.species,number.of.accepted.and.unresolved.species,genus,famil
41,42,Rhaphidostichum,Sematophyllaceae,Sematophyllaceae,Undeter_peristomate_moss,Bryophytes
2,2,Schraderella,Sematophyllaceae,Sematophyllaceae,Undeter_peristomate_moss,Bryophytes
3,3,Schraderobryum,Sematophyllaceae,Sematophyllaceae,Undeter_peristomate_moss,Bryophytes
2,2,Schroeterella,Sematophyllaceae,Sematophyllaceae,Undeter_peristomate_moss,Bryophytes
4,4,Sematophyllites,Sematophyllaceae,Sematophyllaceae,Undeter_peristomate_moss,Bryophytes
311,315,Sematophyllum,Sematophyllaceae,Sematophyllaceae,Undeter_peristomate_moss,Bryophytes
10,10,Sigmatella,Sematophyllaceae,Sematophyllaceae,Undeter_peristomate_moss,Bryophytes
Expand Down
8 changes: 7 additions & 1 deletion remake.yml
Expand Up @@ -24,8 +24,14 @@ targets:
tplGenera:
command: combineGeneraLists(downloadTPL,VascularPlantFamilies)

additions:
command: read_csv(file="source_data/Additions.csv",row.names=1)

tplGenera_patched:
command: patchTPL(tplGenera,additions)

lookupRaw:
command: matchPlantListFamiliesToApweb(tplGenera)
command: matchPlantListFamiliesToApweb(tplGenera_patched)

lookupPatch:
command: read_csv("source_data/genus_order_lookup_fae.csv")
Expand Down
4 changes: 4 additions & 0 deletions source_data/additions.csv
@@ -0,0 +1,4 @@
,family,genus,group,number.of.accepted.species,number.of.accepted.and.unresolved.species
Schroeterella,Sematophyllaceae,Schroeterella,Bryophytes,2,2
Adelanthus,Adelanthaceae,Adelanthus,Bryophytes,10,10
Myrinia,Fabroniaceae,Myrinia,Bryophytes,4,4

0 comments on commit d7bbc63

Please sign in to comment.