Hi, I have a dataset with couple of million of points (individuals) and would like to do some mapping (I have the coordinates of each point) but given the number of observation I think it may be usuful to plot dots which represent 100 individuals (of a given group). Does anyone know a good way to aggregate up spatialpoints? Any suggestions would be much appreciated! Best wishes, Juta
spatialpoints: each dot represents 100 individuals?
6 messages · Juta Kawalerowicz, Santiago Beguería, Tim Appelhans +2 more
Hi Juta, Do you need to represent the aggregated data as points necessarily? Otherwise, I have used the stat_hexbin representation from ggplot2 for that very purpose, see for instance: http://santiago.begueria.es/wordpress/wp-content/uploads/2015/06/Figure_01.png Cheers, Stg
El 25 abr 2016, a las 13:35, Juta Kawalerowicz <juta.kawalerowicz at nuffield.ox.ac.uk> escribi?: Hi, I have a dataset with couple of million of points (individuals) and would like to do some mapping (I have the coordinates of each point) but given the number of observation I think it may be usuful to plot dots which represent 100 individuals (of a given group). Does anyone know a good way to aggregate up spatialpoints? Any suggestions would be much appreciated! Best wishes, Juta
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Hi Juta,
in case you want to do web-mapping, library("mapview") should be able to
handle a couple of million (in the sense that a couple means approx. 2).
Cheers
Tim
On 25.04.2016 13:35, Juta Kawalerowicz wrote:
Hi, I have a dataset with couple of million of points (individuals) and would like to do some mapping (I have the coordinates of each point) but given the number of observation I think it may be usuful to plot dots which represent 100 individuals (of a given group). Does anyone know a good way to aggregate up spatialpoints? Any suggestions would be much appreciated! Best wishes, Juta
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
##################################### Tim Appelhans Department of Geography Environmental Informatics Philipps Universit?t Marburg Deutschhausstra?e 12 Raum 00A08 35032 Marburg (Paketpost: 35037 Marburg) Germany Tel +49 (0) 6421 28-25957 http://environmentalinformatics-marburg.de/
Do these hexagons represent areas with equal area?
On 25/04/16 13:52, Santiago Beguer?a wrote:
Hi Juta, Do you need to represent the aggregated data as points necessarily? Otherwise, I have used the stat_hexbin representation from ggplot2 for that very purpose, see for instance: http://santiago.begueria.es/wordpress/wp-content/uploads/2015/06/Figure_01.png Cheers, Stg
El 25 abr 2016, a las 13:35, Juta Kawalerowicz <juta.kawalerowicz at nuffield.ox.ac.uk> escribi?: Hi, I have a dataset with couple of million of points (individuals) and would like to do some mapping (I have the coordinates of each point) but given the number of observation I think it may be usuful to plot dots which represent 100 individuals (of a given group). Does anyone know a good way to aggregate up spatialpoints? Any suggestions would be much appreciated! Best wishes, Juta
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Heisenbergstra?e 2, 48149 M?nster, Germany; +49 251 83 33081 Journal of Statistical Software: http://www.jstatsoft.org/ Computers & Geosciences: http://elsevier.com/locate/cageo/ Spatial Statistics Society http://www.spatialstatistics.info -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20160425/613c50b0/attachment.bin>
Good question. Not on my example, I don?t think so. It will depend on the projection of your data, I guess. Stg
El 25 abr 2016, a las 14:44, Edzer Pebesma <edzer.pebesma at uni-muenster.de> escribi?: Do these hexagons represent areas with equal area? On 25/04/16 13:52, Santiago Beguer?a wrote:
Hi Juta, Do you need to represent the aggregated data as points necessarily? Otherwise, I have used the stat_hexbin representation from ggplot2 for that very purpose, see for instance: http://santiago.begueria.es/wordpress/wp-content/uploads/2015/06/Figure_01.png Cheers, Stg
El 25 abr 2016, a las 13:35, Juta Kawalerowicz <juta.kawalerowicz at nuffield.ox.ac.uk> escribi?: Hi, I have a dataset with couple of million of points (individuals) and would like to do some mapping (I have the coordinates of each point) but given the number of observation I think it may be usuful to plot dots which represent 100 individuals (of a given group). Does anyone know a good way to aggregate up spatialpoints? Any suggestions would be much appreciated! Best wishes, Juta
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
-- Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Heisenbergstra?e 2, 48149 M?nster, Germany; +49 251 83 33081 Journal of Statistical Software: http://www.jstatsoft.org/ Computers & Geosciences: http://elsevier.com/locate/cageo/ Spatial Statistics Society http://www.spatialstatistics.info
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
2 days later
Alternatively, you might also consider data binning (implemented in
several packages: KernSmooth, ks, sm, npsp ,...). This technique is
commonly used in nonparametric statistics to reduce the computational
time (see e.g. Wand, M. P. (1994), Fast Computation of Multivariate
Kernel Estimators, Journal of Computational and Graphical Statistics, 3,
433-445).
For instance, using the npsp package (maintained by me...), you could do
something like this:
library(npsp)
bin <- binning(earthquakes[, c("lon", "lat")], nbin = c(50,50))
# ?bin$binw? will contain the binning weights (aggregations) at
locations ?coords(bin)?
simage(bin)
Additionally, you could estimate (nonparametrically) the spatial density:
h <- h.cv(bin, ncv = 2)$h
den <- np.den(bin, h = h)
plot(den, log = FALSE, main = 'Estimated density')
Best regards,
Ruben.
El 25/04/2016 a las 13:35, Juta Kawalerowicz escribi?:
Hi, I have a dataset with couple of million of points (individuals) and would like to do some mapping (I have the coordinates of each point) but given the number of observation I think it may be usuful to plot dots which represent 100 individuals (of a given group). Does anyone know a good way to aggregate up spatialpoints? Any suggestions would be much appreciated! Best wishes, Juta
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo