オープンデータとプログラミング

ハミルトンの「独立のジャーナリスト」終了報告|Hamilton’s “independent journalist” ends reporting

オープンデータ関連のニュースです。

http://www.hamiltonnews.com/news-story/5797468-hamilton-s-independent-journalist-ends-reporting/

日本語

ハミルトン オープン データ活動家や独立したジャーナリスト、ジョーイ ・ コールマンは、彼のウェブサイトの公共の記録の運営を停止しています。 教育委員会、最後の 5 年のハミルトン警察引用資金の不足とそれを呼び出すための理由としてハミルトン市と可能な法的問題終了の両方・ コールマン、市などには、理事会に報告されています。 コールマン”私はもはや私はそうことを望むどのくらいに関係なく、パブリック レコードを維持することが、「8 月 13 日彼の Twitter アカウントや web サイトで作成されたステートメントで述べています。「これはする簡単に言えば、公共記録 (は) その目標を達成することができない難しい決断だった。
続きを読む…

English

Hamilton open data activist and independent journalist, Joey Coleman, has ceased operating his website The Public Record. Coleman, who has been reporting on city activities, including council, both school boards, and the Hamilton Police for the last five years, cited a lack of funding, and possible legal issues with the city of Hamilton, as reasons for calling it quits. “I’m no longer able to sustain The Public Record, no matter how much I desire to do so,” Coleman says in a statement made on his Twitter account and website Aug. 13. “This was a difficult decision to make but, simply put, The Public Record (is) unable to fulfill its goals.
Read more…

国勢調査局の データを開く を置いた方法|How the Census Bureau evangelizes open data

オープンデータ関連のニュースです。

http://fcw.com/articles/2015/08/13/census-bureau-data.aspx

日本語

国勢調査局のデータを開くチャレンジで 5 名のファイナリストは、局の全国デモ初日 8 月 13 日に多数の社会問題に取り組むために、国勢調査のデータでも開く使い方の強調表示の中に自分のアプリを紹介しました。 ウェビナーのプレゼンテーション中に連邦政府機関が、ソリューションの注意を望んでいる。 国勢調査局 CTO Avi ベンダー商学部責任者データ イアン ・ カリン。 鬼柳「我々 はより広くこれらの物語を共有する方法を見つける必要がある”と述べた。 ファイナリスト、障害者のアクセシビリティ スコア ミネアポリスの開発の 1 つは生活、ミネソタ州の旅行に最高の場所を見つけるために障害を持つ人々 を許可するのに開いている国勢調査のデータを使用します。アプリがアクセシビリティ スコア 5 つのデータ セットを検索できます: モビリティ、住宅、病院、安全・地域。
続きを読む…

English

The five finalists in the Census Bureau’s open data challenge showcased their apps during the bureau’s first ever National Demo Day on Aug. 13, highlighting how they used open data from the census to tackle a multitude of social problems. During the webinar presentation, Census Bureau CTO Avi Bender Commerce Department Chief Data Officer Ian Kalin said they hoped federal agencies would take note of the solutions. “We need to find a way to share these stories more broadly,” Kalin said. One of the finalists, Disabled Accessibility Score, developed in Minneapolis, uses open census data to allow people with disabilities to find the best places to live or travel in Minnesota. The app lets users search accessibility scores of five data sets: mobility, housing, hospital, safety and community.
Read more…

Windowsにword2vecのpythonインタフェースをインストールする

python

word2vecのpythonインターフェースをWindwos PCに入れようとしてもうまくいきません。

pip install word2vec

と、pipしてもword2vecのコンパイルが失敗します。
これはword2vecのソースコードがLinux用だからです。

word2vec-c\word2vec.c:19:21: fatal error: pthread.h: No such file or directory

実際、こんな感じで「pthread.h」が無いと怒られます。

そこで本記事では、Windows用に移植されたソースを使って無理くりインストールしてみます。インストールにあたっては、make、gcc、gitなどが必要になりますのであらかじめインストールしておいてください。

最初にやることは、word2vecのpythonインターフェースの入手です。githubから入手します。
このとき適当な作業フォルダで作業します(例ではC:\tmp)

C:\tmp>
C:\tmp>git clone https://github.com/danielfrg/word2vec

windwos用のword2vecのソースをgithubから入手します。

C:\tmp>git clone https://github.com/zhangyafeikimi/word2vec-win32

word2vecのpythonインターフェースのフォルダに移動します。
そして、Windows版のソースを格納するための空のフォルダ「word2vec-c」を作成します。

C:\tmp>cd word2vec
C:\tmp\word2vec>mv word2vec-c word2vec-c_bak #適当な名前でバックアップ
C:\tmp\word2vec>mkdir word2vec-c             #word2vec-cフォルダを作成

新しく作成した「word2vec-c」フォルダに、「C:\tmp\word2vec-win32」にあるWindows版ソースコード、Makefile一式をコピーします。

Makefile
compute-accuracy.c
distance.c
win32-port.h
word-analogy.c
word2phrase.c
word2vec.c

次に「C:\tmp\word2vec」にある「setup.py」をエディタで開いて編集します。
42行目をコメントアウトします。

#compile('word2vec-sentence2vec.c', 'word2vec-doc2vec')

続いて53-56行目を以下のように編集します。ポイントは2つのコマンド「word2phrase」・「word2vec-doc2vec」の削除と
コマンド名に拡張子「.exe」を付けることです。

【修正前】

    data_files=[('bin', ['bin/word2vec', 'bin/word2phrase',
                         'bin/word2vec-distance', 'bin/word2vec-word-analogy',
                         'bin/word2vec-compute-accuracy',
                         'bin/word2vec-doc2vec'])],

【修正後】

    data_files=[('bin', ['bin/word2vec.exe', 
                         'bin/word2vec-distance.exe', 'bin/word2vec-word-analogy.exe',
                         'bin/word2vec-compute-accuracy.exe'])],

最後に編集した「setup.py」を実行します。

C:\tmp\word2vec>python setup.py install

最後にpythonを立ち上げてimportできることを確認してみましょう。

C:\tmp\word2vec>python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import word2vec
>>>

無事、importできました!
機能がオリジナルのLinux版と比べて少ないようですが・・・

Windowsにword2vecをインストールする方法

このページでは、word2vecをWindows PCにインストールする方法について解説します。

word2vecは、もともとLinux用に書かれたc言語のコードなのでそのままでは、Windowsではコンパイルできません。多くのブログで解説されている記事はほとんどLinux用のインストール方法です。Windowsでのインストール方法について説明された記事がないので、メモとして残しておきます。

最初にLinux用のソースコードをコンパイルするとどのようになるかを確認してきましょう。Linux用のソースコードをコンパイルすると次のように「pthread.h」が無いといわれます。この問題は、Windows用に移植されたコードを利用することで解決することができます。

word2vec-c\word2vec.c:19:21: fatal error: pthread.h: No such file or directory

予め準備しておくツールは以下のとおりです。

  • gitクライアント
  • wgetコマンド
  • make、gcc等の開発ツール
  • make、gcc等については、CygwinというパッケージをインストールすればOKです。詳細はhttps://cygwin.com/を参照してください。

準備ができたら以下の手順でインストールを行ってください。

【手順】
gitコマンドでWindows用のソースコード一式をダウンロードします。

git clone https://github.com/zhangyafeikimi/word2vec-win32

「word2vec-win32」というフォルダができるのでcdして、makeします。

cd word2vec-win32
make

「demo-word.sh」を実行するとサンプルデータの作成が開始されます。
このときに「textt8」というコーパスのファイルから、「vectors.bin」というベクトルデータが作成されます。
私のWindows PCでは8分30秒ほどかかりました。

demo-word.sh
Welcome to Git (version 1.9.0-preview20140217)


Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Starting training using file text8
Vocab size: 71291
Words in train file: 16718843
Alpha: 0.000121  Progress: 99.58%  Words/thread/sec: 20.16k
real    8m31.240s
user    0m0.000s
sys     0m0.031s
Enter word or sentence (EXIT to break):

処理が終了すると入力待ちになりますので、何か単語をタイプしてみましょう。
例えば、japanと入力してみます。

Enter word or sentence (EXIT to break): japan

Word: japan  Position in vocabulary: 582

                                              Word       Cosine distance
------------------------------------------------------------------------
                                             china              0.658320
                                             korea              0.592824
                                            taiwan              0.553882
                                          japanese              0.549832
                                           paekche              0.489144
                                               jpy              0.488681
                                          thailand              0.482999
<<以下省略>>

距離的に近いワードがでてきます。

EXITと入力すると、終了します。もう一度起動する場合は以下のようにタイプします。

distance vectors.bin
Enter word or sentence (EXIT to break):

MDeC と Tentspark は、BDA アプリ チャレンジの第 2 版を発表します。|MDeC and Tentspark announce 2nd edition of BDA app challenge

オープンデータ関連のニュースです。

https://www.digitalnewsasia.com/digital-economy/mdec-and-tentspark-announce-2nd-edition-of-bda-app-challenge

日本語

マレーシアの国立 ICT 保管マルチ メディア開発公社 (MDeC) と IT コンサルティングとソリューション プロバイダーである Tentspark が共同で国立大アプリ チャレンジ (BAC) 2.0 を開始しました。   アプリ開発競争は個人開発者、Isv (独立系ソフトウェア ベンダー)、ベンチャー企業および社会的な問題の解決に大きなデータ解析 (BDA) の重要性を紹介するアプリを開発する必要があります学生に開いています。   業界パートナーとマレーシアの政府によって提供されるオープンのデータ セットを使用する彼らは、MDeC は追加があるだろう RM400、000 (現在のレートで米国 $102,000) 以上の価値がある賞の勝者のための声明で、言った。   次の就任 BAC 1.0、2014 年に BAC 2。
続きを読む…

English

MALAYSIA’S national ICT custodian Multimedia Development Corp (MDeC) and IT consultancy and solutions provider Tentspark have jointly launched the National Big App Challenge (BAC) 2.0.   The app development competition is open to individuals, developers, ISVs (independent software vendors), startups and students who will have to develop apps that showcase the importance of big data analytics (BDA) in solving societal issues.   They will be using open data sets made available by industry partners and the Malaysian Government, MDeC said in a statement, adding that there would be over RM400,000 (US$102,000 at current rates) worth of prizes for the winners.   Following the inaugural BAC 1.0 in 2014, BAC 2.
Read more…

ヘルプ ドライブ援助調査データを使ってください。|Using Survey Data to Help Drive Aid

オープンデータ関連のニュースです。

http://opennepal.net/blog/using-survey-data-help-drive-aid

日本語

UNDP が資金を提供、説明責任のラボ、ローカル介入グループと地上真実ソリューションによって行われて最近のコミュニティ フィードバック調査は、地震によって影響を受ける市民が直面している問題に多数の洞察力を提供しています。この調査からのデータは公然化してきた、開くネパールのオープン データ ポータルにホストされます。 代表的なサンプリングとサウンドの方法論を使用して生成された、オープン調査データは上の地上の現実と人々 のニーズをより深く理解を助けることができます。オープン調査データによって提供される分解されたコミュニティからのフィードバックは、貧困と闘うを助ける合わせた介入をドライブできます。
続きを読む…

English

A recent community feedback survey funded by UNDP and conducted by Accountability Labs, Local Interventions Group and Ground Truth Solutions has provided numerous insights into the problems facing citizens affected by the earthquake. The data from this survey has been made open and is hosted on Open Nepal’s Open Data Portal. If generated using representative sampling and a sound methodology, open survey data can help us better understand on-the-ground realities and the needs of the people. Disaggregated community feedback provided by open survey data can drive tailored interventions that help combat poverty.
Read more…

複合医療モール、フリート フィート ‘決起集会、’ ‘何の作品の都市’ で|Mixed-Use at Medical Mall, Fleet Feet ‘Pep Rally,’ ‘What Works Cities’

オープンデータ関連のニュースです。

http://www.jacksonfreepress.com/news/2015/aug/11/mixed-use-medical-mall-fleet-feet-pep-rally-what-w/

日本語

Jackson 医療モール (350 w. Woodrow Wilson アベニュー) をホストしている Woodrow Wilson 場所 (2709 ベイリー アベニュー) と呼ばれる新しい複合小売サイトの起工式8 月 13 日 (木)、10 ミシシッピ アイケアを関連付けます、ミシシッピ笑顔の歯科、地下鉄レストラン、AT&T 製品を販売するクリケット ワイヤレス電話ストア Woodrow Wilson の場所が含まれます。4 つの事業の最終的な操作時間はまだ保留中です。 起工式は、医療モールのスタッフおよびパートナー Woodrow Wilson の場所の開発に携わるからプレゼンテーションを機能します。式典の後は、軽食をお召し上がりいただけます。詳細については、601-982-8467 またはメール ejohnson@jacksonmedicalmall.org でエリカ リードを呼び出します。 8 月 13 日 (木曜日)、フリート フィート スポーツ (500 米
続きを読む…

English

The Jackson Medical Mall (350 W. Woodrow Wilson Ave.) is hosting a groundbreaking ceremony for a new mixed-use retail site called Woodrow Wilson Place (2709 Bailey Ave.) Thursday, Aug. 13, at 10 a.m. Woodrow Wilson Place will contain Mississippi Eyecare Associates, Mississippi Smiles Dentistry, a Subway restaurant and a Cricket Wireless telephone store, which will sell AT&T products. Final operation hours for the four businesses are still pending. The groundbreaking ceremony will feature presentations from Medical Mall staff and partners involved in the development of Woodrow Wilson Place. Light refreshments will be served after the ceremony. For more information, call Erica Reed at 601-982-8467 or email ejohnson@jacksonmedicalmall.org. On Thursday, Aug. 13, Fleet Feet Sports (500 U.S.
Read more…

8 都市に勝つイノベーション支援|8 cities win innovation support

オープンデータ関連のニュースです。

http://gcn.com/blogs/pulse/2015/08/bloomberg-what-works-cities.aspx

日本語

8 つの中規模都市をブルームバーグ慈善の何作品都市プログラムのおかげで、彼らの努力の政府の革新による専門家の助けとなります。 今年を起動すると、プログラムは 40 の州間で 112 都市からアプリケーションを受け取った。2017 年まで実行している、何作品都市の彼らの政府をより効果的にして、開いているデータを使用して、市民に従事し、サービスの向上に努力で 100 都市サポートおよびピア ツー ピア学習機会の合計を与えます。 勝利都市、チャタヌーガ、テネシー州;Jackson、欠場します;。カンザスシティ、ミズーリ;ルイビル、ケンタッキー州。メサ、アリゾナ;ニユー ・ オーリンズ;シアトル;そしてタルサ、オクラホマ州
続きを読む…

English

Eight mid-sized cities will get expert help with their government innovation efforts, thanks to the Bloomberg Philanthropies’ What Works Cities program. Launched earlier this year, the program received applications from 112 cities across 40 states. Running through 2017, What Works Cities will give a total of 100 cities support and peer-to-peer learning opportunities in an effort to make their governments more effective and use open data to engage citizens and improve services. The winning cities are Chattanooga, Tenn.; Jackson, Miss.; Kansas City, Mo.; Louisville, Ky.; Mesa, Ariz.; New Orleans; Seattle; and Tulsa, Okla.
Read more…

バークレーの街が オープン データ のポータルを開始します。|City of Berkeley Launches Open Data Portal

オープンデータ関連のニュースです。

https://www.techwire.net/city-of-berkeley-launches-open-data-portal/

日本語

バークレーの街のパブリック データ独自のポータルを開始する最新のカリフォルニア都市となっています。 ウェブサイト、https://data.cityofberkeley.info/、現在合計 311 要求、犯罪事件、ビジネス ライセンス、レストランの点検、水使用の 17 のデータ セットを提供しています。 街の IT 部門は、市の他の部門からのサポートとカリフォルニア大学バークレー校からのボランティア、バークレー校のオープン データ ・ イニシアティブをリードします。 「これは透明性とオープンの政府へのコミットメントによって駆動された」ドナ LaSala、市内の IT ディレクター、8 月 6 日発表で述べています。「スタッフと学生ボランティアは、この実現するために一生懸命働いた」 努力には、仕事とこの夏を締結 6 月パイロットの 1,500 時間が含まれています。
続きを読む…

English

The city of Berkeley has become the newest California city to start its own portal for public data. The website, https://data.cityofberkeley.info/, currently offers a total of 17 data sets on 311 requests, crime incidents, business licenses, restaurant inspections, water use, and more. The city’s IT department is leading Berkeley’s open data initiative, with support from other city departments and volunteers from UC Berkeley. “This was driven by a commitment to transparency and open government,” Donna LaSala, the city’s IT director, said in an Aug. 6 announcement. “Staff and student volunteers worked hard to make this happen.” The effort included 1,500 hours of work and a six-month pilot that concluded this summer.
Read more…

バークレーは、オープン データ のポータルを開始します。|Berkeley launches Open Data Portal

バークレー – 政府の透明性、説明責任と市民の関与を増やしたいからと言って、都市が発表公衆に情報を広めるためのワンストップ オープン データ ポータルの。 利用可能なデータの範囲にはニュース リリースによると 311 オンライン顧客サービスの要求、犯罪事件とビジネス ライセンスと同様情報街のツリー在庫、レストラン検査、天然ガスと電力消費量、水の使用、および緑の認定企業に関する情報が含まれます。 データ セットが最も頻繁な公的記録法要求を反映し、リリースを続けているそれらは積極的にデータ抽出と表示形式までスタッフの時間を削減できる見込みは、提供します。 Www.cityofberkeley で、市のホームページのオープン データ ポータル パイロット プロジェクト ページ。
続きを読む…

English

BERKELEY — Saying it wants to increase government transparency, accountability and civic engagement, the city has announced the launch of a one-stop Open Data portal for disseminating information to the public. The range of available data includes 311 online customer service requests, crime incidents and business license information as well as information on the city’s tree inventory, restaurant inspections, natural gas and electricity consumption, water use, and certified green businesses, according to a news release. The data sets reflect the most frequent Public Records Act requests, and providing them proactively is expected to reduce staff time to extract and format data, the release continues. An Open Data Portal pilot project page on the city website, at www.cityofberkeley.
Read more…