Skip to content

Instantly share code, notes, and snippets.

View italo-goncalves's full-sized avatar

Ítalo Gomes Gonçalves italo-goncalves

View GitHub Profile
@italo-goncalves
italo-goncalves / google_elevation.R
Created September 15, 2017 00:08
R code to access the Google Elevation API. You will need a Google account and a developer key.
get_Google_Elevation <- function(lat, long, key){
# packages
require(httr)
require(jsonlite)
require(dplyr)
# setup
Ndata <- length(lat)
base_int <- 40 # max roughly 40 data points per request
Ncells <- ceiling(Ndata/base_int)