Skip to content

Instantly share code, notes, and snippets.

@pudo
Created August 9, 2016 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pudo/1fb6258a5cd30492fa7c7b8bcb04d357 to your computer and use it in GitHub Desktop.
Save pudo/1fb6258a5cd30492fa7c7b8bcb04d357 to your computer and use it in GitHub Desktop.
database: $DATAVAULT_DATABASE_URI
source:
slug: zz_every_politician
title: "EveryPolitician.org"
url: http://everypolitician.org/
tables:
- zz_every_politician
mappings:
politicians:
schema:
$ref: https://schema.occrp.org/generic/person.json#
mapping:
id:
columns:
- zz_every_politician.country_code
- zz_every_politician.person_id
transforms:
- slugify
format: "%s:person:%s"
name:
column: zz_every_politician.name
gender:
column: zz_every_politician.gender
optional: true
jurisdiction_code:
column: zz_every_politician.country_code
image:
column: zz_every_politician.image
optional: true
links:
- mapping:
url:
column: zz_every_politician.source_url
contact_details:
- optional: true
mapping:
value:
column: zz_every_politician.email
type:
default: email
- optional: true
mapping:
value:
column: zz_every_politician.twitter
type:
default: twitter
memberships:
- optional: true
mapping:
role:
default: Member
organization:
mapping:
id:
columns:
- zz_every_politician.country_code
- zz_every_politician.group_id
transforms:
- slugify
format: "%s:party:%s"
jurisdiction_code:
column: zz_every_politician.country_code
name:
column: zz_every_politician.group
- optional: true
mapping:
role:
default: Member
organization:
mapping:
id:
columns:
- zz_every_politician.country_code
- zz_every_politician.legislature_slug
transforms:
- slugify
format: "%s:legislature:%s"
jurisdiction_code:
column: zz_every_politician.country_code
name:
column: zz_every_politician.legislature_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment