0
我试图计算伦敦内每个LSOA区域内的点数。我曾试图使用超过功能虽然输出不会产生每LSOA上市数量的计数每个LSOA(多边形)内的计数点
我迄今所进行的代码如下
ldnLSOA <- readOGR(".", "LSOA_2011_London_gen_MHW")
LondonListings <- read.csv('Londonlistings.csv')
proj4string(LdnLSOA) <- proj4string(LondonListings)
plot(ldnLSOA)
plot(LondonListings, add =T)
LSOAcounts <- over(LondonListings, ldnLSOA)
这将生成一个表格,其中不包含比原始ldnLSOA shapefile更多的数据。
我想知道,如果有人知道我将如何能够得到一个表格式:
LSOAname | LSOAcode | Count
或那种框架。
示例数据:
LondonListings:
longitude | latituide
-0.204406 51.52060
-0.034617 51.45037
-0.221920 51.46449
-0.126562 51.47158
-0.188879 51.57068
-0.096917 51.49281
Shape文件:
https://data.london.gov.uk/dataset/statistical-gis-boundary-files-london
请提供一个*重现*例子来处理。 http://stackoverflow.com/help/mcve –
我不确定如何添加信息以使shapefile可以复制,但我添加了LondonListings的示例数据 –
您需要使用内置或公共可用的数据文件 –