This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time ./exactextract -r "pop:/home/dan/data/gpw_v4_population_count_rev11_2020_30_sec.tif" -p /home/dan/data/gadm36_level_0.gpkg -f GID_0 --stat "sum(pop)" -o /tmp/country_pop.csv | |
# 37.42s user 5.62s system 98% cpu 43.520 total | |
time R -q -e 'r <- raster::raster("/home/dan/data/gpw_v4_population_count_rev11_2020_30_sec.tif"); p <- sf::st_read("/home/dan/data/gadm36_level_0.gpkg"); country_pop <- cbind(p$GID_0, exactextractr::exact_extract(r, p, "sum")); write.csv(country_pop, "/tmp/country_pop_r.csv", row.names=FALSE, quote=FALSE)' | |
# 69.44s user 10.54s system 99% cpu 1:20.01 total |
OlderNewer