Skip to content

Commit

Permalink
WIP: Import script updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-griffen committed Nov 2, 2023
1 parent fb2619d commit 87105c0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions hub/management/commands/import_mp_job_titles.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ def create_data_type(self):
name="job_titles",
defaults={
"data_type": "text",
"description": "Positions such as cabinet and shadow minister roles, spokespeople, and whips",
"description": "Positions such as cabinet and shadow minister roles, spokespeople, and whips.",
"release_date": "December 2022",
"label": "MP positions (job titles)",
"source_label": "Green Alliance",
"source_label": "Data from Green Alliance.",
"source": "https://green-alliance.org.uk/",
"table": "person__persondata",
"comparators": DataSet.string_comparators(),
Expand Down
3 changes: 2 additions & 1 deletion hub/management/commands/import_national_trust_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class Command(BaseImportFromDataFrameCommand):
"data_type": "integer",
"category": "movement",
"subcategory": "supporters_and_activists",
"source_label": "National Trust",
"release_date": "March 2023",
"source_label": "Data from National Trust.",
"source": "https://www.nationaltrust.org.uk/",
"source_type": "google sheet",
"table": "areadata",
Expand Down
6 changes: 4 additions & 2 deletions hub/management/commands/import_nt_property_locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ class Command(BaseAreaImportCommand):
"description": "Names of National Trust properties",
"data_type": "json",
"category": "movement",
"release_date": "March 2023",
"subcategory": "locations",
"source_label": "National Trust",
"source_label": "Data from National Trust.",
"source": "https://www.nationaltrust.org.uk/",
"source_type": "json",
"data_url": "",
Expand All @@ -32,8 +33,9 @@ class Command(BaseAreaImportCommand):
"label": "Number of National Trust properties",
"description": "Number of National Trust properties",
"data_type": "integer",
"release_date": "March 2023",
"category": "movement",
"source_label": "National Trust",
"source_label": "Data from National Trust.",
"source": "https://www.nationaltrust.org.uk/",
"source_type": "json",
"data_url": "",
Expand Down
5 changes: 4 additions & 1 deletion hub/management/commands/import_onshore_windfarms.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from datetime import date

from django.conf import settings

from hub.models import AreaData, DataSet
Expand All @@ -18,7 +20,8 @@ class Command(BaseConstituencyCountImportCommand):
"description": "Number of onshore windfarms",
"data_type": "integer",
"category": "place",
"source_label": "Wikipedia",
"release_date": str(date.today()),
"source_label": "Data from Wikipedia.",
"source": "https://en.wikipedia.org/wiki/List_of_onshore_wind_farms_in_the_United_Kingdom",
"source_type": "api",
"data_url": "https://en.wikipedia.org/wiki/List_of_onshore_wind_farms_in_the_United_Kingdom",
Expand Down

0 comments on commit 87105c0

Please sign in to comment.