hurlbertlab / dietdatabase

Creative Commons Zero v1.0 Universal
10 stars 9 forks source link

cleaning Habitat_type field #70

Closed ahhurlbert closed 7 years ago

ahhurlbert commented 7 years ago

Here is the list of terms and their frequency currently in this field:

        agricultural          agriculture bottomland hardwood  
                 178                 5556                   20 
              canyon    coastal shrubland     commericial pine 
                   9                  180                   20 
   coniferous forest     deciduous forest               desert 
                3832                 2232                  302 
              forest            grassland               inland 
                1981                 4557                   43 
             lowland             mangrove                marsh 
                  25                   22                   15 
           mountains             multiple        oak grassland 
                  44                 1878                   15 
       open woodland         pine forests               plains 
                 147                   40                   38 
            riparian            scrubland            shrubland 
                   9                   25                 3674 
            tropical        upland tundra              uplands 
                  54                   12                    8 
               urban              wetland             woodland 
                 462                 2591                 2899

Here are the categories we'd like to use

Try to standardize and let me know if there are some that you're not sure how to classify. Off the top of my head:

bottomland hardwood --> deciduous forest canyon --> shrubland oak grassland --> woodland plains --> grassland tropical --> forest marsh --> wetland

upland, lowland, mountains, inland: you may have to refer to original paper

pwinner1 commented 7 years ago

finished

ahhurlbert commented 7 years ago

Forgot to mention that there are 312 records with a blank for Habitat_type. Revisit these and if there is truly no information, replace with NA

ahhurlbert commented 7 years ago

Also use trimws(), as in #75

pwinner1 commented 7 years ago

finished both