Error in `load_mapbiomas` - Irrigation, Mining, and Grazing Quality
Closed this issue · 0 comments
IgorRigolon commented
mapbiomas_irrigation
dataset
Using dataset = "mapbiomas_irrigation"
, for both geo_levels:
datazoom.amazonia::load_mapbiomas(dataset = "mapbiomas_irrigation",
raw_data = FALSE, geo_level = "biome")
#> Data from Mapbiomas - Collection 7
#>
#> Warning in utils::download.file(url = path, destfile = temp, mode = "wb"):
#> cannot open URL
#> 'https://mapbiomas-br-site.s3.amazonaws.com/Colecao_7_Irrigacao_Biomes_UF.xlsx':
#> HTTP status was '404 Not Found'
#> Error in utils::download.file(url = path, destfile = temp, mode = "wb"): não foi possível abrir a URL 'https://mapbiomas-br-site.s3.amazonaws.com/Colecao_7_Irrigacao_Biomes_UF.xlsx'
Created on 2023-09-23 with reprex v2.0.2
From what I saw on their site, the download link was moved from https://mapbiomas-br-site.s3.amazonaws.com/Colecao_7_Irrigacao_Biomes_UF.xlsx to https://mapbiomas-br-site.s3.amazonaws.com/downloads/Estatisticas%20/Colecao_7_Irrigacao_Biomes_UF.xlsx
mapbiomas_mining
dataset
Returns basically the same error, but in this case we have to update to the Collection 8 data.
mapbiomas_grazing_quality
dataset
Returns an error when geo_level = "municipality"
, even though geo_level
doesn't even affect this dataset.
datazoom.amazonia::load_mapbiomas(dataset = "mapbiomas_grazing_quality",
raw_data = FALSE, geo_level = "municipality", cover_level = 1)
#> Data from Mapbiomas - Collection 5
#>
#> Error in `dplyr::left_join()`:
#> ! Join columns in `x` must be present in the data.
#> ✖ Problem with `city`.
#> Backtrace:
#> ▆
#> 1. ├─datazoom.amazonia::load_mapbiomas(...)
#> 2. │ └─dat %>% ...
#> 3. ├─dplyr::left_join(., munic_codes, by = dplyr::join_by(city, state))
#> 4. └─dplyr:::left_join.data.frame(., munic_codes, by = dplyr::join_by(city, state))
#> 5. └─dplyr:::join_mutate(...)
#> 6. └─dplyr:::join_cols(...)
#> 7. └─dplyr:::check_join_vars(by$x, x_names, by$condition, "x", error_call = error_call)
#> 8. └─rlang::abort(bullets, call = error_call)
Created on 2023-09-23 with reprex v2.0.2