if (FALSE) {
require(fitbitViz)
#............................
# first extract the log-id(s)
#............................
USER_ID = '99xxxx'
token = 'my_long_web_api_token'
log_id = extract_LOG_ID(user_id = USER_ID,
token = token,
after_Date = '2021-03-13',
limit = 10,
sort = 'asc',
verbose = TRUE)
str(log_id)
#...................................
# then return the gps-ctx data.table
#...................................
res_tcx = GPS_TCX_data(log_id = log_id,
user_id = USER_ID,
token = token,
time_zone = 'Europe/Athens',
verbose = TRUE)
str(res_tcx)
#....................................................
# then compute the sf-object buffer and raster-extend
#....................................................
sf_rst_ext = extend_AOI_buffer(dat_gps_tcx = res_tcx,
buffer_in_meters = 1000,
CRS = 4326,
verbose = TRUE)
sf_rst_ext
}
Run the code above in your browser using DataLab