When I run this code (adapted from MODISTools package) from home, it works fine.
my_url <- "https://modis.ornl.gov/rst/api/v1//MOD13Q1/bands"
my_bands <- jsonlite::fromJSON(my_url)$band
When I run the same code from my work computer (with a firewall), I need to modify the code like this, so that I read the file to my computer first, then interpret through JSON. This works fine if I'm calling JSON directly, but not if I'm using pre-made functions.
my_file <- readr::read_file(my_url)
my_bands <- jsonlite::fromJSON(my_file)$band
I am using R 4.3.0 and jsonlite 1.8.4.
When I run this code (adapted from MODISTools package) from home, it works fine.
my_url <- "https://modis.ornl.gov/rst/api/v1//MOD13Q1/bands"my_bands <- jsonlite::fromJSON(my_url)$bandWhen I run the same code from my work computer (with a firewall), I need to modify the code like this, so that I read the file to my computer first, then interpret through JSON. This works fine if I'm calling JSON directly, but not if I'm using pre-made functions.
my_file <- readr::read_file(my_url)my_bands <- jsonlite::fromJSON(my_file)$bandI am using R 4.3.0 and jsonlite 1.8.4.