Skip to content

Commit

Permalink
fixup! import council level IMD data
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Apr 9, 2024
1 parent a22d272 commit b81c5e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hub/management/commands/import_council_imd_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class Command(MultipleAreaTypesMixin, BaseImportFromDataFrameCommand):
do_not_convert = True

data_sets = {
"council_imd": {
"constituency_imd": {
"defaults": {
"source": "https://mysociety.github.io/composite_uk_imd/",
"source_label": "Data from ONS (England and Wales), NRS (Scotland), and NISRA (Northern Ireland), collated and standardised by mySociety.",
"name": "council_imd",
"name": "constituency_imd",
"description": "Deciles of deprivation, from 1 (most deprived) to 10 (least deprived). This uses a composite measure of deprivation (including income, employment, education, skills, health, crime, and housing) standardised across the countries of the UK.",
"label": "Index of Multiple Deprivation (IMD)",
"data_type": "integer",
Expand Down Expand Up @@ -55,10 +55,10 @@ def __init__(self):
done_survey=True,
)

self.data_sets["council_imd"]["defaults"]["data_url"] = url
self.data_sets["constituency_imd"]["defaults"]["data_url"] = url

def get_dataframe(self):
df = pd.read_csv(self.data_sets["council_imd"]["defaults"]["data_url"])
df = pd.read_csv(self.data_sets["constituency_imd"]["defaults"]["data_url"])

df = add_gss_codes(df, "local-authority-code")
df = filter_authority_type(df, self.area_type, self.cons_row)
Expand Down

0 comments on commit b81c5e2

Please sign in to comment.