This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### a simple coordinate conversion function to convert latitude, longitude in DMS to decimal-degress | |
### christina gutierrez aka github@codegordi | |
#library(gsubfn) | |
require(gsubfn) | |
options(digits=15) | |
# point.set == data set with at least latitute and longitude in degrees-(arc)minutes-seconds[-fractional seconds]; | |
# no projection or datum assumed; | |
# format of DD[D]:MM:SS[*] is assumed | |
# e.g. coords <- c("122:45:45", "-69:38:27") | |
# e.g coords <- c("122:45:45.84", "-69:38:27.76") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# best practices for web scraping in R # | |
# function should be used with ldply | |
# eg: | |
ldply(urls, scrape) | |
# add a try to ignore broken links/ unresponsive pages | |
# eg: |
NewerOlder