GithubHelp home page GithubHelp logo

search_postalcode's Introduction

セットアップ

インデックスファイル作成

  1. 郵便番号 CSV を入手する。
    • http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip よりダウンロードした CSV を任意のフォルダに配置してください。
    • サンプルとして、csv/input/KEN_ALL.csv に 2022/3/14 地点の郵便番号 CSV を配置しています。こちらを使用して頂いても構いませんが、最新の情報と異なる場合もございますのでご了承ください。
  2. setup.rb を実行して、インデックスファイルを作成する。
    $ ruby setup.rb <郵便番号 CSV のファイルパス> <インデックスファイル出力先>

郵便番号検索

  1. 住所を指定して郵便番号を検索します。
    • 結果を標準出力する場合
      $ ruby search.rb <検索したい住所> <インデックスファイルのパス> <郵便番号 CSV のファイルパス>
      • 例) 検索ワードに "渋谷" を指定した場合
        $ ruby search.rb 渋谷 csv/output/search_index.csv csv/input/KEN_ALL.csv
        
        "0101642,秋田県,秋田市,新屋渋谷町"
        "9693101,福島県,耶麻郡猪苗代町,渋谷"
        "2970008,千葉県,茂原市,渋谷"
        ...
    • 結果を CSV ファイルに出力する場合
      $ ruby search.rb <検索したい住所> <インデックスファイルのパス> <郵便番号 CSV のファイルパス> <ファイル出力先>

search_postalcode's People

Contributors

mterada1228 avatar

Watchers

 avatar

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.