Here you can see more than 800 points, each describing an observation of an individual bird. This data is in the form of KML, a sort of XML document from Google for spatial data.
I want to know which points have “pair” or “female” in the description text nodes using R. This way, I can quickly make and update a .csv in Excel of only the paired birds (based on color bands).
Even if there was a description string search function in Google Earth Pro (or other organization-centric GIS/waypoint software), this method is more
robust, as I can work immediately with the output as a data frame in R, rather than a list of results.
First, open an instance of QGIS. I am running ~2.8 on OSX. Add a vector layer of your KML. “Command-A” in the point dialog to select all before import!
Next, under “Vector”, select “Merge vector layers” via Data Management Tools.
Select CSV and elect to save the file instead of use a temporary/scratch file (this is a common error).
Open your csv in Excel for verification!
The R bit:
# query for paired birds
data <- data.frame(fread("Bird_CSV.csv"))
pair_rows <- contains("pair", vars = data$description)
fem_rows <- contains("fem", vars = data$description)
result <- combine(pair_rows, fem_rows)
result <- data[result,]
Incredibly, the hut we are working from actually had another solar panel just laying around. 🙂
This 50w square panel had a junction box with MC4 connectors, the standard for small scale solar installations. As I was unsure how to know when we are running low on electricity reserves, I decided to make some adjustments.
(Everything is still solder, hot glue, alligator clips, and zip-ties I’m afraid…)
I traded my NEMA / USA two-prong connection with two MC4 splitters, such that both panels can run in parallel (into a standard USA 110v extension cord that goes into our hut). This way we should make well over one of the two 35ah batteries-worth of electricity a day.
I also added a cheap 12v battery level indicator. It is not very accurate (as it fluctuates with solar input) but it does give us some insight about how much “juice” we have available. (I also wired and glued the remote-on switch to the back of the input for stability.)
The field season has officially started in Northern NH!
Male Common Yellowthroat warbler (COYE): This fellow is defending a small territory in a patch of open thicket. These warblers rely on early succession forest- patches of substrate that haven’t really grown in yet- to build cryptic, ground-level nests. They develop complex systems to divert/confuse predators away from their nests.
Female Black-throated Blue Warbler (BTBW): I was lucky to see this female. She is paired with a male who defends a large mature forest territory. They have quite a few BTBW neighbors, which makes for a lot of skirmishes among the males over land. The females are often silent and move very fast…
Male Mourning Warbler (MOWA): This is a rare bird here. Even more amazing, it is defending a territory in our research site- and trying to chase out a male COYE while doing so. The two species “share” resources, which means thy can’t stand each other. 🙂 Each time the male COYE sings near the MOWA, it gets berated and chased away- and vice versa. It appears the COYE isn’t budging either, probably because it hasn’t had this domestic, neighborly problem before.