Reference URLs
https://www.nomisweb.co.uk/query/construct/summary.asp?mode=construct&version=0&dataset=141 http://geoportal.statistics.gov.uk/datasets/826dc85fb600440889480f4d9dbb1a24_3?geometry=-7.878%2C50.796%2C6.031%2C53.163
http://zevross.com/blog/2018/10/02/creating-beautiful-demographic-maps-in-r-with-the-tidycensus-and-tmap-packages/
“An extract compiled from the Inter Departmental Business Register (IDBR) recording the number of local units that were live at a reference date in March. Estimates can be broken down by employment size band, detailed industry (5 digit SIC2007) and legal status. Available from country down to mid layer super output area and Scottish intermediate zones”
libraries
library(dplyr)
library(readr)
library(maptools)
library(RColorBrewer)
library(classInt)
#library(OpenStreetMap)
library(sp)
library(rgeos)
library(tmap)
library(tmaptools)
library(sf)
library(rgdal)
library(geojsonio)
library(ggplot2)
library(spData)
library(tidyverse)
Read from MSOA data from London Atlas (statistical-gis-boundaries-london)
msoa <- st_read("/Volumes/ritd-ag-project-rd00lq-jamfe87/GIS_Analysis/dataRaw/statistical-gis-boundaries-london/ESRI/MSOA_2011_London_gen_MHW.shp")
## Reading layer `MSOA_2011_London_gen_MHW' from data source `/Volumes/ritd-ag-project-rd00lq-jamfe87/GIS_Analysis/dataRaw/statistical-gis-boundaries-london/ESRI/MSOA_2011_London_gen_MHW.shp' using driver `ESRI Shapefile'
## Simple feature collection with 983 features and 12 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: 503574.2 ymin: 155850.8 xmax: 561956.7 ymax: 200933.6
## epsg (SRID): NA
## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601272 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs
Get vector of MSOA codes
msoa_cd <- msoa[,1]
msoa_cd <- st_set_geometry(msoa_cd, NULL)
msoa_cd <- as.vector(msoa_cd$MSOA11CD, mode = 'any') # 983 obs.
msoa_cd
## [1] "E02000001" "E02000002" "E02000003" "E02000004" "E02000005"
## [6] "E02000007" "E02000008" "E02000009" "E02000010" "E02000011"
## [11] "E02000012" "E02000013" "E02000014" "E02000015" "E02000016"
## [16] "E02000017" "E02000018" "E02000019" "E02000020" "E02000021"
## [21] "E02000022" "E02000023" "E02000024" "E02000025" "E02000026"
## [26] "E02000027" "E02000028" "E02000029" "E02000030" "E02000031"
## [31] "E02000032" "E02000033" "E02000034" "E02000035" "E02000036"
## [36] "E02000037" "E02000038" "E02000039" "E02000040" "E02000041"
## [41] "E02000042" "E02000043" "E02000044" "E02000045" "E02000046"
## [46] "E02000047" "E02000048" "E02000049" "E02000050" "E02000051"
## [51] "E02000052" "E02000053" "E02000054" "E02000055" "E02000056"
## [56] "E02000057" "E02000058" "E02000059" "E02000060" "E02000061"
## [61] "E02000062" "E02000063" "E02000064" "E02000065" "E02000066"
## [66] "E02000067" "E02000068" "E02000069" "E02000070" "E02000071"
## [71] "E02000072" "E02000073" "E02000074" "E02000075" "E02000077"
## [76] "E02000078" "E02000079" "E02000080" "E02000081" "E02000082"
## [81] "E02000083" "E02000084" "E02000085" "E02000086" "E02000087"
## [86] "E02000088" "E02000089" "E02000090" "E02000091" "E02000092"
## [91] "E02000093" "E02000094" "E02000095" "E02000096" "E02000097"
## [96] "E02000098" "E02000099" "E02000100" "E02000101" "E02000102"
## [101] "E02000103" "E02000104" "E02000105" "E02000106" "E02000107"
## [106] "E02000108" "E02000109" "E02000110" "E02000111" "E02000112"
## [111] "E02000113" "E02000114" "E02000115" "E02000116" "E02000117"
## [116] "E02000118" "E02000119" "E02000120" "E02000121" "E02000122"
## [121] "E02000123" "E02000124" "E02000125" "E02000126" "E02000127"
## [126] "E02000128" "E02000130" "E02000131" "E02000132" "E02000133"
## [131] "E02000134" "E02000135" "E02000136" "E02000137" "E02000138"
## [136] "E02000139" "E02000140" "E02000141" "E02000142" "E02000144"
## [141] "E02000145" "E02000146" "E02000147" "E02000148" "E02000149"
## [146] "E02000150" "E02000151" "E02000152" "E02000153" "E02000154"
## [151] "E02000155" "E02000156" "E02000157" "E02000158" "E02000159"
## [156] "E02000160" "E02000161" "E02000162" "E02000163" "E02000165"
## [161] "E02000166" "E02000167" "E02000168" "E02000169" "E02000170"
## [166] "E02000171" "E02000172" "E02000173" "E02000174" "E02000175"
## [171] "E02000176" "E02000177" "E02000178" "E02000179" "E02000180"
## [176] "E02000181" "E02000182" "E02000183" "E02000184" "E02000185"
## [181] "E02000186" "E02000187" "E02000188" "E02000189" "E02000190"
## [186] "E02000191" "E02000192" "E02000193" "E02000194" "E02000195"
## [191] "E02000196" "E02000197" "E02000198" "E02000199" "E02000200"
## [196] "E02000201" "E02000202" "E02000203" "E02000204" "E02000206"
## [201] "E02000207" "E02000208" "E02000209" "E02000210" "E02000211"
## [206] "E02000212" "E02000213" "E02000214" "E02000215" "E02000216"
## [211] "E02000217" "E02000218" "E02000219" "E02000220" "E02000221"
## [216] "E02000222" "E02000223" "E02000224" "E02000225" "E02000226"
## [221] "E02000227" "E02000228" "E02000229" "E02000230" "E02000231"
## [226] "E02000232" "E02000233" "E02000234" "E02000235" "E02000236"
## [231] "E02000237" "E02000238" "E02000239" "E02000240" "E02000241"
## [236] "E02000242" "E02000243" "E02000244" "E02000245" "E02000246"
## [241] "E02000247" "E02000248" "E02000249" "E02000250" "E02000251"
## [246] "E02000252" "E02000253" "E02000254" "E02000255" "E02000256"
## [251] "E02000257" "E02000258" "E02000259" "E02000260" "E02000261"
## [256] "E02000262" "E02000263" "E02000264" "E02000265" "E02000266"
## [261] "E02000267" "E02000268" "E02000269" "E02000270" "E02000271"
## [266] "E02000272" "E02000274" "E02000275" "E02000276" "E02000277"
## [271] "E02000278" "E02000279" "E02000280" "E02000281" "E02000282"
## [276] "E02000283" "E02000284" "E02000285" "E02000286" "E02000287"
## [281] "E02000288" "E02000289" "E02000290" "E02000291" "E02000292"
## [286] "E02000293" "E02000294" "E02000295" "E02000296" "E02000297"
## [291] "E02000298" "E02000299" "E02000300" "E02000301" "E02000302"
## [296] "E02000303" "E02000304" "E02000305" "E02000306" "E02000307"
## [301] "E02000308" "E02000309" "E02000311" "E02000312" "E02000313"
## [306] "E02000314" "E02000315" "E02000316" "E02000317" "E02000318"
## [311] "E02000319" "E02000320" "E02000321" "E02000323" "E02000324"
## [316] "E02000326" "E02000327" "E02000328" "E02000329" "E02000331"
## [321] "E02000332" "E02000333" "E02000334" "E02000335" "E02000337"
## [326] "E02000339" "E02000340" "E02000341" "E02000342" "E02000343"
## [331] "E02000344" "E02000345" "E02000346" "E02000347" "E02000348"
## [336] "E02000350" "E02000351" "E02000352" "E02000353" "E02000354"
## [341] "E02000355" "E02000356" "E02000357" "E02000358" "E02000359"
## [346] "E02000360" "E02000361" "E02000362" "E02000363" "E02000364"
## [351] "E02000365" "E02000366" "E02000367" "E02000368" "E02000369"
## [356] "E02000370" "E02000371" "E02000372" "E02000373" "E02000374"
## [361] "E02000375" "E02000376" "E02000377" "E02000378" "E02000379"
## [366] "E02000380" "E02000381" "E02000382" "E02000383" "E02000384"
## [371] "E02000385" "E02000386" "E02000387" "E02000388" "E02000389"
## [376] "E02000390" "E02000391" "E02000392" "E02000393" "E02000394"
## [381] "E02000395" "E02000396" "E02000397" "E02000398" "E02000400"
## [386] "E02000401" "E02000402" "E02000403" "E02000404" "E02000405"
## [391] "E02000406" "E02000407" "E02000408" "E02000409" "E02000410"
## [396] "E02000411" "E02000412" "E02000413" "E02000414" "E02000415"
## [401] "E02000416" "E02000417" "E02000418" "E02000419" "E02000420"
## [406] "E02000421" "E02000422" "E02000423" "E02000424" "E02000425"
## [411] "E02000426" "E02000427" "E02000428" "E02000429" "E02000430"
## [416] "E02000431" "E02000432" "E02000433" "E02000434" "E02000435"
## [421] "E02000436" "E02000437" "E02000438" "E02000439" "E02000440"
## [426] "E02000441" "E02000442" "E02000443" "E02000444" "E02000445"
## [431] "E02000447" "E02000448" "E02000449" "E02000451" "E02000452"
## [436] "E02000453" "E02000454" "E02000455" "E02000456" "E02000457"
## [441] "E02000459" "E02000460" "E02000461" "E02000462" "E02000463"
## [446] "E02000464" "E02000465" "E02000466" "E02000467" "E02000468"
## [451] "E02000469" "E02000470" "E02000471" "E02000472" "E02000473"
## [456] "E02000474" "E02000475" "E02000476" "E02000477" "E02000478"
## [461] "E02000479" "E02000480" "E02000481" "E02000482" "E02000483"
## [466] "E02000484" "E02000485" "E02000486" "E02000487" "E02000488"
## [471] "E02000489" "E02000490" "E02000491" "E02000492" "E02000493"
## [476] "E02000494" "E02000495" "E02000496" "E02000497" "E02000498"
## [481] "E02000499" "E02000500" "E02000501" "E02000502" "E02000503"
## [486] "E02000504" "E02000506" "E02000507" "E02000508" "E02000509"
## [491] "E02000510" "E02000511" "E02000512" "E02000513" "E02000514"
## [496] "E02000515" "E02000516" "E02000517" "E02000518" "E02000519"
## [501] "E02000520" "E02000521" "E02000522" "E02000523" "E02000524"
## [506] "E02000525" "E02000526" "E02000528" "E02000529" "E02000530"
## [511] "E02000531" "E02000532" "E02000533" "E02000534" "E02000535"
## [516] "E02000536" "E02000537" "E02000538" "E02000539" "E02000540"
## [521] "E02000541" "E02000542" "E02000543" "E02000544" "E02000545"
## [526] "E02000546" "E02000547" "E02000548" "E02000549" "E02000550"
## [531] "E02000551" "E02000552" "E02000553" "E02000554" "E02000555"
## [536] "E02000556" "E02000557" "E02000558" "E02000559" "E02000560"
## [541] "E02000561" "E02000562" "E02000563" "E02000564" "E02000565"
## [546] "E02000566" "E02000567" "E02000568" "E02000569" "E02000570"
## [551] "E02000571" "E02000572" "E02000573" "E02000574" "E02000575"
## [556] "E02000576" "E02000577" "E02000578" "E02000579" "E02000580"
## [561] "E02000581" "E02000582" "E02000583" "E02000584" "E02000585"
## [566] "E02000586" "E02000587" "E02000588" "E02000589" "E02000590"
## [571] "E02000591" "E02000592" "E02000593" "E02000594" "E02000595"
## [576] "E02000596" "E02000597" "E02000598" "E02000599" "E02000600"
## [581] "E02000601" "E02000602" "E02000603" "E02000604" "E02000605"
## [586] "E02000606" "E02000607" "E02000608" "E02000609" "E02000610"
## [591] "E02000611" "E02000612" "E02000613" "E02000614" "E02000615"
## [596] "E02000616" "E02000617" "E02000619" "E02000620" "E02000621"
## [601] "E02000622" "E02000623" "E02000624" "E02000625" "E02000626"
## [606] "E02000627" "E02000628" "E02000629" "E02000630" "E02000631"
## [611] "E02000632" "E02000633" "E02000634" "E02000635" "E02000636"
## [616] "E02000637" "E02000638" "E02000639" "E02000640" "E02000641"
## [621] "E02000642" "E02000643" "E02000644" "E02000645" "E02000646"
## [626] "E02000647" "E02000648" "E02000649" "E02000650" "E02000651"
## [631] "E02000652" "E02000653" "E02000654" "E02000655" "E02000657"
## [636] "E02000658" "E02000659" "E02000660" "E02000661" "E02000662"
## [641] "E02000663" "E02000664" "E02000665" "E02000666" "E02000667"
## [646] "E02000668" "E02000669" "E02000670" "E02000671" "E02000672"
## [651] "E02000673" "E02000674" "E02000675" "E02000676" "E02000677"
## [656] "E02000678" "E02000679" "E02000680" "E02000681" "E02000682"
## [661] "E02000683" "E02000685" "E02000686" "E02000687" "E02000689"
## [666] "E02000690" "E02000691" "E02000692" "E02000693" "E02000694"
## [671] "E02000695" "E02000696" "E02000697" "E02000698" "E02000699"
## [676] "E02000700" "E02000701" "E02000702" "E02000703" "E02000704"
## [681] "E02000705" "E02000706" "E02000707" "E02000708" "E02000709"
## [686] "E02000710" "E02000711" "E02000712" "E02000713" "E02000714"
## [691] "E02000715" "E02000716" "E02000717" "E02000718" "E02000719"
## [696] "E02000720" "E02000721" "E02000722" "E02000723" "E02000724"
## [701] "E02000725" "E02000726" "E02000727" "E02000728" "E02000729"
## [706] "E02000730" "E02000731" "E02000732" "E02000733" "E02000734"
## [711] "E02000735" "E02000736" "E02000737" "E02000738" "E02000739"
## [716] "E02000740" "E02000741" "E02000742" "E02000743" "E02000744"
## [721] "E02000745" "E02000746" "E02000747" "E02000748" "E02000749"
## [726] "E02000750" "E02000751" "E02000752" "E02000753" "E02000754"
## [731] "E02000755" "E02000756" "E02000757" "E02000758" "E02000759"
## [736] "E02000760" "E02000762" "E02000763" "E02000764" "E02000765"
## [741] "E02000767" "E02000768" "E02000769" "E02000770" "E02000772"
## [746] "E02000773" "E02000774" "E02000776" "E02000777" "E02000779"
## [751] "E02000780" "E02000781" "E02000782" "E02000783" "E02000784"
## [756] "E02000785" "E02000786" "E02000787" "E02000788" "E02000789"
## [761] "E02000790" "E02000791" "E02000792" "E02000793" "E02000794"
## [766] "E02000795" "E02000796" "E02000797" "E02000798" "E02000799"
## [771] "E02000800" "E02000801" "E02000802" "E02000803" "E02000804"
## [776] "E02000805" "E02000806" "E02000807" "E02000808" "E02000809"
## [781] "E02000810" "E02000812" "E02000813" "E02000814" "E02000815"
## [786] "E02000816" "E02000817" "E02000818" "E02000819" "E02000820"
## [791] "E02000821" "E02000822" "E02000823" "E02000824" "E02000825"
## [796] "E02000826" "E02000827" "E02000828" "E02000829" "E02000830"
## [801] "E02000831" "E02000832" "E02000833" "E02000834" "E02000835"
## [806] "E02000836" "E02000837" "E02000838" "E02000839" "E02000840"
## [811] "E02000841" "E02000842" "E02000843" "E02000844" "E02000845"
## [816] "E02000846" "E02000847" "E02000848" "E02000849" "E02000850"
## [821] "E02000851" "E02000852" "E02000853" "E02000854" "E02000855"
## [826] "E02000856" "E02000857" "E02000858" "E02000859" "E02000860"
## [831] "E02000861" "E02000863" "E02000864" "E02000865" "E02000866"
## [836] "E02000867" "E02000868" "E02000869" "E02000870" "E02000871"
## [841] "E02000872" "E02000873" "E02000874" "E02000875" "E02000876"
## [846] "E02000877" "E02000878" "E02000879" "E02000880" "E02000881"
## [851] "E02000882" "E02000883" "E02000884" "E02000885" "E02000886"
## [856] "E02000887" "E02000888" "E02000889" "E02000890" "E02000891"
## [861] "E02000893" "E02000894" "E02000895" "E02000896" "E02000897"
## [866] "E02000898" "E02000899" "E02000900" "E02000901" "E02000902"
## [871] "E02000903" "E02000904" "E02000905" "E02000906" "E02000907"
## [876] "E02000908" "E02000909" "E02000910" "E02000911" "E02000912"
## [881] "E02000913" "E02000914" "E02000915" "E02000916" "E02000917"
## [886] "E02000918" "E02000919" "E02000920" "E02000921" "E02000922"
## [891] "E02000923" "E02000924" "E02000925" "E02000926" "E02000927"
## [896] "E02000928" "E02000929" "E02000930" "E02000931" "E02000932"
## [901] "E02000933" "E02000934" "E02000935" "E02000936" "E02000937"
## [906] "E02000938" "E02000939" "E02000940" "E02000941" "E02000942"
## [911] "E02000943" "E02000944" "E02000945" "E02000946" "E02000947"
## [916] "E02000948" "E02000949" "E02000950" "E02000951" "E02000952"
## [921] "E02000953" "E02000954" "E02000955" "E02000956" "E02000957"
## [926] "E02000958" "E02000959" "E02000960" "E02000961" "E02000962"
## [931] "E02000963" "E02000964" "E02000965" "E02000966" "E02000967"
## [936] "E02000968" "E02000969" "E02000970" "E02000971" "E02000972"
## [941] "E02000973" "E02000974" "E02000975" "E02000976" "E02000977"
## [946] "E02000978" "E02000979" "E02000980" "E02000981" "E02000982"
## [951] "E02000983" "E02006782" "E02006783" "E02006784" "E02006785"
## [956] "E02006786" "E02006787" "E02006788" "E02006789" "E02006791"
## [961] "E02006792" "E02006793" "E02006794" "E02006795" "E02006796"
## [966] "E02006798" "E02006799" "E02006800" "E02006801" "E02006802"
## [971] "E02006836" "E02006853" "E02006854" "E02006882" "E02006918"
## [976] "E02006921" "E02006924" "E02006925" "E02006927" "E02006928"
## [981] "E02006929" "E02006930" "E02006931"
Write csv
write.csv(msoa_cd, file = "/Volumes/ritd-ag-project-rd00lq-jamfe87/GIS_Analysis/dataProcessed/msoa_codes.csv")
Quick map
qtm(msoa)
load Nomis data ‘UK Business Counts - local units by industry and employment size band’
Query summary
Read MSOA csv
msoaC <- read_csv("/Volumes/ritd-ag-project-rd00lq-jamfe87/GIS_Analysis/dataProcessed/msoa_nomis_counts.csv")
## Parsed with column specification:
## cols(
## `2011 super output area - middle layer` = col_character(),
## mnemonic = col_character(),
## row = col_integer(),
## Total = col_integer(),
## `Micro (0 to 9)` = col_integer(),
## `0 to 4` = col_integer(),
## `5 to 9` = col_integer(),
## `Small (10 to 49)` = col_integer(),
## `10 to 19` = col_integer(),
## `20 to 49` = col_integer(),
## `Medium-sized (50 to 249)` = col_integer(),
## `50 to 99` = col_integer(),
## `100 to 249` = col_integer(),
## `Large (250+)` = col_integer(),
## `250 to 499` = col_integer(),
## `500 to 999` = col_integer(),
## `1000+` = col_integer()
## )
Join datasets
names(msoa)
## [1] "MSOA11CD" "MSOA11NM" "LAD11CD" "LAD11NM" "RGN11CD"
## [6] "RGN11NM" "USUALRES" "HHOLDRES" "COMESTRES" "POPDEN"
## [11] "HHOLDS" "AVHHOLDSZ" "geometry"
head(msoa)
## Simple feature collection with 6 features and 12 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: 530966.7 ymin: 180510.7 xmax: 551943.8 ymax: 191139
## epsg (SRID): NA
## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601272 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs
## MSOA11CD MSOA11NM LAD11CD LAD11NM
## 1 E02000001 City of London 001 E09000001 City of London
## 2 E02000002 Barking and Dagenham 001 E09000002 Barking and Dagenham
## 3 E02000003 Barking and Dagenham 002 E09000002 Barking and Dagenham
## 4 E02000004 Barking and Dagenham 003 E09000002 Barking and Dagenham
## 5 E02000005 Barking and Dagenham 004 E09000002 Barking and Dagenham
## 6 E02000007 Barking and Dagenham 006 E09000002 Barking and Dagenham
## RGN11CD RGN11NM USUALRES HHOLDRES COMESTRES POPDEN HHOLDS AVHHOLDSZ
## 1 E12000007 London 7375 7187 188 25.5 4385 1.6
## 2 E12000007 London 6775 6724 51 31.3 2713 2.5
## 3 E12000007 London 10045 10033 12 46.9 3834 2.6
## 4 E12000007 London 6182 5937 245 24.8 2318 2.6
## 5 E12000007 London 8562 8562 0 72.1 3183 2.7
## 6 E12000007 London 8791 8672 119 50.6 3441 2.5
## geometry
## 1 MULTIPOLYGON (((531667.6 18...
## 2 MULTIPOLYGON (((548881.6 19...
## 3 MULTIPOLYGON (((549102.4 18...
## 4 MULTIPOLYGON (((551550 1873...
## 5 MULTIPOLYGON (((549099.6 18...
## 6 MULTIPOLYGON (((549819.9 18...
head(msoaC)
## # A tibble: 6 x 17
## `2011 super out… mnemonic row Total `Micro (0 to 9)` `0 to 4` `5 to 9`
## <chr> <chr> <int> <int> <int> <int> <int>
## 1 City of London … E020000… 1 240 205 170 30
## 2 Barking and Dag… E020000… 2 10 10 10 0
## 3 Barking and Dag… E020000… 3 25 20 15 5
## 4 Barking and Dag… E020000… 4 5 5 5 0
## 5 Barking and Dag… E020000… 5 5 5 5 0
## 6 Barking and Dag… E020000… 6 5 5 5 0
## # ... with 10 more variables: `Small (10 to 49)` <int>, `10 to 19` <int>,
## # `20 to 49` <int>, `Medium-sized (50 to 249)` <int>, `50 to 99` <int>,
## # `100 to 249` <int>, `Large (250+)` <int>, `250 to 499` <int>, `500 to
## # 999` <int>, `1000+` <int>
join1 <- append_data(msoa, msoaC, key.shp = "MSOA11CD", key.data = "mnemonic", ignore.duplicates = TRUE, ignore.na = TRUE)
## Keys match perfectly.
Quick map
Count <- tm_shape(join1) +
tm_polygons("Total",
style="jenks",
palette="BuPu",
title="Manufacturing Count per MSOA",
border.col="white",
border.alpha = 0.1) +
tm_layout(inner.margins = c(0, 0.1, 0.05, 0.2), frame = F) # b, l, t, r
Count
Quick ‘spatial data classification method’ comparison URLs: https://geocompr.robinlovelace.net/adv-map.html
Comp <- tm_shape(join1) +
tm_polygons(c("Total","Total","Total","Total"),
style=c("jenks","pretty", "equal", "quantile"),
palette="BuPu",
title=c("Jenks", "Pretty", "Equal", "Quantile"),
border.col="white",
border.alpha = 0.1) +
tm_layout(inner.margins = c(0, 0.1, 0.05, 0.2), frame = F) +
tm_legend(legend.position = c("right", "bottom"),
main.title = "Manufacturing \nCount per MSOA \nCompare Class.",
main.title.position = "right",
main.title.size=0.9)
tm_layout(inner.margins = c(0, 0.1, 0.05, 0.2), frame = F) # b, l, t, r
## $tm_layout
## $tm_layout$frame
## [1] FALSE
##
## $tm_layout$inner.margins
## [1] 0.00 0.10 0.05 0.20
##
## $tm_layout$style
## [1] NA
##
##
## attr(,"class")
## [1] "tm"
Comp
style = jenks identifies groups of similar values in the data and maximizes the differences between categories.
Load ‘UK Business Counts - enterprises by industry and employment size band’
C : Manufacturing
G : Wholesale and retail trade; repair of motor vehicles and motorcycles
I : Accommodation and food service activities
msoaCI <- read_csv("/Volumes/ritd-ag-project-rd00lq-jamfe87/GIS_Analysis/dataProcessed/msoa_nomis_counts_ind.csv")
## Parsed with column specification:
## cols(
## `2011 super output area - middle layer` = col_character(),
## cd = col_character(),
## `C : Manufacturing` = col_integer(),
## `G : Wholesale and retail trade; repair of motor vehicles and motorcycles` = col_number(),
## `I : Accommodation and food service activities` = col_integer()
## )
Join to MSOAs
join2 <- append_data(join1, msoaCI, key.shp = "MSOA11CD", key.data = "cd", ignore.duplicates = TRUE, ignore.na = TRUE)
## Keys match perfectly.
names(join2)
## [1] "MSOA11CD"
## [2] "MSOA11NM"
## [3] "LAD11CD"
## [4] "LAD11NM"
## [5] "RGN11CD"
## [6] "RGN11NM"
## [7] "USUALRES"
## [8] "HHOLDRES"
## [9] "COMESTRES"
## [10] "POPDEN"
## [11] "HHOLDS"
## [12] "AVHHOLDSZ"
## [13] "X2011.super.output.area...middle.layer"
## [14] "row"
## [15] "Total"
## [16] "Micro..0.to.9."
## [17] "X0.to.4"
## [18] "X5.to.9"
## [19] "Small..10.to.49."
## [20] "X10.to.19"
## [21] "X20.to.49"
## [22] "Medium.sized..50.to.249."
## [23] "X50.to.99"
## [24] "X100.to.249"
## [25] "Large..250.."
## [26] "X250.to.499"
## [27] "X500.to.999"
## [28] "X1000."
## [29] "2011 super output area - middle layer"
## [30] "C : Manufacturing"
## [31] "G : Wholesale and retail trade; repair of motor vehicles and motorcycles"
## [32] "I : Accommodation and food service activities"
## [33] "geometry"
Map of:
UK Business Counts - local units by industry and employment size band (1 ind - Manufacturing)
UK Business Counts - enterprises by industry and employment size band (3 industries - Man, Ret, Food)
suma <- tm_shape(join2) +
tm_polygons(c("Total",
"C : Manufacturing",
"G : Wholesale and retail trade; repair of motor vehicles and motorcycles",
"I : Accommodation and food service activities"),
style="jenks",
palette="PuRd",
auto.palette.mapping=FALSE,
title=c("Local Units \nManufacturing",
"Enterprises \nManufacturing",
"Enterprises Retail",
"Enterprises \nFood Service"),
border.col="white",
border.alpha = 0.1) +
tm_layout(inner.margins = c(0, 0.1, 0.05, 0.2), frame = F) +
tm_legend(legend.position = c("right", "bottom"),
main.title = "Count per MSOA",
main.title.position = "right",
main.title.size=0.9)
## Warning: The argument auto.palette.mapping is deprecated. Please use
## midpoint for numeric data and stretch.palette for categorical data to
## control the palette mapping.
suma
UK Business Counts - local units by industry and employment size band An extract compiled from the Inter Departmental Business Register (IDBR) recording the number of Local Units that were live at a reference date in March, broken down by employment size band, detailed industry (5 digit SIC2007) and legal status. Local Units are individual sites that belong to an Enterprise. Available from country down to mid layer super output area and Scottish intermediate zones.
UK Business Counts - enterprises by industry and employment size band An extract compiled from the Inter Departmental Business Register (IDBR) recording the number of Enterprises that were live at a reference date in March, broken down by employment size band, detailed industry (5 digit SIC2007) and legal status. An Enterprise is the smallest combination of legal units which has a certain degree of autonomy within an Enterprise Group. Available from country down to mid layer super output area and Scottish intermediate zones.
Choice 2km
Percentage Manufacturing Business Register and Employment Survey : open access
Count Manufacturing Business Register and Employment Survey : open access