XEMPLOCGR_2.1.2
Field description | Field abbreviation | Field version | Field length | Field type |
---|---|---|---|---|
Location of employment (region) | XEMPLOCGR | 2.1.2 | 4 | Char |
Valid entries
Dependent fields
- XEMPLOCN
- XWRKLOCGR
Depend upon fields
- ZEMPPCODE
- ZEMPAREA
- EMPCOUNTRY
- EMPPLOC
Additional information
This algorithm uses look-up tables provided from data initially supplied by the Office for National Statistics (ONS). Postcodes (full, outward and area) are mapped to UK government office regions for UK domiciled students where possible. Where the partial postcode matches to a unique UK government office region, these codes should be retained, otherwise set to appropriate country code.
Country codes are returned for other UK and mapped to geographic regions for non-UK domiciled students.
Valid entry Z (Guernsey, Jersey and the Isle of Man) is derived from country entries GG (Guernsey), JE (Jersey), IM (Isle of Man) and XL (Channel Islands not otherwise specified). The smaller Channel Islands of Alderney and Sark are included under the Bailiwick of Guernsey. Officially, the Crown Dependencies of Guernsey, Jersey and the Isle of Man are not part of the UK or the EU. However, for HESA analysis purposes they are often grouped with and generally assumed to be part of the United Kingdom.
Code XF is the National Statistics Country Classification (NSCC) code for England, but is used in this field as England region unknown, when data cannot be assigned to one of the nine England region codes.
The definition of the European Union is as at 1 December in the academic year to which the data relates.
Valid entry NOTK (Not known) includes those for whom location of employment cannot be determined from the information returned and those for whom location information was not provided.
Contains OS data, © Crown copyright and database right 2020
Contains Royal Mail data, © Royal Mail copyright and database right 2020
Source: Office for National Statistics licensed under the Open Government Licence v.3.0
Geographical mappings for Northern Ireland are based upon Crown Copyright and are reproduced with the permission of Land & Property Services under delegated authority from the Keeper of Public Records, © Crown copyright and database right 2020. NIMA MOU577.4
Technical Specification
The algorithm uses the HESA Data Management table D_postcode which is created from the ONS Postcode Directory (ONSPD) and restricted to the November YYYY update (postcode mapping is valid at this date), where YYYY represents the year following the academic year of collection. For graduate outcomes 2017/18, the November 2019 ONSPD data is used. The table includes the following fields: Full Postcode (PostCode, VARCHAR(8)), Outward Postcode (OutwardPostcode, VARCHAR(4)), Area Postcode (AreaCode, VARCHAR(2)), County/Region/Unitary Authority/Local Government District code (DomicileCode, VARCHAR(4)) and Government Office Region code (RegionCode, VARCHAR(2)).
The algorithm uses the HESA Data Management table D_country which is created from an overseas lookup and restricted to the November YYYY update (country mapping is valid at this date), where YYYY represents the year following the academic year of collection. For graduate outcomes 2017/18, the November 2019 ONSPD data is used. The table includes the following fields: Country Code (CountryCode, VARCHAR(2)) and Region Code (GeographicGroupCode, NVARCHAR(4)).
Carry out the following steps, taking a top down approach stopping when criteria is satisfied:
1. If ZEMPPCODE is not 99999999 and the value is found in D_PostCode.PostCode, then return D_PostCode.RegionCode.
2. If ZEMPAREA is not NOTK and the value is found in D_PostCode.DomicileCode and D_PostCode.DomicileCode is not XF, XG, XH or XI return D_PostCode.RegionCode.
3. If ZEMPPCODE is not 99999999 and the outward part of the postcode up to the first space (if there is one - maximum of 4 characters) is a value in D_PostCode.OutwardPostcode and maps to a single value in D_PostCode.DomicileCode (excluding domicile codes XF, XG, XH and XI), then return D_PostCode.RegionCode.
4. If ZEMPPCODE is not 99999999 and the postcode area (maximum of 2 characters) is a value in D_PostCode.PostcodeArea and maps to a single value in D_PostCode.DomicileCode (excluding domicile codes XF, XG, XH and XI) then return D_PostCode.RegionCode.
5. If ZEMPAREA equals one of the following values XF, XG, XH, XI then return ZEMPAREA.
6. If ZEMPAREA equals one of the following values XL, IM then return Z.
7. If ZEMPAREA equals one of the following values A, B, D, E, F, G, H, J, K then return ZEMPAREA.
8. If ZEMPAREA equals Z then return Z.
9. If ZEMPPCODE is not 99999999 and the outward part of the postcode up to the first space (if there is one - maximum of 4 characters) is a value in D_PostCode.OutwardPostcode and maps to a single value in D_PostCode.RegionCode equal to A, B, D, E, F, G, H, J, K or Z then return D_PostCode.RegionCode.
10. If ZEMPPCODE is not 99999999 and the outward part of the postcode up to the first space (if there is one - maximum of 4 characters) is a value in D_PostCode.OutwardPostcode and maps to a single value in D_PostCode.RegionCode not in A, B, D, E, F, G, H, J, K or Z then return D_PostCode.RegionCode.
11. If ZEMPPCODE is not 99999999 and the postcode area (maximum of 2 characters) is a value in D_PostCode.PostcodeArea and maps to a single value in D_PostCode.RegionCode equal to A, B, D, E, F, G, H, J, K or Z then return D_PostCode.RegionCode.
12. If ZEMPPCODE is not 99999999 and the postcode area (maximum of 2 characters) is a value in D_PostCode.PostcodeArea and maps to a single value in D_PostCode.RegionCode not in A, B, D, E, F, G, H, J, K or Z then return D_PostCode.RegionCode.
13. If EMPCOUNTRY is GG, JE, XL or IM then return Z.
14. If EMPCOUNTRY is not 'OTHER' and in D_Country.CountryCode, then return D_Country.GeographicGroupCode.
15. If EMPCOUNTRY is not 'OTHER' and equal in D_Country.GeographicGroupCode, then return D_Country.GeographicGroupCode.
16. If EMPPLOC is not NULL or empty string then match EMPPLOC value to corresponding country code.
17. Else, set to NOTK.
Carry out processing top down:
ZEMPPCODE (CHAR 8) | ZEMPAREA (CHAR 4) | EMPCOUNTRY (CHAR 2) | EMPPLOC (CHAR 2) | XEMPLOCGR |
---|---|---|---|---|
If ZEMPPCODE is a value in D_PostCode.PostCode | D_PostCode.RegionCode | |||
If ZEMPAREA is a value found in D_PostCode.DomicileCode and D_PostCode.DomicileCode is not XF, XG, XH or XI | D_PostCode.RegionCode | |||
If the outward part of ZEMPPCODE is a value in D_PostCode.OutwardPostcode and maps to a single value in D_PostCode.DomicileCode (excluding domicile codes XF, XG, XH and XI) | D_PostCode.RegionCode | |||
If the postcode area of ZEMPPCODE is in D_PostCode.PostcodeArea and maps to a single value in D_PostCode.DomicileCode (excluding domicile codes XF, XG, XH and XI) | D_PostCode.RegionCode | |||
If ZEMPAREA equals one of the following values XF, XG, XH, XI | ZEMPAREA | |||
If ZEMPAREA equals one of the following values XL, IM | Z | |||
If ZEMPAREA equals one of the following values A, B, D, E, F, G, H, J, K | ZEMPAREA | |||
If ZEMPAREA equals Z | Z | |||
If the outward part of ZEMPPCODE is a value in D_PostCode.OutwardPostcode and maps to a single value in D_PostCode.RegionCode equal to A, B, D, E, F, G, H, J, K or Z | D_PostCode.RegionCode | |||
If the outward part of ZEMPPCODE is a value in D_PostCode.OutwardPostcode and maps to a single value in D_PostCode.RegionCode not in A, B, D, E, F, G, H, J, K or Z | D_PostCode.RegionCode | |||
If the postcode area of ZEMPPCODE is in D_PostCode.PostcodeArea and maps to a single value in D_PostCode.RegionCode equal to A, B, D, E, F, G, H, J, K or Z | D_PostCode.RegionCode | |||
If the postcode area of ZEMPPCODE is in D_PostCode.PostcodeArea and maps to a single value in D_PostCode.RegionCode not in A, B, D, E, F, G, H, J, K or Z | D_PostCode.RegionCode | |||
If EMPCOUNTRY equals one of the following values GG, JE, XL or IM | Z | |||
If EMPCOUNTRY found in D_Country.CountryCode | D_Country.GeographicGroupCode | |||
If EMPCOUNTRY found in D_Country.GeographicGroupCode | D_Country.GeographicGroupCode | |||
01 | XF | |||
02 | XH | |||
03 | XI | |||
04 | XG | |||
05 | OS | |||
06 | Z | |||
NULL or empty string | NOTK |
Once the above process has been carried out, a second level of refinement is carried out where ZEMPPCODE is not a full valid postcode and any of the following hold:
- ZEMPAREA = NOTK
- ZEMPAREA is less than 4 characters
- ZEMPPCODE is a partial postcode
A sequence of more complex steps, as detailed below are performed:
If a valid outward postcode has been supplied, map to the county / unitary authority code which contains the largest number of full postcodes with the same outward part.
For graduates who have supplied full postcode information and area information in the current and previous Graduate Outcome collections, create a look-up file between area name and county / unitary authority. Exclude mappings for which the same free text has been mapped to several different county / unitary authorities or for which a single graduate has been mapped. For the remaining, where the same free text has been mapped to multiple county / unitary authorities, retain the mapping with the highest number of graduates.
This mapping file is used to map data for graduates for which area information has been provided without valid postcode information, but hasn’t been mapped to a county / unitary authority. Where there is a full match on the area data, the county / unitary authority information from the mapping file is used. Where the area information supplied by the graduate contains the area information from the mapping file and a single county / unitary authority can be identified, this information is used.
Where area names appear in the data multiple times and haven’t been mapped or where there are common spelling mistakes, where possible these are mapped to the appropriate county / unitary authority, the knowledge from which will be used for future mappings.
Finally, manual consistency checks are carried out across the dataset and county / unitary authority information updated where appropriate. Note that where a valid postcode has been returned in addition to area information and they appear to contradict, the postcode information takes priority.
The mapped county / unitary information is used to set or update the associated government office region and country derivations.
Revision history
Contact Liaison by email or on +44 (0)1242 388 531.