{"id":50747,"date":"2021-07-01T00:00:00","date_gmt":"2021-07-01T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/"},"modified":"2025-11-14T07:54:41","modified_gmt":"2025-11-14T15:54:41","slug":"twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/","title":{"rendered":"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316"},"content":{"rendered":"<p><strong>\u306f\u3058\u3081\u306b<\/strong><\/p>\n<p>\u30d1\u30fc\u30c81\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001GridDB\u306ePython\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u88c5\u3057\u3066\u3001Twitter\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u3068\u53d6\u5f97\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u4eca\u56de\u306e\u30d6\u30ed\u30b0\u3067\u306f\u5f15\u304d\u7d9a\u304d\u3001\u611f\u60c5\u5206\u6790\u3068\u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316\u3092\u884c\u3044\u307e\u3059\u3002\u5404\u30c4\u30a4\u30fc\u30c8\u306e\u611f\u60c5\u5024\u3092\u8a08\u7b97\u3057\u3001\u611f\u60c5\u5024\u3092\u4fdd\u5b58\u3057\u3001\u4eba\u6c17\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u306b\u5f79\u7acb\u3064\u6d1e\u5bdf\u3092\u5f97\u308b\u305f\u3081\u306b\u305d\u308c\u3089\u3092\u8996\u899a\u5316\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u968e\u5c64\u30af\u30e9\u30b9\u30bf\u30fc\u306a\u3069\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u30fb\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5b9f\u88c5\u3057\u3001\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3092\u7528\u3044\u3066\u53ef\u8996\u5316\u3057\u307e\u3059\u3002\u6700\u7d42\u7684\u306b\u306f\u3001python folium \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3001\u30dd\u30b8\u30c6\u30a3\u30d6\u306a\u30c4\u30a4\u30fc\u30c8\u3068\u30cd\u30ac\u30c6\u30a3\u30d6\u306a\u30c4\u30a4\u30fc\u30c8\u3092\u5730\u7406\u7684\u306b\u53ef\u8996\u5316\u3057\u3001\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u304c\u7279\u5b9a\u306e\u5730\u57df\u3067\u52b9\u7387\u7684\u306b\u5e02\u5834\u6210\u9577\u3059\u308b\u305f\u3081\u306b\u5f79\u7acb\u3066\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u524d\u63d0\u6761\u4ef6<\/strong><\/p>\n<p>Textblob\u306a\u3069\u306ePython3\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3001\u5404\u30c4\u30a4\u30fc\u30c8\u30c6\u30ad\u30b9\u30c8\u306e\u6975\u6027\u3084\u4e3b\u89b3\u6027\u306e\u5b9a\u91cf\u7684\u306a\u5024\u3092\u7b97\u51fa\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002\u307e\u305f\u3001\u611f\u60c5\u3092\u53ef\u8996\u5316\u3059\u308b\u305f\u3081\u306e\u30c1\u30e3\u30fc\u30c8\u30c4\u30fc\u30eb\u3068\u3057\u3066\u3001matplotlib\u3068folium\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u307e\u305f\u3001scipy\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3001\u611f\u60c5\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u30c7\u30fc\u30bf\u69cb\u9020\u30b9\u30ad\u30fc\u30de<\/strong><\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th>\n        Field Name\n      <\/th>\n<th>\n        Data Type(GridDB)\n      <\/th>\n<th>\n        Notes\n      <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n        Serial No\n      <\/td>\n<td>\n        INTEGER\n      <\/td>\n<td>\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Screen Name\n      <\/td>\n<td>\n        STRING\n      <\/td>\n<td>\n        Twitter Author Name\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Twitter ID\n      <\/td>\n<td>\n        STRING\n      <\/td>\n<td>\n        Twitter handle\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Tweet\n      <\/td>\n<td>\n        STRING\n      <\/td>\n<td>\n        Tweet text\n      <\/td>\n<\/tr>\n<tr>\n<td>\n        Date\n      <\/td>\n<td>\n        STRING\n      <\/td>\n<td>\n      <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30d6\u30ed\u30b0\u306e\u30d1\u30fc\u30c81\u3067\u306f\u3001Twitter\u306e\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u30fb\u53d6\u5f97\u3059\u308b\u305f\u3081\u306bGridDB\u30b3\u30f3\u30c6\u30ca\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u53d6\u5f97\u3057\u305f\u30c4\u30a4\u30fc\u30c8\u30c7\u30fc\u30bf\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u5909\u6570\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\"># Define the container names\ntweet_dataaset_container = excel_sheet_name\n# Get the containers\ntweet_data = gridstore.get_container(tweet_dataaset_container)\n\n# Fetch all rows - tweet_container\nquery = tweet_data.query(\"select *\")\nrs = query.fetch(False)\nprint(f\"{tweet_dataaset_container} Data\")\n\n# Iterate and create a list\nretrieved_data = []\nwhile rs.has_next():\n   data = rs.next()\n   retrieved_data.append(data)\n\nprint(retrieved_data)\n\n# Convert the list to a pandas data frame\ntweet_dataframe = pd.DataFrame(retrieved_data,\n                                 columns=['sno', 'twitter_name', 'twitter_id', 'tweet', 'date'])\n\n# Get the data frame details\nprint(tweet_dataframe)\ntweet_dataframe.info()<\/code><\/pre>\n<\/div>\n<p>\u4eca\u5f8c\u3082\u7d9a\u3051\u3066\u3001\u307e\u305a\u30bb\u30f3\u30c1\u30e1\u30f3\u30c8\u30b9\u30b3\u30a2\u3092\u6c42\u3081\u3001\u305d\u306e\u5f8c\u3067\u30c7\u30fc\u30bf\u3092\u53ef\u8996\u5316\u3057\u3066\u30bb\u30f3\u30c1\u30e1\u30f3\u30c8\u5206\u6790\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u30c4\u30a4\u30fc\u30c8\u30c7\u30fc\u30bf\u3092WordClouds\u3067\u8868\u793a\u3059\u308b<\/strong><\/p>\n<p>\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u306e\u30c4\u30a4\u30fc\u30c8\u30de\u30a4\u30cb\u30f3\u30b0\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u6982\u8981\u3092\u628a\u63e1\u3059\u308b\u305f\u3081\u306b\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u5168\u4f53\u306b\u30ef\u30fc\u30c9\u30af\u30e9\u30a6\u30c9\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">from wordcloud import WordCloud, STOPWORDS\nimport matplotlib.pyplot as plt\nstopwords = set(STOPWORDS)\n\ndef show_wordcloud(data, title = None):\n    wordcloud = WordCloud(\n        background_color='white',\n        stopwords=stopwords,\n        max_words=200,\n        max_font_size=40, \n        scale=3,\n        random_state=1 # chosen at random by flipping a coin; it was heads\n    ).generate(str(data))\n\n    fig = plt.figure(1, figsize=(12, 12))\n    plt.axis('off')\n    if title: \n        fig.suptitle(title, fontsize=20)\n        fig.subplots_adjust(top=2.3)\n\n    plt.imshow(wordcloud)\n    plt.show()\n\nshow_wordcloud(tweet_dataframe)<\/code><\/pre>\n<\/div>\n<p>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u5168\u4f53\u306b\u76f8\u5f53\u3059\u308b\u30ef\u30fc\u30c9\u30af\u30e9\u30a6\u30c9\u306b\u306f\u3001\u300cWorker Safety\u300d\u300cSupply Chain Disaster\u300d\u300cBangladeshi Worker\u300d\u306a\u3069\u306e\u91cd\u8981\u306a\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image1.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image1.png\" alt=\"\" width=\"1728\" height=\"1086\" class=\"aligncenter size-full wp-image-27604\" srcset=\"\/wp-content\/uploads\/2021\/06\/image1.png 1728w, \/wp-content\/uploads\/2021\/06\/image1-300x189.png 300w, \/wp-content\/uploads\/2021\/06\/image1-1024x644.png 1024w, \/wp-content\/uploads\/2021\/06\/image1-768x483.png 768w, \/wp-content\/uploads\/2021\/06\/image1-1536x965.png 1536w, \/wp-content\/uploads\/2021\/06\/image1-600x377.png 600w\" sizes=\"(max-width: 1728px) 100vw, 1728px\" \/><\/a><\/p>\n<p><strong>\u30c4\u30a4\u30fc\u30c8\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u611f\u60c5\u5024\u3092\u7b97\u51fa\u3059\u308b<\/strong><\/p>\n<p>\u30c4\u30a4\u30fc\u30c8\u306e\u6975\u6027\u3068\u4e3b\u89b3\u6027\u306e\u5024\u306f\u3001\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u30c4\u30a4\u30fc\u30c8\u306e\u500b\u3005\u306e\u8a9e\u5f59\u306b\u4f9d\u5b58\u3057\u307e\u3059\u3002\u6700\u7d42\u7684\u306a\u611f\u60c5\u30b9\u30b3\u30a2\u306f\u3001\u30c4\u30a4\u30fc\u30c8\u306b\u542b\u307e\u308c\u308b\u3059\u3079\u3066\u306e\u8a9e\u5f59\u306e\u611f\u60c5\u5024\u306e\u5408\u8a08\u3068\u306a\u308a\u307e\u3059\u3002Textblob\u306f\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u30ed\u30b8\u30c3\u30af\u3067\u52d5\u4f5c\u3057\u3001\u30c4\u30a4\u30fc\u30c8\u306e\u611f\u60c5\u5024\u3092\u6570\u5024\u3067\u8fd4\u3059Python\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u305d\u308c\u3067\u306f\u3001textblob\u3092\u4f7f\u3063\u3066\u3001\u5404\u30c4\u30a4\u30fc\u30c8\u3092\u7e70\u308a\u8fd4\u3057\u691c\u7d22\u3057\u3066\u3001\u611f\u60c5\u5024\u3092\u8a08\u7b97\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">from textblob import TextBlob  # For getting the quantitative value for the polarity and subjectivity\n\nimport re  # For the calculation of regular expressions\n\n# a function to clean the tweets using regualr expression\ndef clean_tweet(tweet):\n    '''\n    Utility function to clean the text in a tweet by removing\n    links and special characters using regex.\n    '''\n    return ' '.join(re.sub(\"(@[A-Za-z0-9]+)|([^0-9A-Za-z  t])|(w+:\/\/S+)\", \" \", tweet).split())\n\n\nfor tweet in tweets:\n        analysis = TextBlob(clean_tweet(tweet))\n        pol = analysis.sentiment.polarity\n        sub = analysis.subjectivity\n        pol_round = '%.3f' % pol\n        sub_round = '%.3f' % sub<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u30b9\u30cb\u30da\u30c3\u30c8\u3067\u306f\u3001\u30c4\u30a4\u30fc\u30c8\u3092\u30af\u30ea\u30fc\u30cb\u30f3\u30b0\u3057\u305f\u5f8c\u306b\u3001\u6975\u6027\u306e\u5024\u3068\u4e3b\u89b3\u6027\u306e\u5024\u3092\u8a08\u7b97\u3057\u3066\u3044\u307e\u3059\u3002\u4e3b\u89b3\u6027\u306e\u5024\u306f\u30c4\u30a4\u30fc\u30c8\u304c\u4e0e\u3048\u3089\u308c\u305f\u6587\u8108\u306b\u3069\u308c\u3060\u3051\u4e00\u81f4\u3059\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u304c\u3001\u6975\u6027\u306e\u5024\u306f\u7279\u5b9a\u306e\u30c4\u30a4\u30fc\u30c8\u306e\u30b9\u30b3\u30a2\u306e\u6700\u7d42\u7684\u306a\u611f\u60c5\u3068\u307f\u306a\u3055\u308c\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5f15\u304d\u7d9a\u304d\u3001matplotlib\u3092\u4f7f\u3063\u3066\u3053\u308c\u3089\u306e\u6975\u6027\u306e\u5024\u3092\u53ef\u8996\u5316\u3057\u307e\u3059\u3002<\/p>\n<p><strong>Matplotlib\u3092\u7528\u3044\u3066\u30bb\u30f3\u30c1\u30e1\u30f3\u30c8\u30c7\u30fc\u30bf\u3092\u53ef\u8996\u5316\u3059\u308b<\/strong><\/p>\n<p>\u30c4\u30a4\u30fc\u30c8\u306e\u611f\u60c5\u5024\u306e\u6570\u5024\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u30012013\u5e74\u304b\u30892018\u5e74\u306b\u304b\u3051\u3066\u306e\u50be\u5411\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306b\u3001matplotlib\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30c3\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">import matplotlib.pyplot as plt  # For plotting the graphs and charts\n\n# plotting the line-chart for the average polarity with the supply-chain-incidents\nplt.title(\"Average Sentiment for Fashion Supply Chain\")\nplt.xlabel(\"Year\")\nplt.ylabel(\"Average Yearly Sentiment Score\")\nplt.ylim(-0.3, 0.3)\nplt.plot(list_sheetnames, average_polarity_sheets)\nplt.show()<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u306e\u30b3\u30fc\u30c9\u30b9\u30cb\u30da\u30c3\u30c8\u306e\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306f\u3001\u611f\u60c5\u306e\u5024\u3092\u305d\u308c\u305e\u308c\u306e\u5e74\u3067\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image2.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image2.png\" alt=\"\" width=\"2308\" height=\"1312\" class=\"aligncenter size-full wp-image-27605\" srcset=\"\/wp-content\/uploads\/2021\/06\/image2.png 2308w, \/wp-content\/uploads\/2021\/06\/image2-300x171.png 300w, \/wp-content\/uploads\/2021\/06\/image2-1024x582.png 1024w, \/wp-content\/uploads\/2021\/06\/image2-768x437.png 768w, \/wp-content\/uploads\/2021\/06\/image2-1536x873.png 1536w, \/wp-content\/uploads\/2021\/06\/image2-2048x1164.png 2048w, \/wp-content\/uploads\/2021\/06\/image2-150x85.png 150w, \/wp-content\/uploads\/2021\/06\/image2-600x341.png 600w\" sizes=\"(max-width: 2308px) 100vw, 2308px\" \/><\/a><\/p>\n<p>\u307e\u305f\u3001\u5404\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u306e\u611f\u60c5\u5024\u3092\u8996\u899a\u5316\u3059\u308b\u305f\u3081\u306b\u3001matplotlib\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u4e0a\u8a18\u306ematplotlib line-chart\u306e\u30b3\u30fc\u30c9\u30b9\u30cb\u30da\u30c3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001ZARA\u3084Gap\u306a\u3069\u306e\u30d6\u30e9\u30f3\u30c9\u306b\u5bfe\u3059\u308b\u30dd\u30b8\u30c6\u30a3\u30d6\u306a\u611f\u60c5\u306e\u50be\u5411\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image3.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image3.png\" alt=\"\" width=\"1376\" height=\"1030\" class=\"aligncenter size-full wp-image-27606\" srcset=\"\/wp-content\/uploads\/2021\/06\/image3.png 1376w, \/wp-content\/uploads\/2021\/06\/image3-300x225.png 300w, \/wp-content\/uploads\/2021\/06\/image3-1024x767.png 1024w, \/wp-content\/uploads\/2021\/06\/image3-768x575.png 768w, \/wp-content\/uploads\/2021\/06\/image3-600x449.png 600w\" sizes=\"(max-width: 1376px) 100vw, 1376px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image4.png\" alt=\"\" width=\"1376\" height=\"1072\" class=\"aligncenter size-full wp-image-27607\" srcset=\"\/wp-content\/uploads\/2021\/06\/image4.png 1376w, \/wp-content\/uploads\/2021\/06\/image4-300x234.png 300w, \/wp-content\/uploads\/2021\/06\/image4-1024x798.png 1024w, \/wp-content\/uploads\/2021\/06\/image4-768x598.png 768w, \/wp-content\/uploads\/2021\/06\/image4-600x467.png 600w\" sizes=\"(max-width: 1376px) 100vw, 1376px\" \/><\/a><\/p>\n<p>\u4e0a\u8a18\u306e\u611f\u60c5\u30e9\u30a4\u30f3\u30c1\u30e3\u30fc\u30c8\u304b\u3089\u5206\u6790\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u306etwitter\u5229\u7528\u8005\u306e\u611f\u60c5\u306f\u3001\u3042\u308b\u5e74\u306b\u30dd\u30b8\u30c6\u30a3\u30d6\u307e\u305f\u306f\u30cd\u30ac\u30c6\u30a3\u30d6\u306b\u53cd\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u968e\u5c64\u7684\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3068\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0<\/strong><\/p>\n<p>\u30bb\u30f3\u30c1\u30e1\u30f3\u30c8\u30c7\u30fc\u30bf\u304b\u3089\u3088\u308a\u591a\u304f\u306e\u5206\u6790\u7d50\u679c\u3092\u5f97\u308b\u305f\u3081\u306b\u3001\u30bb\u30f3\u30c1\u30e1\u30f3\u30c8\u30c7\u30fc\u30bf\u306e\u5024\u306b\u5bfe\u3057\u3066\u968e\u5c64\u7684\u306a\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3044\u3001\u3055\u3089\u306b\u305d\u308c\u305e\u308c\u306e\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3092\u30d7\u30ed\u30c3\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u306e\u89b3\u70b9\u304b\u3089\u3001\u4e0e\u3048\u3089\u308c\u305f\u30c4\u30a4\u30fc\u30c8\u306e\u30bb\u30f3\u30c1\u30e1\u30f3\u30c8\u5024\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u3092\u4f5c\u6210\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002\u307e\u305a\u3001\u4e0e\u3048\u3089\u308c\u305f\u30c7\u30fc\u30bf\u304b\u3089\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3092\u63cf\u304f\u305f\u3081\u306epython\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">from scipy.cluster.hierarchy import cophenet  # used in hierarchical clustering\nfrom scipy.cluster.hierarchy import dendrogram, linkage  # used in making dendrograms\nfrom scipy.spatial.distance import pdist  # calculating the correlative distance\nfrom sklearn.cluster import MeanShift\n\n\ndef fancy_dendrogram(*args, **kwargs):\n    max_d = kwargs.pop('max_d', None)\n    if max_d and 'color_threshold' not in kwargs:\n        kwargs['color_threshold'] = max_d\n    annotate_above = kwargs.pop('annotate_above', 0)\n\n    ddata = dendrogram(*args, **kwargs)\n\n    if not kwargs.get('no_plot', False):\n        for i, d, c in zip(ddata['icoord'], ddata['dcoord'], ddata['color_list']):\n            x = 0.5 * sum(i[1:3])\n            y = d[1]\n            if y > annotate_above:\n                plt.plot(x, y, 'o', c=c)\n                plt.annotate(\"%.3g\" % y, (x, y), xytext=(0, -5),\n                             textcoords='offset points',\n                             va='top', ha='center')\n        if max_d:\n            plt.axhline(y=max_d, c='k')\n    return ddata<\/code><\/pre>\n<\/div>\n<p>matplotlib\u3092\u7528\u3044\u3066\u968e\u5c64\u578b\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u53ef\u8996\u5316\u3059\u308b\u305f\u3081\u306epython\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\"> # performing heirarchical clustering on the each of the supply chain events\n    X = array(get_polarity_subjectivity_list(polarity, subjectivity))\n    ms = MeanShift()\n    ms.fit(X)\n    labels = ms.labels_\n    cluster_centers = ms.cluster_centers_\n    n_clusters_ = len(np.unique(labels))\n    # now saving it in the \"hierarchical_clustering_data.xls\" file\n    pol_x = (cluster_centers[0][0] + cluster_centers[1][\n        0]) \/ 2  # applying the coordinate geometry centre of two coordinates for the first two cluster points\n    sub_y = (cluster_centers[0][1] + cluster_centers[1][1]) \/ 2\n    ws2.write(i + 1, 0, i + 1)\n    ws2.write(i + 1, 1, list_sheetnames[i])\n    ws2.write(i + 1, 2, pol_x)\n    ws2.write(i + 1, 3, sub_y)\n    ws2.write(i + 1, 4, n_clusters_)\n    # writing all the cluster points\n    result_point = \"\"\n    for k in range(n_clusters_):\n        result_point = result_point + \" ( \" + str(round(cluster_centers[k][0], 3)) + \" , \" + str(\n            round(cluster_centers[k][1], 3)) + \" )\"\n\n    ws2.write(i + 1, 5, result_point)\n    # now plotting the hierarchical clustering with the cluster points\n    colors = 10 * ['r.', 'g.', 'b.', 'c.', 'k.', 'y.', 'm.']\n    for j in range(len(X)):\n        plt.plot(X[j][0], X[j][1], colors[labels[j]], markersize=10)\n\n    plt.scatter(cluster_centers[:, 0], cluster_centers[:, 1], marker='x', color='k', s=150, linewidths=5, zorder=10)\n    plt.title(list_sheetnames[i])\n    plt.xlabel(\"Polarity---------------------->\")\n    plt.ylabel(\"Subjectivity------------------>\")\n    plt.show()<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image5.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image5.png\" alt=\"\" width=\"2350\" height=\"1216\" class=\"aligncenter size-full wp-image-27608\" srcset=\"\/wp-content\/uploads\/2021\/06\/image5.png 2350w, \/wp-content\/uploads\/2021\/06\/image5-300x155.png 300w, \/wp-content\/uploads\/2021\/06\/image5-1024x530.png 1024w, \/wp-content\/uploads\/2021\/06\/image5-768x397.png 768w, \/wp-content\/uploads\/2021\/06\/image5-1536x795.png 1536w, \/wp-content\/uploads\/2021\/06\/image5-2048x1060.png 2048w, \/wp-content\/uploads\/2021\/06\/image5-600x310.png 600w\" sizes=\"(max-width: 2350px) 100vw, 2350px\" \/><\/a><\/p>\n<p>\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u30c1\u30e3\u30fc\u30c8\u304b\u3089\u3001\u611f\u60c5\u5024\u306f\u3001\u30bb\u30f3\u30c1\u30e1\u30f3\u30c8\u306e\u6975\u6027\u3068\u4e3b\u89b3\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u30014\u3064\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u306b\u5206\u985e\u3067\u304d\u308b\u3068\u7d50\u8ad6\u4ed8\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 4\u3064\u306e\u30af\u30e9\u30b9\u30bf\u30fc\u3068\u305d\u306e\u5e73\u5747\u8ddd\u96e2\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u3001\u3053\u308c\u3092\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u95a2\u6570\u306b\u5165\u529b\u3057\u3066\u540c\u3058\u3082\u306e\u3092\u30d7\u30ed\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\"> Y = pdist(score)\n    Z = linkage(Y, 'ward')\n    c, coph_dists = cophenet(Z, Y)  # c contains the coorelative distance for the clusters\n    # calculating the full dednrogram\n    plt.figure(figsize=(25, 10))\n    plt.title(\"Dendrogram : \" + list_sheetnames[i])\n    plt.xlabel('sample index')\n    plt.ylabel('distance')\n    fancy_dendrogram(\n        Z,\n        truncate_mode='lastp',\n        p=12,\n        leaf_rotation=90.,\n        leaf_font_size=12.,\n        show_contracted=True,\n        # annotate_above=10,\n        max_d=1.5\n    )\n    plt.show()<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image6.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image6.png\" alt=\"\" width=\"2138\" height=\"1318\" class=\"aligncenter size-full wp-image-27609\" srcset=\"\/wp-content\/uploads\/2021\/06\/image6.png 2138w, \/wp-content\/uploads\/2021\/06\/image6-300x185.png 300w, \/wp-content\/uploads\/2021\/06\/image6-1024x631.png 1024w, \/wp-content\/uploads\/2021\/06\/image6-768x473.png 768w, \/wp-content\/uploads\/2021\/06\/image6-1536x947.png 1536w, \/wp-content\/uploads\/2021\/06\/image6-2048x1263.png 2048w, \/wp-content\/uploads\/2021\/06\/image6-600x370.png 600w\" sizes=\"(max-width: 2138px) 100vw, 2138px\" \/><\/a><\/p>\n<p>\u540c\u69d8\u306b\u3001ZARA\u30d6\u30e9\u30f3\u30c9\u306e\u611f\u60c5\u5024\u306e\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3082\u8a08\u7b97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"images\/image7.png\" alt=\"alt_text\" title=\"image_tooltip\" \/><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image7.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image7.png\" alt=\"\" width=\"2162\" height=\"1264\" class=\"aligncenter size-full wp-image-27610\" srcset=\"\/wp-content\/uploads\/2021\/06\/image7.png 2162w, \/wp-content\/uploads\/2021\/06\/image7-300x175.png 300w, \/wp-content\/uploads\/2021\/06\/image7-1024x599.png 1024w, \/wp-content\/uploads\/2021\/06\/image7-768x449.png 768w, \/wp-content\/uploads\/2021\/06\/image7-1536x898.png 1536w, \/wp-content\/uploads\/2021\/06\/image7-2048x1197.png 2048w, \/wp-content\/uploads\/2021\/06\/image7-600x351.png 600w\" sizes=\"(max-width: 2162px) 100vw, 2162px\" \/><\/a><\/p>\n<p>\u305d\u3053\u3067\u3001\u6211\u3005\u306ftwitter\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u4e00\u822c\u7684\u306a\u968e\u5c64\u578b\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3092\u5b9f\u88c5\u3057\u3001\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3092\u7528\u3044\u3066\u53ef\u8996\u5316\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><strong>Twitter\u611f\u60c5\u30c7\u30fc\u30bf\u3092\u5730\u7406\u7684\u306b\u53ef\u8996\u5316\u3059\u308b<\/strong><\/p>\n<p>\u611f\u60c5\u30c7\u30fc\u30bf\u3092\u5730\u7406\u7684\u306b\u53ef\u8996\u5316\u3059\u308b\u305f\u3081\u306b\u3001python\u306efolium\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u3001\u5730\u7406\u7684\u5ea7\u6a19\u3068\u5bfe\u5fdc\u3059\u308b\u611f\u60c5\u5024\u3092\u30d7\u30ed\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-py\">import folium  # plotting the coordinates on the map\n\n# now making a data-frame with markers to show on the map\n    data = pd.DataFrame({\n        'lat': latitudes,\n        'lon': longitudes,\n        'name': places,\n        'sentiment': sentiments,\n    })\n    # now make an empty map\n    m = folium.Map(location=[20, 0], zoom_start=2)\n    # popup will be used when a particular marker will be clicked,\n    # it will display the sentiment value along with the corresponding place\n\n    for j in range(0, len(data)):\n        try:\n            if data.iloc[j]['sentiment'] > 0:\n                folium.Marker([data.iloc[j]['lat'], data.iloc[j]['lon']],\n                              popup=\"Sentiment :  \" + str(round(data.iloc[j]['sentiment'], 3)) + \" nLocation :\" + str\n                              (data.iloc[j]['name']),\n                              icon=folium.Icon(color='green')).add_to(m)\n            elif data.iloc[j]['sentiment'] &lt; 0:\n                folium.Marker([data.iloc[j]['lat'], data.iloc[j]['lon']],\n                              popup=\"Sentiment :  \" + str(round(data.iloc[j]['sentiment'], 3)) + \" nLocation: \" + str\n                              (data.iloc[j]['name']),\n                              icon=folium.Icon(color='red')).add_to(m)\n            else:\n                folium.Marker([data.iloc[j]['lat'], data.iloc[j]['lon']],\n                              popup=\"Sentiment :  \" + str(round(data.iloc[j]['sentiment'], 3)) + \" nLocation : \" + str\n                              (data.iloc[j]['name']),\n                              icon=folium.Icon(color='blue')).add_to(m)\n        except:\n            # print(\"error\"+str(j))\n            pass\n    m.save(list_sheetnames_geo[i] + \"_geo.html\")<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u306epython folium\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5730\u7406\u7684\u306a\u5730\u56f3\u304chtml\u30d5\u30a1\u30a4\u30eb\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3067\u3001\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u3054\u3068\u306e\u5730\u7406\u7684\u306a\u53ef\u8996\u5316\u30de\u30c3\u30d7\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image8.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image8.png\" alt=\"\" width=\"2848\" height=\"1398\" class=\"aligncenter size-full wp-image-27611\" srcset=\"\/wp-content\/uploads\/2021\/06\/image8.png 2848w, \/wp-content\/uploads\/2021\/06\/image8-300x147.png 300w, \/wp-content\/uploads\/2021\/06\/image8-1024x503.png 1024w, \/wp-content\/uploads\/2021\/06\/image8-768x377.png 768w, \/wp-content\/uploads\/2021\/06\/image8-1536x754.png 1536w, \/wp-content\/uploads\/2021\/06\/image8-2048x1005.png 2048w, \/wp-content\/uploads\/2021\/06\/image8-600x295.png 600w\" sizes=\"(max-width: 2848px) 100vw, 2848px\" \/><\/a><\/p>\n<p>\u30e9\u30ca\u30d7\u30e9\u30b6\u306e\u4e8b\u6545\u3078\u306e\u5bfe\u5fdc\u306b\u3064\u3044\u3066\u3001\u4e16\u754c\u4e2d\u306e\u611f\u60c5\u306e\u5206\u5e03\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u8d64\u8272\u306e\u30de\u30fc\u30ab\u30fc\u306f\u5426\u5b9a\u7684\u306a\u611f\u60c5\u3092\u8868\u3057\u3001\u7dd1\u8272\u306e\u30de\u30fc\u30ab\u30fc\u306f\u80af\u5b9a\u7684\u306a\u611f\u60c5\u3092\u8868\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u7279\u5b9a\u306e\u30a8\u30ea\u30a2\u306b\u30ba\u30fc\u30e0\u30a4\u30f3\u3059\u308b\u3068\u3001\u611f\u60c5\u5024\u306e\u8a73\u7d30\u306a\u5206\u5e03\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u82f1\u56fd\u306e\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u306e\u8a73\u7d30\u306a\u611f\u60c5\u306e\u5206\u5e03\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image9.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/06\/image9.png\" alt=\"\" width=\"2192\" height=\"1304\" class=\"aligncenter size-full wp-image-27612\" srcset=\"\/wp-content\/uploads\/2021\/06\/image9.png 2192w, \/wp-content\/uploads\/2021\/06\/image9-300x178.png 300w, \/wp-content\/uploads\/2021\/06\/image9-1024x609.png 1024w, \/wp-content\/uploads\/2021\/06\/image9-768x457.png 768w, \/wp-content\/uploads\/2021\/06\/image9-1536x914.png 1536w, \/wp-content\/uploads\/2021\/06\/image9-2048x1218.png 2048w, \/wp-content\/uploads\/2021\/06\/image9-600x357.png 600w\" sizes=\"(max-width: 2192px) 100vw, 2192px\" \/><\/a><\/p>\n<p>\u5730\u7406\u7684\u306b\u5206\u6563\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3001\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30d6\u30e9\u30f3\u30c9\u306f\u3001\u9867\u5ba2\u304c\u88fd\u54c1\u3084\u30b5\u30fc\u30d3\u30b9\u306b\u4e0d\u6e80\u3092\u6301\u3063\u3066\u3044\u308b\u5f31\u70b9\u5206\u91ce\u306b\u7126\u70b9\u3092\u5f53\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u307e\u3068\u3081<\/strong><\/p>\n<p>Twitter\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u611f\u60c5\u5206\u6790\u3092\u884c\u3044\u3001\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u3001\u30ef\u30fc\u30c9\u30af\u30e9\u30a6\u30c9\u3001\u30c7\u30f3\u30c9\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u3063\u3066\u611f\u60c5\u3092\u53ef\u8996\u5316\u3057\u3001\u5730\u7406\u7684\u306a\u5730\u56f3\u306b\u30d7\u30ed\u30c3\u30c8\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u30d6\u30ed\u30b0\u306e\u30d1\u30fc\u30c81\u3067\u306f\u3001GridDB\u3092\u4f7f\u3063\u3066twitter\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\u30af\u30e9\u30a6\u30c9\u30fb\u30c8\u30ea\u30ac\u30fc\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067\u3001\u611f\u60c5\u5206\u6790\u3092\u81ea\u52d5\u5316\u3057\u3001\u611f\u60c5\u306b\u5bfe\u3059\u308b\u6d1e\u5bdf\u3092\u69d8\u3005\u306a\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3\u30fb\u30d6\u30e9\u30f3\u30c9\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3066\u3001\u3088\u308a\u826f\u3044\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u6d3b\u52d5\u306b\u5f79\u7acb\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/strong> <a href=\"https:\/\/github.com\/07manisha\/TwitterSentimentAnalysis-2\">Github<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u30d1\u30fc\u30c81\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001GridDB\u306ePython\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u88c5\u3057\u3066\u3001Twitter\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u3068\u53d6\u5f97\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u4eca\u56de\u306e\u30d6\u30ed\u30b0\u3067\u306f\u5f15\u304d\u7d9a\u304d\u3001\u611f\u60c5\u5206\u6790\u3068\u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316\u3092\u884c\u3044\u307e\u3059\u3002\u5404\u30c4\u30a4\u30fc\u30c8\u306e\u611f\u60c5\u5024\u3092\u8a08\u7b97\u3057\u3001 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":50126,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50747","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u306f\u3058\u3081\u306b\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u306f\u3058\u3081\u306b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-01T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:54:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2019\/09\/python-blog1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1160\" \/>\n\t<meta property=\"og:image:height\" content=\"653\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"5\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316\",\"datePublished\":\"2021-07-01T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:54:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/\"},\"wordCount\":76,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2019\/09\/python-blog1.png\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/\",\"name\":\"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2019\/09\/python-blog1.png\",\"datePublished\":\"2021-07-01T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:54:41+00:00\",\"description\":\"\u306f\u3058\u3081\u306b\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2019\/09\/python-blog1.png\",\"contentUrl\":\"\/wp-content\/uploads\/2019\/09\/python-blog1.png\",\"width\":1160,\"height\":653},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/www.griddb.net\/ja\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316 | GridDB: Open Source Time Series Database for IoT","description":"\u306f\u3058\u3081\u306b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/","og_locale":"ja_JP","og_type":"article","og_title":"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316 | GridDB: Open Source Time Series Database for IoT","og_description":"\u306f\u3058\u3081\u306b","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2021-07-01T07:00:00+00:00","article_modified_time":"2025-11-14T15:54:41+00:00","og_image":[{"width":1160,"height":653,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2019\/09\/python-blog1.png","type":"image\/png"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"griddb-admin","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"5\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316","datePublished":"2021-07-01T07:00:00+00:00","dateModified":"2025-11-14T15:54:41+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/"},"wordCount":76,"commentCount":2,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2019\/09\/python-blog1.png","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/","name":"GridDB\u306b\u3088\u308bTwitter\u611f\u60c5\u5206\u6790 \u2013 Part2. \u611f\u60c5\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2019\/09\/python-blog1.png","datePublished":"2021-07-01T07:00:00+00:00","dateModified":"2025-11-14T15:54:41+00:00","description":"\u306f\u3058\u3081\u306b","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/twitter-sentiment-analysis-with-griddb-visualization-of-sentiment-data-part-2\/#primaryimage","url":"\/wp-content\/uploads\/2019\/09\/python-blog1.png","contentUrl":"\/wp-content\/uploads\/2019\/09\/python-blog1.png","width":1160,"height":653},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/www.griddb.net\/ja\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/comments?post=50747"}],"version-history":[{"count":1,"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50747\/revisions"}],"predecessor-version":[{"id":51584,"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50747\/revisions\/51584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/media\/50126"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}