GithubHelp home page GithubHelp logo

csv_to_popolo's People

Contributors

chrismytton avatar mhl avatar ondenman avatar tmtmtmtm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

csv_to_popolo's Issues

Handle different area types

Currently and area's type is hard-coded to be constituency. For Uganda we want to have some areas which have a type of district to handle the Women's Representatives, who are assigned at the district rather than constituency level.

Handle multiple honorific_prefixes

The Problem

Currently honorific_prefix only takes a single value but for cases such as Samoa a member can have multiple prefixes.

Example

The Samoan PM has the full title: 'Susuga Hon AUELUA FATIALOFA LUPESOLIAI TUILAEPA Dr Sailele Malielegaoi'

(http://www.palemene.ws/new/members-of-parliament/members-of-the-xvi-parliament/)

The names in uppercase are tribal names and are very much discrete parts as they can be listed in any order.

As one person may hold a number of different matai names from different branches of their genealogy, the new names are also added before their Christian name, with no set order in terms of general usage.

(https://en.wikipedia.org/wiki/Fa%27amatai#Naming_convention)

In the above example we also have a professional title (Dr).

Solution

Make csv_to_popolo accept multiple prefixes separated by a semi-colon.

disambiguate IDs

if someone passes plain numeric IDs for people, parties etc, these will clash.

Fields from YourNextMP

Currently skips:

  •  "mapit_id",
    
  •  "mapit_url",
    
  •  "gss_code",
    
  •  "party_ppc_page_url",
    
  •  "facebook_personal_url",
    
  •  "parlparse_id",
    
  •  "theyworkforyou_url",
    
  •  "elected"
    

Allow for multi-value fields

We should be able to note that a column has a multivalue_separator to signify that it holds a list of values, rather than just a single value.

For example:

    email: {
      type: 'asis',
      multivalue_separator: ';',
    },

And then the source could have [email protected];[email protected] as an email value.

Then, when extracting the data from any such field, we should split on the separator, and build up a list of values for it, rather than assuming it will only have one (similarly to what we've currently hard-coded for alternate_names).

Better 'role' names

Find generic role names for being an MP and an executive member that read well in popit's sentence descriptions.

Handle URL fields with multiple URLs separated with " ; "

In #106 we changed the field separator for the URL field to not split on semi-colons that are within URLs.

However, this is now too tight, as it fails to split URLs like

https://www.gov.uk/government/organisations/wales-office ; http://www.aluncairns.co.uk

Handle empty Area names

Currently we set an Area name to r[:area] || 'unknown'

But this should be more like the Group name, where we also handle empty strings: r[:group] = 'unknown' if r[:group].to_s.empty?

Accept executive posts

In cases where legislators can also be members of the executive, allow those roles to also be specified.

Combine multiple files

If given optional files of of Terms, or Parties, or Areas, combine those with the main data file.

First class Areas

Rather than just nesting Areas on Memberships, promote them to first class citizens in their own right.

Accept different date formats

Simply setting a :date converter should mean that it will automagically convert anything that Date.parse() can understand

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.