Skip to content

Commit

Permalink
fix the lsip map by aligning projections
Browse files Browse the repository at this point in the history
also chaneg map comment text to say 36 not 38 leps
  • Loading branch information
pauljamesdfe committed Jan 22, 2024
1 parent 953a5df commit 690ca06
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 25 deletions.
Binary file modified Data/AppData/C_Geog.rdata
Binary file not shown.
Binary file modified Data/AppData/CoreIndicators.xlsx
Binary file not shown.
6 changes: 3 additions & 3 deletions Data/AppData/I_DataTable.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"Data​","Source​","Latest period (release date)​","Next period (release date)​"
"Employment volumes","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>","Oct 2022 - Sep 2023 (16/01/24)","Jan 2023 - Dec 2023 (16/04/24)"
"Employment by occupation","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>","Oct 2022 - Sep 2023 (16/01/24)","Jan 2023 - Dec 2023 (16/04/24)"
"Employment by industry","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>","Oct 2022 - Sep 2023 (16/01/24)","Jan 2023 - Dec 2023 (16/04/24)"
"Employment volumes","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>","Jul 2022 - Jun 2023 (24/10/23)","Oct 2022 - Sep 2023 (16/01/24)"
"Employment by occupation","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>","Jul 2022 - Jun 2023 (24/10/23)","Oct 2022 - Sep 2023 (16/01/24)"
"Employment by industry","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>","Jul 2022 - Jun 2023 (24/10/23)","Oct 2022 - Sep 2023 (16/01/24)"
"Further education and skills achievements and participation by provision, level and age group","<a href='https://explore-education-statistics.service.gov.uk/data-catalogue/further-education-and-skills/2022-23'>Individualised Learner Record</a>","Aug 2022 – Jul 2023 (30/11/23)","Aug 2023 – Jul 2024 (Nov 24)"
"Further education and skills achievements by sector subject area","<a href='https://explore-education-statistics.service.gov.uk/data-tables/permalink/93f9aa79-9a67-48d5-e9e2-08dc0dc60f26'>Individualised Learner Record</a>","Aug 2022 – Jul 2023 (30/11/23)","Aug 2023 – Jul 2024 (Nov 24)"
"Highest qualification level by age and gender","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>","Jan 2021 - Dec 2021 (20/04/22)","TBC depending on ONS recoding the qualification framework."
Expand Down
24 changes: 8 additions & 16 deletions Data/AppData/I_DataText.csv
Original file line number Diff line number Diff line change
@@ -1,51 +1,43 @@
"metric","LatestPeriod","subheading","sourceText","dataText","caveatText","mapComment","timeTitle","timeComment","mapPop","breakdownTitle","breakdownComment","LaComment"
"inemploymentRate","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"inemploymentRate","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Figures are for 16-64 year olds.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
</ol>","The employment rate","are employment rates changing","The employment rate in ","Employment rate","employment rates","N/A","Employment rates are "
"selfemployedRate","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"selfemployedRate","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Figures are for 16-64 year olds.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
</ol>","The self-employment rate","are self-employment rates changing","The self-employment rate in ","Self-employment rate","self-employment rates","N/A","Self-employment rates are "
"unemployedRate","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"unemployedRate","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Figures are for 16-64 year olds.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
</ol>","The unemployment rate","are unemployment rates changing","The employment rate in ","Unemployment rate","unemployment rates","N/A","Unemployment rates are "
"inactiveRate","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"inactiveRate","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Figures are for 16-64 year olds.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
</ol>","The inactivity rate","are inactivity rates changing","The inactivity rate in ","Inactivity rate","inactivity rates","N/A","Inactivity rates are "
"inemployment","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"inemployment","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Employment volumes are for 16-64 year olds.</li>
<li>Industry split volumes are for all ages. </li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
<li>Standard Occupational Classification 2020 (SOC2020).</li>
<li>Industry groups are Standard Industrial Classification: SIC 2007.</li>
</ol>","Employment","are employment volumes changing","Employment in","Employment","employment volumes","employment volume share","Employment is"
"selfemployed","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"selfemployed","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Figures are for 16-64 year olds.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
</ol>","Self-employment","are self-employment volumes changing","Self-employment in","Self-employment","self-employment volumes","self-employment volume","Self-employment is"
"unemployed","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"unemployed","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Figures are for 16-64 year olds.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
</ol>","Unemployment","are unemployment volumes changing","Unemployment in","Unemployment","unemployment volumes","unemployment volume","Unemployment is"
"inactive","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
"inactive","Jul 2022 - Jun 2023 data"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Figures are for 16-64 year olds.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
Expand Down
13 changes: 8 additions & 5 deletions TransformData.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,19 @@ neatLA <- I_mapLA %>%
left_join(C_mcalookup %>% mutate(MCA = paste0(CAUTH23NM, " MCA")) %>% select(LAD23CD, MCA), by = c("LAD23CD" = "LAD23CD")) %>%
filter(is.na(LSIP) == FALSE) %>% # remove non England
mutate(MCA = case_when(LEP == "The London Economic Action Partnership LEP" ~ "Greater London Authority MCA", TRUE ~ MCA)) %>% # add on gla as mca
rename(areaName = LAD23NM, areaCode = LAD23CD)
rename(areaName = LAD23NM, areaCode = LAD23CD) %>%
st_transform(4326) # transform to WG84 that leaflet can plot

neatMCA <- I_mapMCA %>%
mutate(geog = "MCA") %>% # add geog type
rename(areaCode = CAUTH22CD, areaName = CAUTH22NM) # consistent naming
rename(areaCode = CAUTH22CD, areaName = CAUTH22NM) %>% # consistent naming
st_transform(4326) # transform to WG84 that leaflet can plot

neatLEP <- I_mapLEP %>%
mutate(geog = "LEP") %>% # add geog type
rename(areaCode = LEP22CD, areaName = LEP22NM) %>% # consistent naming
inner_join(distinct(F_LEP2020, LEP23CD1), by = c("areaCode" = "LEP23CD1")) # remove any areas that are no longer LEPs in 2023 (Black Country and Coventry)
inner_join(distinct(F_LEP2020, LEP23CD1), by = c("areaCode" = "LEP23CD1")) %>% # remove any areas that are no longer LEPs in 2023 (Black Country and Coventry)
st_transform(4326) # transform to WG84 that leaflet can plot

addEngland <- data.frame(
areaName = "England", areaCode = "x",
Expand All @@ -77,6 +80,7 @@ LSIPmap <- bind_cols(LSIPgeojson, F_LEP2020 %>%
neatLSIP <- LSIPmap %>%
rename(areaName = Area, geog = geographic_level) %>%
mutate(areaCode = paste0("LSIP", row_number())) %>%
st_transform(4326) %>%
mutate(
LONG = map_dbl(geometry, ~ st_centroid(.x)[[1]]),
LAT = map_dbl(geometry, ~ st_centroid(.x)[[2]])
Expand Down Expand Up @@ -1038,8 +1042,7 @@ C_Geog <- neatGeog %>%
pivot_wider(names_from = metric, values_from = value)),
by = c("geogConcat" = "geogConcat")
) %>%
rename(employmentProjection = employmentProjectionGrowth2023to2035) %>% # for the emp projections page we use two metrics on different charts. we give them the same name so the filters work
st_transform(4326) # transform to WG84 that leaflet can plot
rename(employmentProjection = employmentProjectionGrowth2023to2035) # for the emp projections page we use two metrics on different charts. we give them the same name so the filters work
save(C_Geog, file = "Data\\AppData\\C_Geog.rdata")

## 4.2 C_time ----
Expand Down
2 changes: 1 addition & 1 deletion server.R
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ server <- function(input, output, session) {
groupCount <- reactive({
validate(need(input$splashGeoType != "", ""))
if (input$splashGeoType == "LEP") {
"38 LEPs."
"36 LEPs."
} else {
if (input$splashGeoType == "MCA") {
"11 MCAs."
Expand Down

0 comments on commit 690ca06

Please sign in to comment.