SlideShare a Scribd company logo
1 of 58
Download to read offline
数十分で
AI を使って
データ分析する
河端善博
1
私が暮らす街は、今年 3 月から6月へと暑くなっています。
このグラフの気温は、15 分間ごとに、私の暮らす街の気象情報を記録し続け
ています。
2
7月の予測を見てみます。
これから 7月中旬へ、気温は、さらに暑くなりそうです。
3
気温は、Web ブラウザを使って見れるようにしています。
温度、湿度、風速を、最近の10時間、最近の 1 日間、最近の 1 週間などで見
れるようにしています。
4
2017年3月のある寒い日に
2017 年3月のある寒い日、
これから暑くなっていくはず
暑くなっていく様子を、見れたら楽しそう、
Power BI と Microsoft Flow で作れると、さらに楽しそう、
Power BI Service って、リアルタイムデータを入れられたよね、
Microsoft Flow って、気象情報をとれたよね、
面白くなりそう、やってみよう
から、始めています。
それから、数日で動かせるようになって、
いまも、動き続けています。
どこまで暑くなるかな、いつから寒くなるかな、って
5
Power BI Microsoft Flow
このデータは、サーバの機器なし、サーバも契約なし、プログラムの開発な
しで作っています。
マイクロソフトの Power BI と Microsoft Flow を使って、作れます。
いかがでしょうか。
図 Power BI と Microsoft Flow のアイコン
6
Microsoft Flow の
つぶやきをみます
今日、もうひとつ楽しんでいることの作り方をお話しします。
Microsoft Flow というマイクロソフト製品のつぶやきをみます。
7
今年 2017年2月から 2 万件の「Microsoft Flow」が、世界中でつぶやかれて
います
8
「Microsoft Flow」は、日本語でつぶやかれていることもわかります。
Microsoft Flow は、どんどん楽しくなっていってる製品です。
使い方は、どんどん増えていってる製品なんです。
だから、どんなふうにつぶやきが増えていくのか、確かめてみています。
作っていきますね。
9
Power BI Microsoft Flow
はじめ、マイクロソフトの Power BI Serviceを使います。
10
Power BI Service へ、
つぶやきを、入れる
今日、もうひとつ楽しんでいることの作り方をお話しします。
Microsoft Flow というマイクロソフト製品のつぶやきをみます。
11
Power BI Service に、「ストリーミングデータセット」を作ります。
Web ブラウザで Power BI Service の画面を開いて、
「マイワークスペース」を選びます、
図 マイワークスペースを選ぶ
12
「+作成」ボタンを選んで、
図 +作成を選ぶ
13
「ストリーミングデータセット」を選びます。
図 ストリーミングデータセットを選ぶ
「ストリーミングデータセット」は、Power BI Service のリアルタイムに
データを入れるところです。
データは、Power BI Service の中にあるデータベースへ入ります。
14
「API」を選んで、
図 「API」を選ぶ
15
「データセット名」に「Tweets Real」を入れます。
図 「データセット名」を入れる
「データセット名」は、ストリーミングデータセットにつける名前です。
Power BI Service は、つぶやき、温度、売上など、データごとにストリーミ
ングデータセットを作れます。
今回、つぶやきを入れるために、「Tweets Real」という名前のストリーミン
グデータセットを作ります。
16
つづいて、データセットへ入れるデータを入れていきます。
ストリーミングデータセットは、日時、名前、売上など、データを入れられ
ます。
ここでは、つぶやきをデータに、「utc」「location」「tweets text」などを
入れます。
図 「ストリームからの値」を入れる
17
次に、「履歴データの解析」をオンにします。
ストリーミングデータセットは、解析しないデータと、解析するデータを入
れられます。
解析しないデータは、リアルタイムの最新のデータを出します。
今回、データをグラフにするため、データを解析できるようにします。
図 「履歴データの解析」をオンにする
18
「完了」を押します。
これで、Power BI Service へ、つぶやきのリアルタイムデータを入れられる
ようになります。
図「データセット」に「Tweets Real」がある
19
あれ、データを入れるための
データベースを作らなくていいの ?
あれ、データを入れるためのデータベースを作らなくていいの ? って、思っ
ていますよね
SQL Server とか、MySQL とか、Excel ファイルとか。
いいんです。Power BI Service は、ストリーミングデータセットを作ると、
Power BI Service の中に Azure SQL Database を作っています。
追加費用は、ありません。
ストリーミングデータセットとして、リアルタイムデータを入れるための専
用データベースを作ります。
データを入れるところは、これで完成です。
20
Power BI Microsoft Flow
次は、「Microsoft Flow」を含むつぶやきを、Power BI Service へ入れるよ
うにします。
マイクロソフトの Microsoft Flow サービスを使います。
Microsoft Flow を使って、Twitter からつぶやきをとって、Power BI Service
のストリーミングデータセットへ入れるようにします。
図 Microsoft Flow と Power BI
作ります
21
「フロー」は、
Microsoft Flow が自動ですること
「フロー」は、Microsoft Flow が自動ですることです。
15 分ごとに 気温・湿度・風速をとって、Power BI Service へ入れるフローと
か、
Microsoft Flow がつぶやかれた時に、名前、テキストをとって、Power BI
Service へ入れるフローとか、になります。
Microsoft Flow は、「フロー」を動かす製品です。
Microsoft Flow に新しいフローを作ります。
22
Microsoft Flow の画面を、Web ブラウザで開いて、
「一から作成」を選びます
図「一から作成」を選ぶ
23
「トリガーの追加」になります。
トリガーは、何が起きたときフローを始めるかを選びます。
図「トリガーの追加」が出る
24
「Microsoft Flow」がつぶやかれると、フローを始めることにします。
「Twitter」と入れて、「新しいツイートが投稿されたら」を選びます。
「新しいツイートが投稿されたら」は、「Microsoft Flow」が入っているつ
ぶやきがあると、
フローを始めます。
図「新しいツイートが投稿されたら」を選ぶ
25
検索テキストに「Microsoft Flow」を選びます。
これで、「Microsoft Flow」がつぶやかれると、あれこれ始められるように
なります
図「検索テキスト」に「Microsoft Flow」を入れる
26
「新しいステップ」を選びます。
ステップは、つぶやかれたら、することです。
図「新しいステップ」を選ぶ
27
「アクションの追加」を選びます。
アクションは、いまの日時を計算したり、あれこれサービスへデータを送っ
たりできます。
図「アクションの追加」を選ぶ
28
「データ操作」の「作成」のアクションをいくつか追加します。
現在の世界標準時 utc、分単位の世界標準時、10分単位の世界標準時
utc10minute、世界標準時を整数にした値です。
つぶやきの分析に使いたいデータを、作ります。
図 「作成」アクション 4 個を作る
29
つづいて「Power BI」の「Add rows to a dataset」のアクションを追加しま
す。
Power BI Service のストリーミングデータセットへ、つぶやきのデータを入
れます。
図 「Power BI」の「Add rows to a dataset」を選ぶ
30
「Workspace」「Dataset」「Table」に「My Workspace」「Tweets
Real」「RealtimeData」を選びます。
Power BI Service で作っているストリーミングデータセットを選びます。
図「Add rows to dataset」の「Workspace」「Dataset」「Table」を選ぶ.
31
ストリーミングデータセットへ、それぞれの値を、入れられるようになりま
す。
いままで作っているトリガーとアクションの値を、選べるようになります。
ストリーミングデータセットの「utc」へ 「utc」 アクションの出力、
ストリーミングデータセットの「location」へ「新しいツイートが投稿された
ら」の「場所」と、
それぞれ選んでいきます。
図 「Add rows to dataset」のそれぞれの値を選ぶ
32
これで「Microsoft Flow」がつぶやかれると、Power BI Service のストリー
ミングデータセットへデータが入るようになります。
「フロー名」へ「Tweets」を入れて、「フローの更新」を選びます。
図「フローの更新」を選ぶ
33
それでは、Power BI Service へ戻って、つぶやきをレポートにします。
レポートを作って、ストリーミングデータセットの値からグラフを作ってい
きます。
ツイート言語ごとのツイート数、場所、ツイート内容を見れます。
図 レポートにする
34
グラフを、ダッシュボードへピン留めします。
ダッシュボードに入れると、Power BI Service は、リアルタイムデータにあ
わせて、自動更新します。
図 ダッシュボードにする。
35
完成です。
「Microsoft Flow」のつぶやきがあると、
Power BI Service のリアルタイムデータセットへ、つぶやきデータをいれて、
Power BI Service のダッシュボードを、自動更新します。
Power BI Service と Microsoft Flow を使っていますから、
完成した後にすることは、ダッシュボードを見ながら、
ときどき、ダッシュボードを、さらに見やすくする、
レポートをさらに見やすくすることになります。
図 Power BI と Microsoft Flow
36
Power BI Microsoft Flow
Power BI は、データを見られるようにします。
Microsoft Flow は、データを集められます。
37
Power BI Microsoft Flow
ここでは、ツイートを、AI として日本語へ翻訳してみえるようにします
38
Power BI Service へデータを追加するアクションのとなりに、日本語への翻
訳を作ります
39
「並列分岐の追加」にある「アクションの追加」を選びます。
「並列分岐」は、今あるアクションと、同時にすることを作れます。
40
Add rows to a dataset のとなりに、アクションが選べるようになります。
41
ツイートの HTML 表現を、テキストへ変えます。
「Content Conversion」にある「Html to text」アクションを選びます。
42
「Html to text」アクションができています。
「Content」へ「ツイート テキスト」を選びます。
43
ツイートを Microsoft Teams へ出せるようにします。
まず、「+」ボタンを押して、「条件の追加」を選びます。
44
ツイートが、日本語の場合、そのまま Microsoft Teams へ出します
「条件」は、「ツイートの言語」が「次の値に等しい」として「ja」としま
す
45
「はいの場合」へアクションを入れていきます。
「はいの場合」にある「アクションの追加」を選びます
46
Microsoft Teams の「 Post Message 」を選びます。
47
Microsoft Teams アクションの「 Team Id」 と 「 Channel Id 」を選びます
「Message」は、「Html to text」アクションの出力「 The plain text
content」を選びます。
日本語のツイートが、Microsoft Teams へ出せるようになりました。
次は、日本語以外のツイートを作っていきます
48
条件が「いいえの場合」にある「アクションを追加」を選びます。
ツイートが日本語以外の場合、翻訳して Microsoft Teams へ出すようにして
いきます。
49
「Microsoft Translator」の「テキストの翻訳」を選びます
50
「テキストの翻訳」アクションができます。
「テキスト」に 「 Html to text 」アクションの出力「 The plain text
content 」を選びます。
「対象言語」に、「 Japanese 」 を選びます。
ツイートが日本語へ翻訳するようになります。
51
Microsoft Teams へ、翻訳したツイートを、出します
「アクションの追加」を選びます。
52
「Microsoft Teams」 の 「 Post Message 」アクションを選びます。
53
「 Post message 2 」アクションの値を選びます。
「 Team Id 」にチーム名、「 Channel Id 」にチャネルを選びます。
「 Message 」は、「テキストの翻訳」の出力「 翻訳されたテキスト 」を選
びます。
54
これで、Microsoft Flow のツイートを、日本語で Microsoft Teams へ出せる
ようになります。
55
Microsoft Teams で、ツイートを、日本語で確かめることができています。
56
Power BI は、データを見られるように
Microsoft Flow は、データを集められます
Power BI Microsoft Flow
Power BI は、データを見られるようにします。
Microsoft Flow は、データを集められます。
Power BI は、どんどん AI を使って、データを見れるようにしていっていま
す。
Microsoft Flow は、どんどん AI と繋げて、データを集められるようにしてい
ます。
Power BI も Microsoft Flow も、毎月毎月、数十個できることが増え続けて
います。
データ分析に、Power BI と Microsoft Flow 使えます。
57
おわり
58

More Related Content

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

数十分で AI を使ってデータ分析する