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的示例數據 –
您需要使用內置或公共可用的數據文件 –