How to objectively subset cities by population
Dear Dr. Gr?ler, Thanks for your contribution. I very much enjoyed the clustering suggestion, and it seems to be available in R's leaflet through the "markerClusterOptions" command. It could solve my problem, so I will take a closer look at that. Regarding your first suggestion, can you point me out some example that uses the overlaid grid approach? Thanks,?-- Thiago V. dos Santos PhD studentLand and Atmospheric ScienceUniversity of Minnesota
On Thursday, July 27, 2017, 3:00:55 AM CDT, Dr. Benedikt Gr?ler <b.graeler at 52north.org> wrote:
Dear Thiago, if you want them spatially evenly distributed, you could overlay a grid and select the largest per grid box - or maybe more intuitive, select the largest per predefined administrative areas (counties/postal codes/...). This could also change based on zoom-level. An alternative is to group sensors and expand and zoom in by clicking on the group (see e.g. [1]). HTH, ? Ben [1] http://sensorweb.demo.52north.org/client/#/map
On 27/07/2017 06:09, Thiago V. dos Santos via R-sig-Geo wrote:
Dear all,
I have temperature records of nearly 1200 locations in southern Brazil.
I am writing a shiny app that will show an interactive map with the locations plotted as circles, where the user can click a location to see its temperature time series.
However, if I show all the locations in the map, it will look really bad, too cramped.
Therefore, in an attempt to make the map look a bit cleaner, I am trying to think of an objective way to subset the locations. My initial approach would be to show only the "largest" locations, i.e. the ones with a population above a certain threshold.
The problem is: the distribution of the population is so positively skewed that I am having a hard time determining the optimal cutoff point.
Does anybody here know any tool or method, possibly spatial, that can assist me with this analysis?
These are the locations I am working with:
#-------------------------------
# Download and summarize
locs <- read.csv("https://www.dropbox.com/s/ykdd8x1mlc76klt/locations.csv?raw=1")
hist(locs$Population)
summary(locs$Population)
# Convert to spatial points and plot
require(sp)
coordinates(locs) <- cbind(locs$Lon , locs$Lat)
plot(locs)
bubble(locs,"Population")
#-------------------------------
Thanks in advance,
? -- Thiago V. dos Santos
PhD student
Land and Atmospheric Science
University of Minnesota
??? [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Dr. Benedikt Gr?ler 52?North Initiative for Geospatial Open Source Software GmbH Martin-Luther-King-Weg 24 48155 Muenster, Germany E-Mail: b.graeler at 52north.org Fon: +49-(0)-251/396371-39 Fax: +49-(0)-251/396371-11 http://52north.org/ Twitter: @FiveTwoN General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk Local Court Muenster HRB 10849 _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo [[alternative HTML version deleted]]