Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mysociety/politician_data i…
Browse files Browse the repository at this point in the history
…nto main
  • Loading branch information
ajparsons committed Nov 13, 2023
2 parents dadbd08 + 0d8452a commit 281201f
Show file tree
Hide file tree
Showing 20 changed files with 570 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/packages/uk_politician_data/datapackage.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: uk_politician_data
title: UK Politician data
description: "TheyWorkForYou politician data as spreadsheets\n"
version: 0.1.0
version: 0.2.0
licenses:
- name: CC-BY-4.0
path: https://creativecommons.org/licenses/by/4.0/
Expand Down Expand Up @@ -37,3 +37,4 @@ custom:
render: true
change_log:
0.1.0: ''
0.2.0: 'Change in data for resource(s): membership_identifiers,memberships,organization_identifiers,organizations,person_alternative_names,person_identifiers,persons,post_identifiers,posts'
40 changes: 40 additions & 0 deletions data/packages/uk_politician_data/versions/0.2.0/datapackage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: uk_politician_data
title: UK Politician data
description: "TheyWorkForYou politician data as spreadsheets\n"
version: 0.2.0
licenses:
- name: CC-BY-4.0
path: https://creativecommons.org/licenses/by/4.0/
title: Creative Commons Attribution 4.0 International License
contributors:
- title: mySociety
path: https://mysociety.org
role: author
custom:
build: politician_data.download:main
tests:
- test_uk_politician_data
dataset_order: 0
download_options:
gate: default
survey: default
header_text: default
formats:
csv: true
parquet: true
composite:
xlsx:
include: all
exclude: none
render: true
sqlite:
include: all
exclude: none
render: true
json:
include: all
exclude: none
render: true
change_log:
0.1.0: ''
0.2.0: 'Change in data for resource(s): membership_identifiers,memberships,organization_identifiers,organizations,person_alternative_names,person_identifiers,persons,post_identifiers,posts'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
title: Alternative membership identifiers
description: Map between our membership IDs and other schemes
custom:
row_count: 41345
path: membership_identifiers.parquet
name: membership_identifiers
profile: data-resource
scheme: file
format: parquet
hashing: md5
encoding: mac-roman
schema:
fields:
- name: membership_id
type: string
description: The ID of the membership (unique combination of person, post, and
time)
constraints:
unique: false
example: uk.org.publicwhip/lord/100001
- name: identifier
type: string
description: The identifier of the person in the other scheme
constraints:
unique: false
example: '1'
- name: scheme
type: string
description: Alternate ID scheme
constraints:
unique: false
enum:
- datadotparl_id
- historichansard_id
- peeragetype
- pims_id
- wikidata
example: datadotparl_id
hash: 07f1d7400433e9deb533c230afb8f841
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
title: Memberships
description: Table of memberships (a membership is connection between a person, post
and time)
custom:
row_count: 46490
path: memberships.parquet
name: memberships
profile: data-resource
scheme: file
format: parquet
hashing: md5
encoding: utf-8
schema:
fields:
- name: id
type: string
description: The ID of the membership (unique combination of person, post, and
time)
constraints:
unique: true
example: uk.org.publicwhip/lord/100001
- name: person_id
type: string
description: The ID of the person
constraints:
unique: false
example: uk.org.publicwhip/person/10001
- name: organization_id
type: string
description: The ID of the organization this person is a member of (party)
constraints:
unique: false
example: crown
- name: on_behalf_of_id
type: string
description: The ID of the organization this person is a member of (party)
constraints:
unique: false
example: alba
- name: end_date
type: string
description: Date this membership ends
constraints:
unique: false
example: '1803-01-04'
- name: end_reason
type: string
description: Reason for end of membership
constraints:
unique: false
example: became_peer
- name: post_id
type: string
description: The ID of the post (e.g. a seat)
constraints:
unique: false
example: uk.org.publicwhip/cons/1
- name: start_date
type: string
description: Date this membership starts
constraints:
unique: false
example: '1761-03-27'
- name: start_reason
type: string
description: Reason for start of membership
constraints:
unique: false
example: ''
- name: label
type: string
description: The label of the membership
constraints:
unique: false
example: Peer
- name: role
type: string
description: The role of the person in the organization
constraints:
unique: false
example: Counsellor of State
- name: redirect
type: string
description: If one ID remaps to another
constraints:
unique: false
example: uk.org.publicwhip/lord/100001
- name: reason
type: string
description: Additional notes (hardly used)
constraints:
unique: false
example: changed_party
hash: 37ab4acf8e98ef35ee62d962d8acd5e8
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
title: Organization identifiers
description: Map between our organization IDs and other schemes
custom:
row_count: 10
path: organization_identifiers.parquet
name: organization_identifiers
profile: data-resource
scheme: file
format: parquet
hashing: md5
encoding: cp1252
schema:
fields:
- name: organization_id
type: string
description: Our ID of the organization (party)
constraints:
unique: true
enum:
- blaenau-gwent-peoples-voice
- brexit-alliance
- conservative
- independent
- john-marek-independent-party
- labour
- liberal-democrat
- non-attached
- plaid-cymru
- ukip
example: blaenau-gwent-peoples-voice
- name: identifier
type: string
description: The identifier of the organization in the other scheme
constraints:
unique: true
enum:
- Q10647
- Q10691
- Q2415493
- Q327591
- Q4923798
- Q61586635
- Q6246716
- Q9624
- Q9626
- Q9630
example: Q10647
- name: scheme
type: string
description: Alternate ID scheme
constraints:
unique: false
enum:
- wikidata
example: wikidata
hash: e66893264309a7c74c5805f95625c958
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: Organizations
description: List of organizations (parties)
custom:
row_count: 50
path: organizations.parquet
name: organizations
profile: data-resource
scheme: file
format: parquet
hashing: md5
encoding: cp1252
schema:
fields:
- name: classification
type: string
description: The type of organization
constraints:
unique: false
example: party
- name: id
type: string
description: The ID of the organization (party)
constraints:
unique: true
example: alba
- name: name
type: string
description: The name of the organization (party)
constraints:
unique: true
example: Alba
hash: 3b106e01a477cbe8283a5a023363c99b
Binary file not shown.
Loading

0 comments on commit 281201f

Please sign in to comment.