Identify 2/3 vacation photos, win $5 Starbucks gift card

March 29, 2013

(This article was first published on BioStatMatt » R, and kindly contributed to R-bloggers)

I have a $5 Starbucks gift card that I simply can’t remember to use; I’ve had it since Christmas. So, I will mail it (within the U.S.A.) to the first commenter who can identify the longitude/latitude (within 5km) where two of these three vacation photos were taken (photos below). ***Update 3/30/2013: locations A and C have been identified***. Each location must be identified by longitude/latitude; names don’t count. Here are some short instructions for obtaining longitude/latitude values from Google Maps: 1 2. I know this is a stretch for R-bloggers, but I will be checking longitude/latitude entries using the following R code:

# convert degree, minute, second to decimal
dms2dec <- function(deg, min, sec) deg + (min + sec/60)/60
# convert degrees to radians
d2r <- function(d) d * pi / 180

# compute great circle distance (km) between two coordinates
# given in radians using the Haversine formula
hgcd <- function(lon1, lat1, lon2, lat2) {
    erth <- 6371 # average radius of earth (km)
    dlon <- (lon2 - lon1)
    dlat <- (lat2 - lat1)
    a <- sin(dlat/2)^2 + cos(lat1) * cos(lat2) * sin(dlon/2)^2
    c <- 2 * asin(min(1,sqrt(a)))
    erth * c
Location C (click to enlarge)

Location C (click to enlarge)

Location B (click to enlarge)

Location B (click to enlarge)

Location A (click to enlarge)

Location A (click to enlarge)

To leave a comment for the author, please follow the link and comment on their blog: BioStatMatt » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)