Skip to content

Errors when using ONS codes for some geographic areas #24

@cassier-barton

Description

@cassier-barton

There seems to be an issue with nomisr not returning data for certain types of geographic area.

I've been using ONS 9-digit codes to specify 'geography' within the nomis_get_data function (e.g. E92000001 for England) and this normally works great. But for certain geographic areas, it returns an error message.

For example, using the 9-digit code for the Abberton built-up area...

nomis_get_data(id = "NM_2010_1", geography = "E34003718", date = "latest")

... results in the following error message:

Error in if (as.numeric(first_df$RECORD_COUNT)[1] >= max_length) { :
missing value where TRUE/FALSE needed
In addition: Warning message:
Unknown or uninitialised column: RECORD_COUNT.

As far as I can tell this happens for all built-up areas, built-up area subdivisions, wards (post-2011), 'major towns and cities', CCGs and local health boards. I've been looking at this mostly using Nomis' small area based population estimates, but it looks like the the same issue applies with census tables as well.

Thanks for developing nomisr - it's extremely useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions