```r
chunk_size = 10
# récupérer les altitudes
base  = "https://elevation-api.io/api/elevation?points="
for (i in 1:ceiling(nrow(stations)/chunk_size)){
system("sleep 0.5")
print(i)
iv   = ((i-1)*chunk_size+1):min((i*chunk_size),dim(stations)[1])
latlong = paste0("(",stations[iv,'lat'],",",stations[iv,'long'],")")
query = paste(latlong,collapse=',')
url   = paste(base,query,sep="")
res   = fromJSON(file=url)
stations$alt[iv]=sapply(res$elevations,function(x){x$elevation})
}
```