Can Here Developer API be used with Google Sheets to geocode? - google-apps-script

I've been using a script on google sheets to get coordinates from addresses in a certain column that gets updated. Is there a way to use the Here API instead to get those coordinates? Googles limit is much less than here which is why I'm trying to switch.

Yep, you can use [HERE Geocoding API].(https://developer.here.com/documentation/geocoding-search-api/dev_guide/topics/endpoint-geocode-brief.html)
Here's what a call looks like using an API Key:
https://geocode.search.hereapi.com/v1/geocode?q=5+Rue+Daunou%2C+75000+Paris%2C+France&apiKey=API_KEY

Related

How to validate addresses in Google Sheets?

I'm trying to validate a list of addresses in a google sheet column, and create from it a well formatted new column(s). I came across the Google Maps Address validation API but I'm not sure how to use it or if there is another better solution out there.

Can you write Google finance directly to an array?

Can googlefinance write results directly to an array? I am currently writing it to a sheet first and then pulling the sheet range into the array. It would save a lot of processing if I could write it directly to an array so I am investigating. If you have knowledge and expertise on this could you let me know?
I get an error when I try. Is it just incorrect syntax or is what I am trying to do not possible? I would like to avoid writing to the sheet to save on time and in sheet processing. But not sure if the function is allowed to write into a variable instead of a sheet
function TEST() {
var APPLEPRICEARRAY = GOOGLEFINANCE("AAPL","price","1/1/2009","12/31/2020","WEEKLY")
};
Is it just incorrect syntax?
You seem to confuse functions (formulas) that are exposed in the Google Sheets application with services that are available in Google Apps Script environment. What you wrote would require GOOGLEFINANCE to be a service "attached" to global scope, so yes, this is incorrect.
But the error you get is not a syntax error, your reference is invalid (no GOOGLEFINANCE variable is ever declared in the global scope, therefore none can be referenced), hence you get ReferenceError.
Can googlefinance write results directly to an array?
No, for reasons explained above, it cannot. I apologize for this, but you are comparing apples with oranges: an array is a data structure (an indexed collection, to be precise) in JavaScript (on which Google Apps Script language is based), while formulas are not even built-in objects: they are not part of the language.
Is what I am trying to do not possible?
Unfortunately, Google Finance API has been shut down for a long time now, so no, not possible.
Not screaming with ALL-CAPS is considered a common courtesy as well
In the code example is shown that you are trying to use a Google Sheets function as a Google Apps Script / JavaScript function. That is not possible.
Unfortunately there isn't Google Apps Script advanced service for Google Finance and there isn't a API.
From https://groups.google.com/g/google-finance-apis
Dear Finance API users,
As you may have heard from the Google Developers Blog, Google is doing an API spring cleaning. One of the APIs affected is the Google Finance API (both the Portfolio API and the Finance Gadgets and Tools API), which will be shut down on October 20, 2012.
References
https://developers.google.com/apps-script/guides/services/advanced

Want to create google sheet,docs ,folder using apps script for my google sites

i want allow my users to create google drive docs,sheet,folders,files etc. from my google classic site itself.
i don't have any idea how to do this.Can we use google drive api?
if yes ,how to call drive api from apps script to create new google sheets,docs etc.
or
is there any other way to create it.
i want to use this in my google sites
Anybody have any idea please let me know
It should be rather simple. Because you are working within Google Apps Script, you do not need to use the Drive API at all. You simply have to use the services made available to you by Google. Just read their documentation, like here. Right at the top, the first method clearly states SpreadsheetApp.create(name) will create a spreadsheet. Same thing with DocumentApp.create(name), FormApp etc.

Update Google Map automatically when Google spreadsheet is updated?

I'm using Google Maps Engine Lite and placing markers on the map from a Google spreadsheet. At the moment I'm importing these manually into a layer.
Is there a way to automatically update the pins when the spreadsheet is updated?
There very little out there on this or is it because this needs to be done via the API with a coded solution?
I actually found that using Google Fusion tables solved this problem so that when that was updated, so was the map.
You can use the Google Spreadsheets add-on called Geosheets to create your map. That way your map will automatically update in realtime whenever data changes in your spreadsheet.
this GeoSheets looked cool at first, but the documentation is either wrong or it is mapping incorrectly. I gave it 20 addresses in Florida, and it placed them all over the world. Also after testing for 30 minutes I ran in to the daily free limit.

Google gadget/spreadsheet: Grab spreadsheet key for gadget

So I'm working on a google gadget(really only gadgetizing so I can get a datastore for this) that I want to be embeddable in a google spreadsheet (after this point, I'm going to skip the word google - you can just imagine it's there).
I want to use the spreadsheet that I embed the gadget in as a key/value store for the data I enter within the gadget (I think the 2K limit for gadget data won't be enough). It looks like what I'll want to do is use the gadget's feed api to manipulate the
spreadsheet's list feed. However, in order to know what the spreadsheet's list feed is, I need to know the key for the spreadsheet (which is in the URL). I don't think I can scrape the key directly from the URL, since the gadget seems to be inserted via iframe.
So I need to know how I can tell a gadget that I'm embedding in a spreadsheet the key for that spreadsheet. I suppose I could have the user enter it manually, but I'd much rather have my gadget know the key programmatically.
You might want to try using Google Apps Script instead of a gadget. It is aware of the spreadsheet it is embedded on.
http://code.google.com/googleapps/appsscript/
You should be able to retrieve a list of spreadsheets by making a GET request to this URL:
https://spreadsheets.google.com/feeds/spreadsheets/private/full
See Google Spreadsheets API for more details:
http://code.google.com/apis/spreadsheets/data/3.0/developers_guide_protocol.html#ListingSpreadsheets