I am trying to create a field between point A and B using formulas in Tableau CRM(salesforce), I have longitude and latitude available. Any ideas??
(something like MAKEPOINT in tableau)
Related
I have a lot of sensors, multiple type of sensors: temperature, humidity and some other types. Once installed, their location won't be changed. I have marked 2 tags (longitude and latitude) as tags, and values like ( temperature, humidity ) as fields.
I would like to locate a group of sensors by certain positions, similar to:
SELECT * FROM demo WHERE longitude > 29.46786 AND longitude < 32.9697 AND latitude > 96.80322 AND latitude > 98.53506
But it seems that tags in CnosDB don't support non-string type per this doc. There is no CAST functions either per this doc.
Anyway I could do such math operations over the tags?
SELECT
name,
latitude,
longitude,
CONCAT(latitude,',',longitude) AS location
FROM
`bigquery-public-data.ghcn_m.ghcnm_tavg_stations`
LIMIT
1000
I'd like to display those stations on a Bubble Map in Data Studio.
But it doesn't accept location as the location dimension. How do I have to go about this?
Strange... It worked for me. I created a table like this:
CREATE TABLE test.test
as
SELECT
name,
latitude,
longitude,
CONCAT(latitude,',',longitude) AS location
FROM
`bigquery-public-data.ghcn_m.ghcnm_tavg_stations`
LIMIT
1000
then used it as a datasource for the Datastudio Report.
Make sure that you selected the Type of the field as Latitude, Longitude and pressed Refresh Data
There are APIs for accessing the current weather based on latitude and longitude, but I don't see any way to get the latitude and longitude of a county.
The Yahoo Weather API uses WOEIDs to select location, and WOEIDs exist for both cities and counties.
I am analysing app data which contains lat value and lon value of a user visited places. I was able to export the data to tableau and plot it on the map but I want to find the name of place for each pair of lat and lon.
One solution could be, if I get a table of three columns (Lat, Lon, Place) then I can join it with my user data table to find the name of a place at a given Lat and Lon.
My question is, do we have a ready made table with the above three columns which I can import in my SQL-Server? I am interested in places of UK or London. Is there any other approach to achieve it?
You can get this from the Ordinance Survey which should get you lat, long, postcode;
https://www.ordnancesurvey.co.uk/business-and-government/products/code-point-open.html
You'll then need another data source to map the postcode to location name (e.g. town, county etc). See the similar post below;
Where can I find a list of all UK _full_ postcodes including street name and their precise coordinates?
It might take a little fiddling about, and you're always going to have the issue with data being a little out of date but it should be good enough.
I wrote an API wrapper in R for postcodes.io, which is a free UK postcode database. Check the original documentation so that you could create an API wrapper in your language of choice. Wrappers in languages other than R are also available.
If you use R, then type you can get the place names in the following way:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("erzk/PostcodesioR")
library(PostcodesioR)
rev_geo <- reverse_geocoding(0.127, 51.507)
It will return a list with extensive information about the latitude and longitude, e.g. wards, NUTS, administrative district, county, parish, consituency, CCG and many more.
There is also a bulk_reverse_geocoding() function which takes several lat and lon inputs.
I have Gmaps embedded in my site which pulls out a list of dealers from my database around the world and plots their location with a marker based on the dealer postcode in Gmaps. This works great however I need to extend this functionality to support dealers who do not have a postcode but rather, they are assigned to Countries.
So for example, Test Dealer could be assigned to Germany and Belgium so I need to somehow get a generic longitude and latitude value for the country names "Germany" and "Belgium" and then show a marker for those long/lat values.
Is this possible?
If so, where do I start?!
Thanks for reading.
kris
Try using google's geocoder. Just provide a generic address, in your case a country and it will return the center point of that country together with the coordinates(latitude and longitude)
Here's a link. https://developers.google.com/maps/documentation/javascript/geocoding