I'm new to GIS and I have a question related to the use of different programs (R, QGIS and ArcGIS) to do summary statistics. I've used R and QGIS to sum the cell values of my raster (using respectively the cellStats function
from R (as follows) and the Raster layer statistics
from the QGIS toolbox) and in both cases I get the same result.
Following is a link to the data I'm using: https://1drv.ms/u/s!Aod2icrdkQPXgSDjgZg3O_NIO71Y
In R, I do (with raster package):
my_raster <- raster("path_to_my_raster")
sum_raster_cells <-cellStats(my_raster, 'sum')
In QGIS, I do:
However, when I use the arcpy.Statistics_analysis
from ArcGIS (as follows), I get a different result. The later actually seems to give a more accurate result than the one that I found with R and QGIS, but I wanted to understand why these results are different. Why isn't the total sum equal when using the same data?
import arcpy
arcpy.env.workspace = "path_where_gdb_is"
arcpy.Statistics_analysis("GPW_ac_ad1_15","output_path",[["SUM_E_ATOT","SUM"]])