UTeach CS Unit 5: Big Principles Data
Fetching Flutter-bys
Butterflies
Astraptes fulgerator is the subject of a groundbreaking and controversial DNA barcoding study that discovered at least three subspecies within the butterfly species.
Examine this relational database of individually tracked butterflies organized using Google’s Fusion Tables tool. Each tracked butterfly is labeled with certain attributes including: a unique “voucher” ID, an image, sex, the year tracked, etc. Although this database contains only a subset of 87 individual butterflies, you can imagine that it contains many more. The original study examined more than 2,500 caterpillars and 484 adult butterflies.
Because the butterflies are logged in a relational database, looking at certain subsets of populations is a simple task. If we want to find all of the female butterflies, we can apply a filter so that only butterflies who meet that criterion are displayed:
sex = female
Or, if we’d like to view all of the butterflies tracked during or before 2003, we can create the filter:
year ≤ 2003
Finally, we can apply both of the criteria, viewing only butterflies that are both female and tracked during or before 2003. This screenshot of the Google Fusion Table shows the results: Google Fusion Tables provides a nice graphical interface for this. The Structured Query Language (SQL) statement to pull this same data would be:
SELECT * FROM Astraptes_fulgerator WHERE sex = female AND year ≤ 2003;
In English, this roughly translates to “Select everything in the Table named ’Astraptes_fulgerator’ where the sex is female and the year tracked was in or before 2003.”
Performing an SQL query on a relational database is much easier than sifting through all of the data by hand, isn’t it?
Instructions
Working individually or in pairs, filter the butterflies inG oogle Fusion Table in order to find the following:
Herbivore species: Astraptes SENNOV AND host plant species: Senna papillosa. Host plant family: Sapindaceae AND wingspan (mm): 59. Primary eco: rain forest AND elevation: <= 300 AND sex: male.
Perform the following tasks for each of the above filters:
1. Take a screenshot of the results. 2. Write/translate the code to the equivalent English sentence (like the example above).
With any remaining time, explore the data set with new search queries.
Submit Submit a document that includes the three screenshots and the search queriest ranslated into English.
UTeach Computer Science—http://uteachcs.org © 2018 The University of Texas at Austin