In [ ]:
# https://www.sciencedirect.com/science/article/pii/S0006320717321547?via%3Dihub

In [7]:
%matplotlib inline

from pprint import pprint

import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pymc3 as mc
import spacepy.toolbox as tb
import spacepy.plot as spp
import tqdm
from scipy import stats
import seaborn as sns
sns.set()


%matplotlib inline


This unreleased version of SpacePy is not supported by the SpacePy team.

In [10]:
df = pd.read_excel('Bird_stats.xlsx', header=None, names=['name', 'sci', 'unthinned', 'thinned', 'AOS'])
df


Out[10]:
name sci unthinned thinned AOS
0 Woodhouse's Scrub-jay Aphelocoma woodhouseii 32 18 WOSJ
1 Black-chinned hummingbird Archilochus alexandri 2 1 BCHU
2 Juniper titmouse Baeolophus ridgwayi 24 14 JUTI
3 Red-tailed hawk Buteo jamaicensis 2 0 RTHA
4 Canyon wren Catherpes mexicanus 3 0 CANW
5 Northern harrier Circus hudsonius 1 0 NOHA
6 Northern flicker Colaptes auratus 9 1 NOFL
7 Common nighthawk Chordeiles minor 7 2 CONI
8 Western wood-pewee Contopus sordidulus 40 15 WEWP
9 Common raven Corvus corax 14 6 CORA
10 Hammond's flycatcher Empidonax hammondii 2 0 HAFL
11 Cordilleran flycatcher Empidonax occidentalis 0 2 COFL
12 Dusky flycatcher Empidonax oberholseri 0 1 DUFL
13 Gray flycatcher Empidonax wrightii 32 16 GRFL
14 American kestrel Falco sparverius 3 0 AMKE
15 House finch Haemorhous mexicanus 63 44 HOFI
16 Dark-eyed junco Junco hyemalis 8 2 DEJU
17 Song sparrow Melospiza melodia 15 6 SOSP
18 Canyon towhee Melozone fusca 13 7 CANT
19 Northern mockingbird Mimus polyglottos 2 1 NOMO
20 Brown-headed cowbird Molothrus ater 14 3 BHCO
21 Ash-throated flycatcher Myiarchus cinerascens 78 52 ATFL
22 Virginia's warbler Oreothlypis virginiae 7 3 VIWA
23 Band-tailed pigeon Patagioenas fasciata 6 4 BTPI
24 Black-headed grosbeak Pheucticus melanocephalus 8 5 BHGR
25 Ladder-backed woodpecker Picoides scalaris 2 0 LBWO
26 Hairy woodpecker Picoides villosus 1 7 HAWO
27 Green-tailed towhee Pipilo chlorurus 7 7 GTTO
28 Spotted towhee Pipilo maculatus 69 35 SPTO
29 Hepatic tanager Piranga flava 3 3 HETA
30 Western tanager Piranga ludoviciana 15 15 WETA
31 Mountain chickadee Poecile gambeli 7 6 MOCH
32 Blue-gray gnatcatcher Polioptila caerulea 38 16 BGGN
33 Bushtit Psaltriparus minimus 15 22 BUSH
34 Rock wren Salpinctes obsoletus 3 1 ROWR
35 Say's phoebe Sayornis saya 6 11 SAPH
36 Broad-tailed hummingbird Selasphorus platycercus 5 16 BTAH
37 Black-throated gray warbler Setophaga nigrescens 4 0 BTYW
38 Yellow-rumped warbler Setophaga coronata 5 0 YRWA
39 Grace's warbler Setophaga graciae 1 3 GRWA
40 Mountain bluebird Sialia currucoides 1 1 MOBL
41 Western bluebird Sialia mexicana 36 18 WEBL
42 Red-breasted nuthatch Sitta canadensis 1 1 RBNU
43 White-breasted nuthatch Sitta carolinensis 3 3 WBNU
44 Pygmy nuthatch Sitta pygmaea 1 10 PYNU
45 American goldfinch Spinus tristis 3 3 AMGO
46 Pine siskin Spinus pinus 0 1 PISI
47 Lesser goldfinch Spinus psaltria 15 5 LEGO
48 Chipping sparrow Spizella passerina 39 25 CHSP
49 Violet-green swallow Tachycineta thalassina 29 19 VGSW
50 Bewick's wren Thryomanes bewickii 5 0 BEWR
51 House wren Troglodytes aedon 13 6 HOWR
52 American robin Turdus migratorius 12 6 AMRO
53 Cassin's kingbird Tyrannus vociferans 39 16 CAKI
54 Gray vireo Vireo vicinior 1 0 GRVI
55 Warbling vireo Vireo gilvus 5 1 WAVI
56 Plumbeus vireo Vireo plumbeus 1 8 PLVI
57 White-winged dove Zenaida asiatica 4 5 WWDO
58 Mourning dove Zenaida macroura 25 18 MODO

In [18]:
df.loc[df['unthinned'].nonzero()].count()


Out[18]:
name         56
sci          56
unthinned    56
thinned      56
AOS          56
dtype: int64

In [19]:
df.loc[df['thinned'].nonzero()].count()


Out[19]:
name         49
sci          49
unthinned    49
thinned      49
AOS          49
dtype: int64

In [15]:
sns.distplot(df['unthinned'].nonzero(), )
sns.distplot(df['thinned'])


Out[15]:
<matplotlib.axes._subplots.AxesSubplot at 0x1301257f0>

In [ ]: