title: Downloading County Shapefile from ONS
body: <p>I'm trying to download the Ultra Generalised Clipped Boundaries from the ONS as defined <a href="https://data.gov.uk/dataset/ea553223-736e-4b9e-9ba3-9fd6280ab5ec/counties-december-2017-ultra-generalised-clipped-boundaries-in-england" rel="nofollow noreferrer">here</a>. I plan to use it to display a Choropleth map with ggplot.</p>
  
  <p>However, I get the message below when I use readOGR.  </p>
  
  <p><em>Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv,  : 
    Cannot open layer</em></p>
  
  <p>The download and unzip seems to be working and it comes up as an ESRI Shape document.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>library(tidyverse)
  library(rgeos)
  library(rgdal)
  library(maptools)
  
  dest_zip_file &lt;- "Counties_December_2017_Ultra_Generalised_Clipped_Boundaries_in_England.zip"
  shape_file_name &lt;- "Counties_December_2017_Ultra_Generalised_Clipped_Boundaries_in_England"
  
  download.file("http://geoportal1-ons.opendata.arcgis.com/datasets/c6404b30a373457e9d87f724dd57585c_4.zip?outSR={%22latestWkid%22:27700,%22wkid%22:27700}",
                dest_zip_file)
  unzip(dest_zip_file, paste0(shape_file_name,".shp"))
  
  county_shapes &lt;- readOGR(dsn = ".",
                           layer = shape_file_name,
                           verbose = TRUE)
  </code></pre>