GithubHelp home page GithubHelp logo

database-engineering-task's Introduction

統計データ可視化マップ(Statistical Data Visualization Map)

Wikidataから取得可能な各県の統計データを日本地図上で可視化できるアプリケーション
An application that allows you to visualize the statistical data for each prefecture available from Wikidata on a map of Japan

使い方(Usage)

  1. zipファイルの場合は展開する
    If it is a zip file, expand it.
  2. index.htmlをダブルクリックしてアプリケーションを起動する
    Double-click index.html to launch the application
  3. 左上のメニューから可視化したい統計データを選択し、Viewをクリックすると統計量が地図上に反映される
    Select the statistical data you want to visualize from the menu in the upper left corner and click View to reflect the statistic on the map.
  4. 県にマウスカーソルを重ねると統計データが確認できる
    Hover the mouse cursor over a prefecture to see statistical data.
  5. 県をクリックすると詳細な情報が確認できる
    Click on a prefecture for more information.
  6. ヒートマップのスケールを変更することもできる
    The scale of the heatmap can also be changed

利用したライブラリ

クエリ(参考)

都道府県の人口数

最新の人口のみを取得する

SELECT ?prefecture ?prefectureLabel ?year ?population ( round (?population / ?japanPopulation * 1000) / 10 AS ?percentage )
WHERE {
  ?prefecture wdt:P31 wd:Q50337;
              wdt:P1082 ?population.
  ?prefecture p:P1082 [pq:P585 ?year].
  wd:Q17 wdt:P1082 ?japanPopulation.
  
  FILTER NOT EXISTS {
    ?prefecture wdt:P31 wd:Q19953632.
  }
  FILTER (?prefecture = ?p && ?year = ?recentYear)
  {
    SELECT ?p ( MAX(?y) as ?recentYear)
    WHERE {
      ?p wdt:P31 wd:Q50337.
      ?p p:P1082 [pq:P585 ?y].
      FILTER NOT EXISTS {
        ?p wdt:P31 wd:Q19953632.
      }
    }
    GROUP BY ?p
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ja". }
}

都道府県の最高点

最高点となる山とその標高を取得する

SELECT ?prefecture ?prefectureLabel ?mountain ?mountainLabel ?high
WHERE {
    ?prefecture wdt:P31 wd:Q50337;
                wdt:P610 ?mountain.
    ?mountain wdt:P2044 ?high.
    FILTER NOT EXISTS {
    ?prefecture wdt:P31 wd:Q19953632.
    }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ja". }
}    

都道府県の面積

面積を取得する

SELECT ?prefecture ?prefectureLabel ?area 
WHERE {
    ?prefecture wdt:P31 wd:Q50337;
                wdt:P2046 ?area.
    
    FILTER NOT EXISTS {
    ?prefecture wdt:P31 wd:Q19953632.
    }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ja". }
}

database-engineering-task's People

Watchers

Todoroki Kohei 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.