Best Way to Access Data in the Guam Coconut Rhinoceros Project Database

Uses the ipython-sql library.

Install using pip install ipython-sql

For documentation, visit https://github.com/catherinedevlin/ipython-sql/blob/master/README.rst

In [3]:
%load_ext sql
%sql mysql+pymysql://readonlyguest:[email protected]/oryctes
Out[3]:
u'Connected: [email protected]'
In [4]:
%sql SHOW TABLES
51 rows affected.
Out[4]:
Tables_in_oryctes
GMF_added_from_obs_table
GMF_added_to_sinks
Sheet1
Sheet2
YigoBarrelObs
crb_obs
fumigation
ground_treatment
mark_release_recapture
matt
person
rearing
rearing_curr
rearing_obs
rearing_old
safety
search
search_track
search_tracker_2
sink2
sink_visit2
tempAdultsPerTrapDay
tempAdultsTrapped
tempDaily
tempFinalResults
tempMinStartDate
tempNearbyTraps
tempTrap
tempTrapCatch
tempTrapCatchResults
tempTrapCatchSummary
tempTrapsInBoundingBox
test
trap
trapSpatial
trap_extras
trap_safety
trap_visit
tree
tree_treatment
tweets
xmark_mark
xmark_recapture
xmark_release
xtrap catch by trapType
xtrap release rates
xtrap release rates2
xtrap_cycles
xtrap_location
xtrap_visit
yigocopy
In [5]:
%sql SELECT * FROM YigoBarrelObs LIMIT 5
5 rows affected.
Out[5]:
id barrelID trapType lure uvled funnel substrate startDate endDate males females notes
1 1 P y y n n 2014-05-12 2014-05-19 1 2 lure not hung
2 2 B y y n n 2014-05-12 2014-05-19 0 0 lure not hung
3 3 P y y n n 2014-05-12 2014-05-19 2 0 lure not hung
4 4 B y y n n 2014-05-12 2014-05-19 1 0 lure not hung
5 5 P y y n n 2014-05-12 2014-05-19 0 0 lure not hung

BibTex Record

@article { bestWaySQL, title = {Best Way to Access Data in the Guam Coconut Rhinoceros Project Database}, year = {2015}, type = {CRB Technical Report}, url = {http://nbviewer.ipython.org/url/guaminsects.net/anr/sites/default/files/bestWaySQL.ipynb}, author = {Aubrey Moore} }