I'm trying to use R (and R studio) to examine a GeoTIFF file that I've gotten from NASA's Socioeconomic Data and Applications Center (SEDAC).
I'm a complete beginner in GIS, so as a first step, I was trying to get R to load in the tif and plot the same map that I've seen rendered as a PNG on their site:
I downloaded the data set from their page (though at a lower resolution, just to cut down on file size), and saved as
pop-count-2020.tif in my R Studio workspace.
Then I ran this program:
install.packages(c("rgdal", "raster")) library(raster) library(rgdal) pop_count_2020 <- raster(x = "pop-count-2020.tif") plot(pop_count_2020)
And I'm seeing a plot like this:
I am getting some data rendered, which seems to line up with the darkest areas of the SEDAC original, so it feels like my scale is working at too large an increment, so most things are getting rounded down into the smallest bucket.
Is this actually what's happening or have I misunderstood?
If so, how can I correct this?
I'm not sure what to try next as I'm having a hard time trying to find the right terminology for what I'm trying to do.