codeforjapan / codeforelection

衆院選2017候補者データベース作成プロジェクト This repo will be archived 🗄️ in the future
MIT License
32 stars 6 forks source link

GrayDBの公認政党の表記ゆれ(無所属|無所) #57

Closed takahashim closed 6 years ago

takahashim commented 6 years ago

GrayDBの候補者シートで、「公認政党」が無所属になっている方と無所になっている方がいます。

$ sort party.txt |uniq -c|sort -n
   2 こころ
   2 新党大地
   4 支持政党なし
  19 無所
  21 社民
  41 幸福
  44 諸派
  52 維新
  53 公明
  54 無所属
  78 立民
 235 希望
 243 共産
 332 自民
takahashim commented 6 years ago

数の多い 無所属 に統一しますね

takahashim commented 6 years ago

統一しました

$ sort party.txt|uniq -c|sort -n
   2 こころ
   2 新党大地
   4 支持政党なし
  21 社民
  41 幸福
  44 諸派
  52 維新
  53 公明
  73 無所属
  78 立民
 235 希望
 243 共産
 332 自民
rish314 commented 6 years ago

@takahashim マスタに未登録の政党を以下のように登録したいと思いますが、宜しかったでしょうか。

Party.find_or_create_by(short_name: "無所属", full_name: "無所属")
Party.find_or_create_by(short_name: "諸派", full_name: "諸派")
Party.find_or_create_by(short_name: "支持政党なし", full_name: "支持政党なし")
Party.find_or_create_by(short_name: "新党大地", full_name: "新党大地")
takahashim commented 6 years ago

@rish314 はい、お願いします!