Google Sheets Sentiment Analysis - google-sheets

How can I utilize the Google Cloud Natural Language API to perform sentiment analysis for text in a Google Sheet?
Is there an integration available or is there a proper way to integrate their REST API?

I was able to hack something together using Google Apps Script.
You can make a copy of:
https://docs.google.com/spreadsheets/d/1VPOckCelGrjMoF8llnpE6IEM-UybwT6wrYb5BxVERIw/edit?usp=sharing
Be sure to go into the script editor (Tools⇒Script Editor...) and specify your GOOGLE_CLOUD_API_KEY via Script Properties (File⇒Project Properties, Script Properties).

Related

Add custom functions to Sheets from Workspace addon

I have a Google Sheets add-on that provides some custom functions along with other functionality exposed in the sidebar. This is working fine. I also have some other miscellaneous scripts for Docs, Slides, etc. I would like to combine all of these into a single Google Workspace add-on so that people in my company only need to install one single add-on instead of multiple.
From what I've read I can understand how to migrate all of my existing functionality into a Workspace add-on except the Sheets custom functions. I have not been able to find documentation that definitively says if that is possible or not.
So, my question is, is it possible to make custom functions available to Google Sheets from a Google Workspace add-on? If not, what is the best way to request this to Google?

Talend: use Google Spreadsheets as Input and Output

I'm using Talend for several ETL-jobs. Main focus on inserting and updating data defined in local Excel files to Salesforce. Excel and Salesforce are used as Input- and Output-Connections massively.
This works like a charm!
Now instead of Excel I need to use Google Spreadsheets as data inputs/outputs. Just manually download as Excel isn't good enough. Reason: I need a highspeed repeatable process executed thousands of times bi-directional. Uploading/Downloading XLS/CSV is not an option.
As an unfortunate, my researches concluded that there is NO Google spreadsheet connector available. I found this legacy-project which seems to be abandoned: https://code.google.com/p/google-talend-components/ - it is outdated from Talend-side as well as from Google (old API versions).
One other thing I've seen, is that Talend comes with Google Big Data Support: https://www.youtube.com/watch?v=BK6G3sTmwVE - Also Google Big Data might be somehow connectable to Google Spreadsheet - but I wasn't able to figure out how. Is this easy or hard? How to start? What to read?
I need to know if there is any viable approach to read and write data with Talend from and to Google-Spreadsheet.
Alternatively is there an other ETL-tool like Talend which has connectors to Google Spreadsheet AND Salesforce out-of-the-box?
Is there a direct google docs connector in Talend, no. But you can do what you are looking to do if you think of the problem a little differently. It sounds like you need to read and write to spreadsheets then upload/download from google. Lets take each problem separately.
Upload/Download
Google storage. If you need to upload and download files from google Talend has excellent integration with their API. As you mentioned, Talend --> Big Data has components to interact with Google Storage. This type of storage is primary meant as back end storage for an application.
In Talend under Cloud-->Google Drive there are components to upload and download from Google Drive. Google Drive is primarily meant as Chrome app and has direct integration with Google Docs.
Writing to Google Docs
Regarding your need to interact with google docs, you do not need any special components for this. Google docs can utilize csv and Excel formats. If you create and modify your documents in Talend using the standard file interaction components ( delimited, Excel, etc.) you can upload and download these documents using one of the two methods I described above (Google Storage or Drive) depending on what type of storage you are using.

google bigquery visiualization

I want to visualize the data present in big query by a iOS app just like tableau . Any suggestions are welcomed . I have visualized the data present in big query , in tableau and i want to know are there any other visualization tools cause tableau is paid where as i want to visualize the data for free and i want to implement the functionality in iOS app. Please help me on this ..........
have done some r&d and from there i know the data can be visualized by using Google chart any help on that
My favorite new open source dashboard for BigQuery is re:dash, check it out:
Code: https://github.com/EverythingMe/redash
Demo: http://demo.redash.io/
If you have GCE (Google Compute Engine) you can run your own private instance:
Instructions: https://github.com/EverythingMe/redash/wiki/Setting-up-re:dash-instance
Currently: gcutil addimage redash-040b563 gs://redash-images/redash-040b563.tar.gz
If you're willing to write a little bit of code, there is a sample appengine app here that runs BigQuery queries and saves the results in a dashboard.
Another good option is to use Apps Script to write queries and chart the results in Google Sheets. Step by step instructions are in the book Google BigQuery Analytics, but you may be able to just read the relevant snippet here or the blog post here. Sample Apps Script code is here.
You can build reports in Google Sheets using a free BigQuery Reports Add-on.
Benefits:
No CSV-files or coding required,
Queries are saved for future use,
Analysts and developers can create shared SQL-queries with pre-defined variables,
Variables allow modifying the result without editing SQL-syntax,
Everything works in Google Cloud.

Is it possible to read a Google Spreadsheet from (server-VM-run) Dart code?

I'd like to read data from a Google Drive Spreadsheet in Dart code (running as a console app in the VM, not in the browser). I'm somewhat confused by the names of the API; Sheets is part of Google Drive, but all the Google Drive API docs I can find relate to integrating the UI of Drive into your app.
There's also this question on SO, but it's over 2 years so I'm hoping that it's no longer correct, and there is an API.
I found this Dart Google API library, but it says:
THIS LIBRARY IS DEPRECATED
Please use the Google API Dart libraries in http://pub.dartlang.org, the Dart package manager
Search for 'google' or the API of your choice. For example:
http://pub.dartlang.org/packages/google_drive_v2_api
However I'm struggling to find which package I'm supposed to use. The Drive API one doesn't have a lot of info, and there doesn't appear to be one with "Sheets" or "Docs" in the name.
You need to use the Spreadsheet API https://developers.google.com/google-apps/spreadsheets/.
There isn't a Dart lib for it, but it's a well formed REST API so very easy to program against.
Sheets is not exactly part of Google Drive, it is part of the Google Docs productivity suite that is stored in Google Drive. Google Drive is the general cloud storage layer. The Drive API is for interacting with files of all types that are stored in Drive. You can interact with Sheets files using that API to modify metadata or import or export to/from other formats like csvs. That is possible to do from Dart (I'm not sure if there is a Dart-specific client library, but this API is just rest calls so its always possible.)
If you want to interact with a Sheet at a lower level to do things like modify a single cell, you can use AppScript, however that cannot be done from Dart.
Usually for Google APIs support generators that create access libraries for every language.
For example https://pub.dartlang.org/packages/google_drive_v2_api.
You can generate them yourself (also for your own endpoints) using https://pub.dartlang.org/packages/discovery_api_client_generator but for most APIs there are packages already in pub.dartlang.org.

How do I interact with Google Docs (Sheets) from another scripting environment (VB.net within Grasshopper3d)?

I'm scripting with VB.net (and sometimes with c#) within Grasshopper (a plug-in for a 3d modeling program called Rhino), and I'd like to interact with Google Docs, specifically with the spreadsheet app.
I want to be able to send data from Grasshopper to populate google spreadsheets.
The data is always either numerical or string.
I'd also like to generate charts from the data.
There is a solution to this at the bottom of this thread on the GH website.
.. And this is a solution for reading that should work in python as to use c# would need you to use other libraries.
You need to publish the spreadsheet as a csv first.
import urllib2
myUrl="https://docs.google.com/spreadsheet/pub?key=0AgIWT_wqd-VmdE1NekRSWFZoUnBQdWJhYUhwcU1vclE&single=true&gid=0&output=csv"
response = urllib2.urlopen(myUrl)
print response.read()
Here's a working GH implementation
[this should probably be a comment, but I can't comment yet]

Resources