Skip to content

Commit

Permalink
import GWGW 2022 council event details
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Mar 21, 2024
1 parent 34ddb18 commit cbbf3ab
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions hub/management/commands/import_council_gbgw_events.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from django.conf import settings

from hub.models import DataSet

from .base_importers import BaseConstituencyCountImportCommand, MultipleAreaTypesMixin


class Command(MultipleAreaTypesMixin, BaseConstituencyCountImportCommand):
help = "Import data about number of GBGW events per council"
message = "Importing 2022 GBGW events"
uses_gss = False

data_file = settings.BASE_DIR / "data" / "gbgw_events_processed.csv"
cons_col_map = {
"STC": "STC",
"DIS": "DIS",
}
area_types = ["STC", "DIS"]

data_sets = {
"council_gbgw_2022_event_count": {
"defaults": {
"label": "Number of Great Big Green Week 2022 events",
"release_date": "October 2022",
"data_type": "integer",
"category": "movement",
"subcategory": "events",
"source_label": "Data from The Climate Coalition.",
"source": "https://greatbiggreenweek.com/",
"source_type": "google sheet",
"data_url": "",
"table": "areadata",
"default_value": 10,
"comparators": DataSet.numerical_comparators(),
"unit_type": "raw",
"unit_distribution": "people_in_area",
}
}
}

0 comments on commit cbbf3ab

Please sign in to comment.