6  Index of Multiple Deprivation (IMD)

7 Index of Multiple Deprivation

The latest available IMD data for England is from 2019.

IMD is very useful for categorising the area a person lives in for deprivation. Deprivation is by country and do not include the other nations. Deciles are the most commonly used way of referring to IMD and are taken from the scores which are ordered and then cut into 10. For deciles the 1 is the most deprived area and 10 is the least deprived.

Wikipedia link
English IMD 2015 - Guidance

8 Finding the IMD for an address

To get IMD scores or deciles for a local data a join will be needed to the postcode table (like a directory of postcodes) found:

https://digital.nhs.uk/services/organisation-data-service/data-downloads/ods-postcode-files

and then to the IMD data:

https://www.gov.uk/government/statistics/english-indices-of-deprivation-2019

  • Select File 7 for the dataset.

Other data is available from this dataset including IDAOPI which relates to only older people.

Note that the column headers change, in 2015 it was LADistrictCode2013 and in 2019 it is LADistrictCode2019. Also LADistrictName2013 has become LADistrictName2019.

8.0.1 Postcode spaces

Postcode lengths vary in original data depending on whether one or two spaces are used between the parts. Consequently, it is always better when joining by postcodes to remove the spaces altogether.

In SQL this would be with the code:

REPLACE(postcode, ' ', '')

in R it can be

postcode <- "NG16 1AA"

# base R
gsub(" ", "", postcode)
[1] "NG161AA"
# {stringr} also available in {tidyverse}
stringr::str_remove(postcode, " ")
[1] "NG161AA"

8.0.2 Partial postcodes

Partial postcodes are sometimes provided to protect the data and may be the first part (before spaces) and 1 or 2 characters from the second part. This will not give a sufficiently reliable IMD score.

9 Example join code (SQL)

To get the IMD score the LSOA (Lower Super Output Area) code is required which is taken from the full postcode.

This code will not run and is dependent on the naming conventions of the SQL server. The column names of LSOA11 and LSOAcode2011 will have come from the data sources. The column PostCode_space has been added to the original data.

SELECT imd.*
FROM DIM_AI.PatientData AS p
LEFT JOIN DIM_AI.PostCodes AS pc ON p.PostCode = pc.PostCode_space
LEFT JOIN DIM_AI.IMD AS i ON pc.PC.LSOA11 = i.LSOAcode2011

10 Creating quintiles

To be able to join to the data scores will need to be put into quintiles (group of 5) rather than deciles (group of 10). Where the number of areas divides into the number of quintiles an equal number of areas can be assigned to each quintile. When it does not divide however, a choice must be made as to which quintiles should have a larger number of areas. The Office of Health Improvement & Disparities recommends using the following approach in their Technical Guide to Assigning Deprivation Categories:

  • Divide the number of small areas within the higher geography by the number of deprivation categories required (up to a maximum of 10), giving an integer and fractional part.

  • The integer-part of this number represents the minimum number of small areas that will be assigned to each deprivation category within each higher geography.

  • The below tables then shows which deprivation categories should be assigned additional small areas based on the fractional part of this number and the number of quintiles being used.

Deciles
Number after decimal point Deciles receiving an extra area
0.0 None
0.1 1
0.2 1, 6
0.3 1, 4, 7
0.4 1, 3, 6, 8
0.5 1, 3, 5, 7, 9
0.6 1, 2, 4, 6, 7, 9
0.7 1, 2, 3, 5, 6, 8, 9
0.8 1, 2, 3, 4, 6, 7, 8, 9
Quintiles
Number after decimal point Quintiles receiving an extra area
0.0 None
0.2 1
0.4 1, 3
0.6 1, 2, 4
0.8 1, 2, 3, 4
Quantiles
Number after decimal point Quantiles receiving an extra area
0.00 None
0.25 1
0.50 1, 3
0.75 1, 2, 3

10.0.1 Quintiles in SQL

SELECT DISTINCT IMDDecile,
FLOOR((IMDDecile-1)/2) + 1 AS IMDQuintile
FROM DIM_AI.IMD
ORDER BY IMDDecile

10.0.2 Quintiles in R

The PHEindicatormethods provides a convenient function that can be used in R to generate quintiles.

df <- data.frame(
  region = as.character(rep(c("Region1","Region2","Region3","Region4"),
                               each=250)),
  smallarea = as.character(paste0("Area",seq_along(1:1000))),
  vals = as.numeric(sample(200, 1000, replace = TRUE)),
  stringsAsFactors = FALSE)

# assign small areas to deciles across whole data frame
PHEindicatormethods::phe_quantile(df, vals, type = "standard")
      region smallarea vals quantile
1    Region1     Area1   72        7
2    Region1     Area2   36        8
3    Region1     Area3  174        2
4    Region1     Area4  132        4
5    Region1     Area5  124        4
6    Region1     Area6  112        5
7    Region1     Area7  183        1
8    Region1     Area8  146        3
9    Region1     Area9  161        2
10   Region1    Area10  156        3
11   Region1    Area11    8       10
12   Region1    Area12  115        5
13   Region1    Area13   58        7
14   Region1    Area14  190        1
15   Region1    Area15  130        4
16   Region1    Area16  139        3
17   Region1    Area17   14       10
18   Region1    Area18    7       10
19   Region1    Area19   11       10
20   Region1    Area20  103        5
21   Region1    Area21  107        5
22   Region1    Area22   58        7
23   Region1    Area23    6       10
24   Region1    Area24   73        7
25   Region1    Area25  182        1
26   Region1    Area26  194        1
27   Region1    Area27  182        1
28   Region1    Area28  156        3
29   Region1    Area29  119        4
30   Region1    Area30   52        8
31   Region1    Area31  199        1
32   Region1    Area32   19        9
33   Region1    Area33  123        4
34   Region1    Area34   73        7
35   Region1    Area35   11       10
36   Region1    Area36   76        6
37   Region1    Area37    5       10
38   Region1    Area38  141        3
39   Region1    Area39  134        4
40   Region1    Area40   48        8
41   Region1    Area41  194        1
42   Region1    Area42   59        7
43   Region1    Area43   29        9
44   Region1    Area44   42        8
45   Region1    Area45  145        3
46   Region1    Area46  130        4
47   Region1    Area47  194        1
48   Region1    Area48   99        5
49   Region1    Area49  152        3
50   Region1    Area50  163        2
51   Region1    Area51  173        2
52   Region1    Area52   30        9
53   Region1    Area53  143        3
54   Region1    Area54  114        5
55   Region1    Area55  166        2
56   Region1    Area56  193        1
57   Region1    Area57   36        8
58   Region1    Area58   33        9
59   Region1    Area59   36        8
60   Region1    Area60   47        8
61   Region1    Area61   58        7
62   Region1    Area62  134        4
63   Region1    Area63  112        5
64   Region1    Area64  130        4
65   Region1    Area65   31        9
66   Region1    Area66   28        9
67   Region1    Area67  127        4
68   Region1    Area68   36        8
69   Region1    Area69  109        5
70   Region1    Area70  177        2
71   Region1    Area71   35        9
72   Region1    Area72   79        6
73   Region1    Area73  101        5
74   Region1    Area74   45        8
75   Region1    Area75  161        2
76   Region1    Area76  181        2
77   Region1    Area77  194        1
78   Region1    Area78  140        3
79   Region1    Area79  174        2
80   Region1    Area80   69        7
81   Region1    Area81   80        6
82   Region1    Area82  136        4
83   Region1    Area83  197        1
84   Region1    Area84  180        2
85   Region1    Area85  186        1
86   Region1    Area86  177        2
87   Region1    Area87  129        4
88   Region1    Area88   14       10
89   Region1    Area89  114        5
90   Region1    Area90  175        2
91   Region1    Area91   93        6
92   Region1    Area92   13       10
93   Region1    Area93  173        2
94   Region1    Area94   36        8
95   Region1    Area95  152        3
96   Region1    Area96   54        8
97   Region1    Area97  162        2
98   Region1    Area98   63        7
99   Region1    Area99   99        5
100  Region1   Area100   46        8
101  Region1   Area101   68        7
102  Region1   Area102  142        3
103  Region1   Area103   28        9
104  Region1   Area104  174        2
105  Region1   Area105    5       10
106  Region1   Area106  136        4
107  Region1   Area107   80        6
108  Region1   Area108   18        9
109  Region1   Area109   98        5
110  Region1   Area110   19        9
111  Region1   Area111   49        8
112  Region1   Area112  198        1
113  Region1   Area113  153        3
114  Region1   Area114   44        8
115  Region1   Area115   70        7
116  Region1   Area116   55        7
117  Region1   Area117   85        6
118  Region1   Area118  101        5
119  Region1   Area119  172        2
120  Region1   Area120  155        3
121  Region1   Area121  134        4
122  Region1   Area122  161        2
123  Region1   Area123   28        9
124  Region1   Area124  177        2
125  Region1   Area125  129        4
126  Region1   Area126  193        1
127  Region1   Area127  181        2
128  Region1   Area128   84        6
129  Region1   Area129   29        9
130  Region1   Area130   12       10
131  Region1   Area131   19        9
132  Region1   Area132   77        6
133  Region1   Area133   53        8
134  Region1   Area134   69        7
135  Region1   Area135  139        3
136  Region1   Area136   64        7
137  Region1   Area137   33        9
138  Region1   Area138  191        1
139  Region1   Area139    1       10
140  Region1   Area140   90        6
141  Region1   Area141  175        2
142  Region1   Area142  121        4
143  Region1   Area143   36        8
144  Region1   Area144   18        9
145  Region1   Area145  156        3
146  Region1   Area146   64        7
147  Region1   Area147  191        1
148  Region1   Area148   82        6
149  Region1   Area149  178        2
150  Region1   Area150   19        9
151  Region1   Area151  187        1
152  Region1   Area152  199        1
153  Region1   Area153   57        7
154  Region1   Area154   33        9
155  Region1   Area155  107        5
156  Region1   Area156  193        1
157  Region1   Area157    6       10
158  Region1   Area158  189        1
159  Region1   Area159  120        4
160  Region1   Area160   65        7
161  Region1   Area161  139        3
162  Region1   Area162   49        8
163  Region1   Area163  200        1
164  Region1   Area164  183        1
165  Region1   Area165   29        9
166  Region1   Area166  181        2
167  Region1   Area167   15       10
168  Region1   Area168    5       10
169  Region1   Area169    5       10
170  Region1   Area170   66        7
171  Region1   Area171  103        5
172  Region1   Area172  175        2
173  Region1   Area173  168        2
174  Region1   Area174  107        5
175  Region1   Area175   53        8
176  Region1   Area176   41        8
177  Region1   Area177  198        1
178  Region1   Area178   58        7
179  Region1   Area179   70        7
180  Region1   Area180   96        5
181  Region1   Area181   79        6
182  Region1   Area182  142        3
183  Region1   Area183  113        5
184  Region1   Area184   41        8
185  Region1   Area185   46        8
186  Region1   Area186  174        2
187  Region1   Area187   10       10
188  Region1   Area188   84        6
189  Region1   Area189   12       10
190  Region1   Area190   42        8
191  Region1   Area191   16       10
192  Region1   Area192  194        1
193  Region1   Area193  148        3
194  Region1   Area194  151        3
195  Region1   Area195  192        1
196  Region1   Area196  153        3
197  Region1   Area197   90        6
198  Region1   Area198  193        1
199  Region1   Area199  188        1
200  Region1   Area200   90        6
201  Region1   Area201  198        1
202  Region1   Area202  183        1
203  Region1   Area203   35        9
204  Region1   Area204  157        3
205  Region1   Area205   88        6
206  Region1   Area206   81        6
207  Region1   Area207   66        7
208  Region1   Area208   36        8
209  Region1   Area209  158        3
210  Region1   Area210   63        7
211  Region1   Area211   29        9
212  Region1   Area212  125        4
213  Region1   Area213  151        3
214  Region1   Area214  169        2
215  Region1   Area215  103        5
216  Region1   Area216   22        9
217  Region1   Area217   73        7
218  Region1   Area218   93        6
219  Region1   Area219   91        6
220  Region1   Area220   38        8
221  Region1   Area221   50        8
222  Region1   Area222   64        7
223  Region1   Area223  126        4
224  Region1   Area224   33        9
225  Region1   Area225   88        6
226  Region1   Area226   15       10
227  Region1   Area227   88        6
228  Region1   Area228  195        1
229  Region1   Area229   16       10
230  Region1   Area230  114        5
231  Region1   Area231   96        5
232  Region1   Area232   27        9
233  Region1   Area233    1       10
234  Region1   Area234   86        6
235  Region1   Area235  107        5
236  Region1   Area236  199        1
237  Region1   Area237  104        5
238  Region1   Area238  198        1
239  Region1   Area239  164        2
240  Region1   Area240  105        5
241  Region1   Area241  177        2
242  Region1   Area242   51        8
243  Region1   Area243   85        6
244  Region1   Area244   76        6
245  Region1   Area245   99        5
246  Region1   Area246   34        9
247  Region1   Area247  150        3
248  Region1   Area248  143        3
249  Region1   Area249   71        7
250  Region1   Area250  116        5
251  Region2   Area251   77        6
252  Region2   Area252  189        1
253  Region2   Area253   57        7
254  Region2   Area254    5       10
255  Region2   Area255    5       10
256  Region2   Area256   47        8
257  Region2   Area257  190        1
258  Region2   Area258  142        3
259  Region2   Area259  176        2
260  Region2   Area260   38        8
261  Region2   Area261  158        3
262  Region2   Area262   97        5
263  Region2   Area263   62        7
264  Region2   Area264  138        4
265  Region2   Area265  108        5
266  Region2   Area266  139        3
267  Region2   Area267   85        6
268  Region2   Area268   13       10
269  Region2   Area269  136        4
270  Region2   Area270  187        1
271  Region2   Area271  101        5
272  Region2   Area272  126        4
273  Region2   Area273   30        9
274  Region2   Area274  183        1
275  Region2   Area275  193        1
276  Region2   Area276  176        2
277  Region2   Area277   29        9
278  Region2   Area278  115        5
279  Region2   Area279  141        3
280  Region2   Area280   59        7
281  Region2   Area281  114        5
282  Region2   Area282   56        7
283  Region2   Area283   26        9
284  Region2   Area284  106        5
285  Region2   Area285   29        9
286  Region2   Area286  156        3
287  Region2   Area287  152        3
288  Region2   Area288   12       10
289  Region2   Area289   86        6
290  Region2   Area290   58        7
291  Region2   Area291  156        3
292  Region2   Area292   77        6
293  Region2   Area293  124        4
294  Region2   Area294  172        2
295  Region2   Area295   56        7
296  Region2   Area296  190        1
297  Region2   Area297   95        6
298  Region2   Area298  143        3
299  Region2   Area299   60        7
300  Region2   Area300    4       10
301  Region2   Area301  133        4
302  Region2   Area302   62        7
303  Region2   Area303  179        2
304  Region2   Area304  183        1
305  Region2   Area305  148        3
306  Region2   Area306  159        3
307  Region2   Area307   75        7
308  Region2   Area308   79        6
309  Region2   Area309  136        4
310  Region2   Area310  164        2
311  Region2   Area311  151        3
312  Region2   Area312   22        9
313  Region2   Area313   64        7
314  Region2   Area314  188        1
315  Region2   Area315   77        6
316  Region2   Area316   39        8
317  Region2   Area317  113        5
318  Region2   Area318   55        7
319  Region2   Area319  110        5
320  Region2   Area320   13       10
321  Region2   Area321  159        3
322  Region2   Area322   88        6
323  Region2   Area323  101        5
324  Region2   Area324    4       10
325  Region2   Area325   85        6
326  Region2   Area326   24        9
327  Region2   Area327  192        1
328  Region2   Area328   39        8
329  Region2   Area329   56        7
330  Region2   Area330  148        3
331  Region2   Area331   88        6
332  Region2   Area332   97        5
333  Region2   Area333  193        1
334  Region2   Area334  108        5
335  Region2   Area335  108        5
336  Region2   Area336   38        8
337  Region2   Area337  135        4
338  Region2   Area338   31        9
339  Region2   Area339  129        4
340  Region2   Area340   45        8
341  Region2   Area341   60        7
342  Region2   Area342   85        6
343  Region2   Area343  120        4
344  Region2   Area344   51        8
345  Region2   Area345  148        3
346  Region2   Area346  172        2
347  Region2   Area347  152        3
348  Region2   Area348    3       10
349  Region2   Area349  190        1
350  Region2   Area350   89        6
351  Region2   Area351    5       10
352  Region2   Area352    8       10
353  Region2   Area353   29        9
354  Region2   Area354  114        5
355  Region2   Area355  113        5
356  Region2   Area356   18        9
357  Region2   Area357   89        6
358  Region2   Area358  195        1
359  Region2   Area359   65        7
360  Region2   Area360  168        2
361  Region2   Area361  179        2
362  Region2   Area362  110        5
363  Region2   Area363   92        6
364  Region2   Area364  139        3
365  Region2   Area365   50        8
366  Region2   Area366   82        6
367  Region2   Area367   64        7
368  Region2   Area368  168        2
369  Region2   Area369  190        1
370  Region2   Area370   53        8
371  Region2   Area371  144        3
372  Region2   Area372  125        4
373  Region2   Area373  139        3
374  Region2   Area374  111        5
375  Region2   Area375    8       10
376  Region2   Area376   91        6
377  Region2   Area377  176        2
378  Region2   Area378  159        3
379  Region2   Area379   56        7
380  Region2   Area380  163        2
381  Region2   Area381   91        6
382  Region2   Area382   42        8
383  Region2   Area383   23        9
384  Region2   Area384   78        6
385  Region2   Area385    6       10
386  Region2   Area386  132        4
387  Region2   Area387  135        4
388  Region2   Area388   74        7
389  Region2   Area389   64        7
390  Region2   Area390   36        8
391  Region2   Area391  191        1
392  Region2   Area392   76        6
393  Region2   Area393  127        4
394  Region2   Area394   45        8
395  Region2   Area395   14       10
396  Region2   Area396   99        5
397  Region2   Area397  200        1
398  Region2   Area398   60        7
399  Region2   Area399   26        9
400  Region2   Area400   64        7
401  Region2   Area401   83        6
402  Region2   Area402  127        4
403  Region2   Area403   85        6
404  Region2   Area404   13       10
405  Region2   Area405   40        8
406  Region2   Area406   76        6
407  Region2   Area407   63        7
408  Region2   Area408   15       10
409  Region2   Area409   90        6
410  Region2   Area410   98        5
411  Region2   Area411   29        9
412  Region2   Area412   68        7
413  Region2   Area413    1       10
414  Region2   Area414   30        9
415  Region2   Area415   22        9
416  Region2   Area416  126        4
417  Region2   Area417   43        8
418  Region2   Area418  169        2
419  Region2   Area419   39        8
420  Region2   Area420    4       10
421  Region2   Area421   43        8
422  Region2   Area422   25        9
423  Region2   Area423   57        7
424  Region2   Area424   15       10
425  Region2   Area425   90        6
426  Region2   Area426  157        3
427  Region2   Area427   46        8
428  Region2   Area428   46        8
429  Region2   Area429  118        4
430  Region2   Area430  172        2
431  Region2   Area431   78        6
432  Region2   Area432  172        2
433  Region2   Area433  162        2
434  Region2   Area434   20        9
435  Region2   Area435  164        2
436  Region2   Area436  121        4
437  Region2   Area437   51        8
438  Region2   Area438  144        3
439  Region2   Area439   62        7
440  Region2   Area440   53        8
441  Region2   Area441   22        9
442  Region2   Area442   96        5
443  Region2   Area443   88        6
444  Region2   Area444   37        8
445  Region2   Area445   36        8
446  Region2   Area446  168        2
447  Region2   Area447   74        7
448  Region2   Area448   87        6
449  Region2   Area449   17       10
450  Region2   Area450  121        4
451  Region2   Area451  197        1
452  Region2   Area452   59        7
453  Region2   Area453   93        6
454  Region2   Area454   46        8
455  Region2   Area455   44        8
456  Region2   Area456  100        5
457  Region2   Area457  165        2
458  Region2   Area458  180        2
459  Region2   Area459   56        7
460  Region2   Area460   38        8
461  Region2   Area461   29        9
462  Region2   Area462  200        1
463  Region2   Area463  132        4
464  Region2   Area464   31        9
465  Region2   Area465  192        1
466  Region2   Area466  170        2
467  Region2   Area467  135        4
468  Region2   Area468   80        6
469  Region2   Area469    4       10
470  Region2   Area470  109        5
471  Region2   Area471   10       10
472  Region2   Area472  170        2
473  Region2   Area473   20        9
474  Region2   Area474  135        4
475  Region2   Area475  105        5
476  Region2   Area476  130        4
477  Region2   Area477   96        5
478  Region2   Area478  124        4
479  Region2   Area479   51        8
480  Region2   Area480   67        7
481  Region2   Area481  104        5
482  Region2   Area482    1       10
483  Region2   Area483  170        2
484  Region2   Area484  141        3
485  Region2   Area485    6       10
486  Region2   Area486    2       10
487  Region2   Area487   94        6
488  Region2   Area488    3       10
489  Region2   Area489   23        9
490  Region2   Area490   99        5
491  Region2   Area491   39        8
492  Region2   Area492   97        5
493  Region2   Area493  180        2
494  Region2   Area494   42        8
495  Region2   Area495   51        8
496  Region2   Area496    1       10
497  Region2   Area497  188        1
498  Region2   Area498   44        8
499  Region2   Area499   39        8
500  Region2   Area500  141        3
501  Region3   Area501   48        8
502  Region3   Area502   47        8
503  Region3   Area503  157        3
504  Region3   Area504  164        2
505  Region3   Area505   74        7
506  Region3   Area506   24        9
507  Region3   Area507   68        7
508  Region3   Area508   14       10
509  Region3   Area509  179        2
510  Region3   Area510  105        5
511  Region3   Area511  139        3
512  Region3   Area512  142        3
513  Region3   Area513   28        9
514  Region3   Area514  188        1
515  Region3   Area515  176        2
516  Region3   Area516  198        1
517  Region3   Area517  156        3
518  Region3   Area518    2       10
519  Region3   Area519  168        2
520  Region3   Area520  179        2
521  Region3   Area521  192        1
522  Region3   Area522  134        4
523  Region3   Area523   39        8
524  Region3   Area524   17       10
525  Region3   Area525    1       10
526  Region3   Area526   17       10
527  Region3   Area527    5       10
528  Region3   Area528   52        8
529  Region3   Area529   94        6
530  Region3   Area530  187        1
531  Region3   Area531   78        6
532  Region3   Area532  140        3
533  Region3   Area533   25        9
534  Region3   Area534  193        1
535  Region3   Area535  119        4
536  Region3   Area536  123        4
537  Region3   Area537   15       10
538  Region3   Area538   67        7
539  Region3   Area539  134        4
540  Region3   Area540   99        5
541  Region3   Area541   49        8
542  Region3   Area542  131        4
543  Region3   Area543  125        4
544  Region3   Area544   94        6
545  Region3   Area545  105        5
546  Region3   Area546   44        8
547  Region3   Area547   75        7
548  Region3   Area548   34        9
549  Region3   Area549   18        9
550  Region3   Area550   21        9
551  Region3   Area551  197        1
552  Region3   Area552  160        3
553  Region3   Area553   20        9
554  Region3   Area554   26        9
555  Region3   Area555  174        2
556  Region3   Area556  133        4
557  Region3   Area557   71        7
558  Region3   Area558  122        4
559  Region3   Area559  200        1
560  Region3   Area560  157        3
561  Region3   Area561  113        5
562  Region3   Area562  133        4
563  Region3   Area563   96        5
564  Region3   Area564  138        4
565  Region3   Area565  176        2
566  Region3   Area566    4       10
567  Region3   Area567  129        4
568  Region3   Area568  121        4
569  Region3   Area569   15       10
570  Region3   Area570  129        4
571  Region3   Area571  149        3
572  Region3   Area572   68        7
573  Region3   Area573   29        9
574  Region3   Area574  176        2
575  Region3   Area575  164        2
576  Region3   Area576  150        3
577  Region3   Area577  139        3
578  Region3   Area578  163        2
579  Region3   Area579    4       10
580  Region3   Area580   88        6
581  Region3   Area581  161        2
582  Region3   Area582  128        4
583  Region3   Area583   21        9
584  Region3   Area584   69        7
585  Region3   Area585  176        2
586  Region3   Area586  147        3
587  Region3   Area587  167        2
588  Region3   Area588  190        1
589  Region3   Area589   14       10
590  Region3   Area590   84        6
591  Region3   Area591  200        1
592  Region3   Area592  141        3
593  Region3   Area593   75        7
594  Region3   Area594   42        8
595  Region3   Area595  191        1
596  Region3   Area596   57        7
597  Region3   Area597  175        2
598  Region3   Area598    9       10
599  Region3   Area599   33        9
600  Region3   Area600  139        3
601  Region3   Area601  150        3
602  Region3   Area602  196        1
603  Region3   Area603  154        3
604  Region3   Area604    5       10
605  Region3   Area605   35        9
606  Region3   Area606  193        1
607  Region3   Area607   73        7
608  Region3   Area608   86        6
609  Region3   Area609   31        9
610  Region3   Area610   26        9
611  Region3   Area611   58        7
612  Region3   Area612   78        6
613  Region3   Area613  190        1
614  Region3   Area614   47        8
615  Region3   Area615  183        1
616  Region3   Area616  163        2
617  Region3   Area617   58        7
618  Region3   Area618   28        9
619  Region3   Area619   79        6
620  Region3   Area620  194        1
621  Region3   Area621  101        5
622  Region3   Area622   33        9
623  Region3   Area623  191        1
624  Region3   Area624  119        4
625  Region3   Area625  150        3
626  Region3   Area626  131        4
627  Region3   Area627   86        6
628  Region3   Area628  159        3
629  Region3   Area629   22        9
630  Region3   Area630  116        5
631  Region3   Area631   36        8
632  Region3   Area632  126        4
633  Region3   Area633  103        5
634  Region3   Area634   18        9
635  Region3   Area635   39        8
636  Region3   Area636  121        4
637  Region3   Area637   44        8
638  Region3   Area638   75        7
639  Region3   Area639   88        6
640  Region3   Area640   48        8
641  Region3   Area641   80        6
642  Region3   Area642  120        4
643  Region3   Area643  167        2
644  Region3   Area644   46        8
645  Region3   Area645  144        3
646  Region3   Area646   35        9
647  Region3   Area647  189        1
648  Region3   Area648    1       10
649  Region3   Area649   41        8
650  Region3   Area650  170        2
651  Region3   Area651  195        1
652  Region3   Area652   53        8
653  Region3   Area653  155        3
654  Region3   Area654  127        4
655  Region3   Area655    6       10
656  Region3   Area656  181        2
657  Region3   Area657   12       10
658  Region3   Area658   89        6
659  Region3   Area659  178        2
660  Region3   Area660   13       10
661  Region3   Area661  125        4
662  Region3   Area662   88        6
663  Region3   Area663   15       10
664  Region3   Area664   66        7
665  Region3   Area665  127        4
666  Region3   Area666  100        5
667  Region3   Area667   70        7
668  Region3   Area668   83        6
669  Region3   Area669    2       10
670  Region3   Area670  117        4
671  Region3   Area671   36        8
672  Region3   Area672   83        6
673  Region3   Area673    3       10
674  Region3   Area674   72        7
675  Region3   Area675  151        3
676  Region3   Area676  146        3
677  Region3   Area677  118        4
678  Region3   Area678   65        7
679  Region3   Area679   49        8
680  Region3   Area680   80        6
681  Region3   Area681   84        6
682  Region3   Area682   30        9
683  Region3   Area683  178        2
684  Region3   Area684   60        7
685  Region3   Area685  188        1
686  Region3   Area686   62        7
687  Region3   Area687   84        6
688  Region3   Area688   13       10
689  Region3   Area689  175        2
690  Region3   Area690  154        3
691  Region3   Area691  111        5
692  Region3   Area692   35        9
693  Region3   Area693  111        5
694  Region3   Area694   52        8
695  Region3   Area695   86        6
696  Region3   Area696   70        7
697  Region3   Area697   50        8
698  Region3   Area698  178        2
699  Region3   Area699   88        6
700  Region3   Area700  160        3
701  Region3   Area701    1       10
702  Region3   Area702  197        1
703  Region3   Area703   64        7
704  Region3   Area704    8       10
705  Region3   Area705   13       10
706  Region3   Area706  162        2
707  Region3   Area707  173        2
708  Region3   Area708  131        4
709  Region3   Area709  190        1
710  Region3   Area710   20        9
711  Region3   Area711  187        1
712  Region3   Area712   12       10
713  Region3   Area713  170        2
714  Region3   Area714  164        2
715  Region3   Area715  107        5
716  Region3   Area716   63        7
717  Region3   Area717  145        3
718  Region3   Area718  143        3
719  Region3   Area719   33        9
720  Region3   Area720  166        2
721  Region3   Area721  138        4
722  Region3   Area722   88        6
723  Region3   Area723  171        2
724  Region3   Area724   88        6
725  Region3   Area725  159        3
726  Region3   Area726  177        2
727  Region3   Area727  132        4
728  Region3   Area728   57        7
729  Region3   Area729  115        5
730  Region3   Area730   19        9
731  Region3   Area731  167        2
732  Region3   Area732    5       10
733  Region3   Area733   45        8
734  Region3   Area734   10       10
735  Region3   Area735   94        6
736  Region3   Area736   90        6
737  Region3   Area737  186        1
738  Region3   Area738  177        2
739  Region3   Area739  164        2
740  Region3   Area740  183        1
741  Region3   Area741   55        7
742  Region3   Area742  179        2
743  Region3   Area743  109        5
744  Region3   Area744    6       10
745  Region3   Area745  174        2
746  Region3   Area746   23        9
747  Region3   Area747   96        5
748  Region3   Area748   36        8
749  Region3   Area749   32        9
750  Region3   Area750   80        6
751  Region4   Area751    5       10
752  Region4   Area752   32        9
753  Region4   Area753    3       10
754  Region4   Area754  104        5
755  Region4   Area755   81        6
756  Region4   Area756  163        2
757  Region4   Area757  197        1
758  Region4   Area758   57        7
759  Region4   Area759  154        3
760  Region4   Area760   51        8
761  Region4   Area761  102        5
762  Region4   Area762   39        8
763  Region4   Area763  118        4
764  Region4   Area764   41        8
765  Region4   Area765  142        3
766  Region4   Area766   79        6
767  Region4   Area767   29        9
768  Region4   Area768  149        3
769  Region4   Area769   76        6
770  Region4   Area770  161        2
771  Region4   Area771   52        8
772  Region4   Area772  140        3
773  Region4   Area773  158        3
774  Region4   Area774   67        7
775  Region4   Area775    4       10
776  Region4   Area776  109        5
777  Region4   Area777   53        8
778  Region4   Area778  149        3
779  Region4   Area779   26        9
780  Region4   Area780   57        7
781  Region4   Area781  108        5
782  Region4   Area782  118        4
783  Region4   Area783  198        1
784  Region4   Area784  109        5
785  Region4   Area785  165        2
786  Region4   Area786  113        5
787  Region4   Area787   41        8
788  Region4   Area788   67        7
789  Region4   Area789   41        8
790  Region4   Area790   51        8
791  Region4   Area791   79        6
792  Region4   Area792  137        4
793  Region4   Area793   84        6
794  Region4   Area794    8       10
795  Region4   Area795   11       10
796  Region4   Area796  197        1
797  Region4   Area797  146        3
798  Region4   Area798  200        1
799  Region4   Area799   18        9
800  Region4   Area800   12       10
801  Region4   Area801  177        2
802  Region4   Area802   12       10
803  Region4   Area803  190        1
804  Region4   Area804  150        3
805  Region4   Area805  119        4
806  Region4   Area806  138        4
807  Region4   Area807  156        3
808  Region4   Area808   95        6
809  Region4   Area809   26        9
810  Region4   Area810   32        9
811  Region4   Area811   43        8
812  Region4   Area812   29        9
813  Region4   Area813   48        8
814  Region4   Area814   40        8
815  Region4   Area815  187        1
816  Region4   Area816   90        6
817  Region4   Area817   52        8
818  Region4   Area818  127        4
819  Region4   Area819  141        3
820  Region4   Area820  186        1
821  Region4   Area821  157        3
822  Region4   Area822   11       10
823  Region4   Area823   50        8
824  Region4   Area824  117        4
825  Region4   Area825  189        1
826  Region4   Area826  180        2
827  Region4   Area827  161        2
828  Region4   Area828   59        7
829  Region4   Area829   98        5
830  Region4   Area830   82        6
831  Region4   Area831   62        7
832  Region4   Area832  106        5
833  Region4   Area833  193        1
834  Region4   Area834   32        9
835  Region4   Area835   19        9
836  Region4   Area836  182        1
837  Region4   Area837  138        4
838  Region4   Area838   77        6
839  Region4   Area839  156        3
840  Region4   Area840  171        2
841  Region4   Area841  138        4
842  Region4   Area842  153        3
843  Region4   Area843   75        7
844  Region4   Area844   59        7
845  Region4   Area845  128        4
846  Region4   Area846  111        5
847  Region4   Area847   33        9
848  Region4   Area848  167        2
849  Region4   Area849  107        5
850  Region4   Area850   39        8
851  Region4   Area851  184        1
852  Region4   Area852    1       10
853  Region4   Area853  168        2
854  Region4   Area854   22        9
855  Region4   Area855   36        8
856  Region4   Area856  160        3
857  Region4   Area857  193        1
858  Region4   Area858  167        2
859  Region4   Area859   20        9
860  Region4   Area860  122        4
861  Region4   Area861  121        4
862  Region4   Area862    4       10
863  Region4   Area863   79        6
864  Region4   Area864   98        5
865  Region4   Area865  111        5
866  Region4   Area866   71        7
867  Region4   Area867  118        4
868  Region4   Area868  165        2
869  Region4   Area869  114        5
870  Region4   Area870   25        9
871  Region4   Area871   32        9
872  Region4   Area872    6       10
873  Region4   Area873  116        5
874  Region4   Area874   75        7
875  Region4   Area875    7       10
876  Region4   Area876   61        7
877  Region4   Area877   38        8
878  Region4   Area878  156        3
879  Region4   Area879   19        9
880  Region4   Area880   71        7
881  Region4   Area881  109        5
882  Region4   Area882  134        4
883  Region4   Area883   30        9
884  Region4   Area884    8       10
885  Region4   Area885  174        2
886  Region4   Area886   85        6
887  Region4   Area887  133        4
888  Region4   Area888   79        6
889  Region4   Area889   27        9
890  Region4   Area890   20        9
891  Region4   Area891   98        5
892  Region4   Area892  190        1
893  Region4   Area893   23        9
894  Region4   Area894   21        9
895  Region4   Area895    4       10
896  Region4   Area896  145        3
897  Region4   Area897   98        5
898  Region4   Area898  186        1
899  Region4   Area899   92        6
900  Region4   Area900  109        5
901  Region4   Area901  178        2
902  Region4   Area902   78        6
903  Region4   Area903   99        5
904  Region4   Area904  133        4
905  Region4   Area905  111        5
906  Region4   Area906  120        4
907  Region4   Area907  121        4
908  Region4   Area908   41        8
909  Region4   Area909   53        8
910  Region4   Area910  106        5
911  Region4   Area911  192        1
912  Region4   Area912  138        4
913  Region4   Area913  162        2
914  Region4   Area914   32        9
915  Region4   Area915  199        1
916  Region4   Area916   17       10
917  Region4   Area917  146        3
918  Region4   Area918  140        3
919  Region4   Area919  100        5
920  Region4   Area920  121        4
921  Region4   Area921   23        9
922  Region4   Area922  100        5
923  Region4   Area923   39        8
924  Region4   Area924   50        8
925  Region4   Area925  146        3
926  Region4   Area926  153        3
927  Region4   Area927   17       10
928  Region4   Area928   57        7
929  Region4   Area929  108        5
930  Region4   Area930   63        7
931  Region4   Area931  199        1
932  Region4   Area932  128        4
933  Region4   Area933  116        5
934  Region4   Area934   53        8
935  Region4   Area935  186        1
936  Region4   Area936   27        9
937  Region4   Area937   60        7
938  Region4   Area938  139        3
939  Region4   Area939  105        5
940  Region4   Area940  147        3
941  Region4   Area941   51        8
942  Region4   Area942   53        8
943  Region4   Area943    7       10
944  Region4   Area944  186        1
945  Region4   Area945  100        5
946  Region4   Area946  101        5
947  Region4   Area947   99        5
948  Region4   Area948   57        7
949  Region4   Area949    4       10
950  Region4   Area950   38        8
951  Region4   Area951   64        7
952  Region4   Area952   88        6
953  Region4   Area953  110        5
954  Region4   Area954  179        2
955  Region4   Area955  143        3
956  Region4   Area956  143        3
957  Region4   Area957    4       10
958  Region4   Area958   39        8
959  Region4   Area959   77        6
960  Region4   Area960  121        4
961  Region4   Area961  134        4
962  Region4   Area962  111        5
963  Region4   Area963  187        1
964  Region4   Area964   23        9
965  Region4   Area965   99        5
966  Region4   Area966   69        7
967  Region4   Area967  101        5
968  Region4   Area968   69        7
969  Region4   Area969  123        4
970  Region4   Area970  123        4
971  Region4   Area971   79        6
972  Region4   Area972  141        3
973  Region4   Area973  190        1
974  Region4   Area974  143        3
975  Region4   Area975  182        1
976  Region4   Area976   80        6
977  Region4   Area977   51        8
978  Region4   Area978   67        7
979  Region4   Area979  187        1
980  Region4   Area980   79        6
981  Region4   Area981   26        9
982  Region4   Area982   20        9
983  Region4   Area983   32        9
984  Region4   Area984  174        2
985  Region4   Area985  111        5
986  Region4   Area986   68        7
987  Region4   Area987  127        4
988  Region4   Area988   57        7
989  Region4   Area989   26        9
990  Region4   Area990  198        1
991  Region4   Area991  192        1
992  Region4   Area992  133        4
993  Region4   Area993  110        5
994  Region4   Area994  148        3
995  Region4   Area995  171        2
996  Region4   Area996   42        8
997  Region4   Area997  125        4
998  Region4   Area998  165        2
999  Region4   Area999   87        6
1000 Region4  Area1000  100        5

11 Creating local IMDs

In areas like Nottingham/Nottinghamshire the differences between the LSOA areas is diminished when ranked against England as a whole, but when ranked locally, the variation is much more pronounced. It is possible to take the original scores and apply deciles or quintiles to those scores in order to create a local IMD.

11.1 Local IMD creation in SQL

To apply a rank use the windows partition function ROW_NUMBER() OVER(ORDER BY IMDRank) to create a new ranking score and NTILE(10) OVER (ORDER BY IMDRank) to create new deciles.

11.2 Local IMD creation in R

library(tidyverse)
library(PostcodesioR)
library(NHSRpostcodetools) # installed from GitHub not CRAN
library(NHSRpopulation) # installed from GitHub not CRAN
library(janitor)

# Generate random example postcodes
# Restricted to NG postcodes from Nottinghamshire because postcodes are drawn
# from all nations and don't validate within the {NHSRpopulation} package
# currently
postcodes <- purrr::map_chr(
  1:10,
  .f = ~ PostcodesioR::random_postcode("NG16") |>
    purrr::pluck(1)
)

# Create a tibble
tibble_postcodes <- dplyr::tibble(
  random_postcodes = postcodes,
)

NHSRpopulation::get_data(tibble_postcodes, 
                         column = "random_postcodes", 
                         url_type = "imd") |> 
  dplyr::select(random_postcodes,
                new_postcode,
                imd_decile,
                imd_rank,
                imd_score) |> 
  mutate(imd_decile_local = ntile(-imd_score, n = 10)) # creating new deciles from the data provided

11.3 LSOAs - by postcode and by Local Authority/District

Note that the previous code example was a very small selection of
postcodes and would require much more data to create locally derived deciles.

This usually comes from whole LSOA areas that are linked to Local Authorities/ Districts and not via row level data postcodes.

For example, Nottinghamshire Healthcare NHS Foundation Trust covers several Local Authority areas in its services and so organisations like this have to find all the geographic areas that the services cover.

Local Authority and District LSOAs are not in {NHSRpostcodetools} (warning)

Currently (March 2024) the package {NHSRpopulation} which relies upon package for postcodes {NHSRpostcodetools} and a join to the IMD data via LSOAs does not have details for Local Authority LSOAs.

There are two local authorities in the service area of Nottinghamshire Healthcare NHS Foundation Trust: Nottingham City Local Authority and several Nottinghamshire County Council LA areas. # often have their data combined, particularly for the Provider # Trusts like Nottinghamshire Healthcare NHS Foundation Trust.

# Define code for Nottingham City LA
la_code_nott_city <- c("E06000018")

# Adapted from a blog:
# https://cdu-data-science-team.github.io/team-blog/posts/2021-05-14-index-of-multiple-deprivation/#imd-in-sql)
la_code_notts_county <- tibble::tribble(
  ~`LSOAcode2011`, ~`LSOAname2011`, ~`LADistrictCode2019`, ~`LADistrictName2019`,
  "E01013812", "Nottingham 018C", "E06000018", "Nottingham",
  "E01013814", "Nottingham 022B", "E06000018", "Nottingham",
  "E01013810", "Nottingham 018A", "E06000018", "Nottingham",
  "E01013811", "Nottingham 018B", "E06000018", "Nottingham",
  "E01013815", "Nottingham 022C", "E06000018", "Nottingham"
) |> 
  dplyr::select(LSOAcode2011) |> 
  dplyr::pull()

# Combine all districts into one object
la_code_nott_city_notts_county <- c(la_code_nott_city, la_code_notts_county)

la_code_nott_city_notts_county 
[1] "E06000018" "E01013812" "E01013814" "E01013810" "E01013811" "E01013815"

13 Referencing IMD in a paper or research

13.1 Suggested citation text

Ministry of Housing, Communities and Local Government. English Indices of Deprivation 2015. https://www.gov.uk/government/statistics/english-indices-of-deprivation-2019 (Accessed 22 March 2024)