Apache Superset - Issue visualizing data with deck.gl geojson - geojson

Trying to visualize data into a deck.gl geojson but nothing seem to be working.
Here is the BigQuery SQL query.
select ST_ASGEOJSON(ST_GEOGFROMGEOJSON('{"type":"MultiLineString","coordinates":[[[-73.96943,40.78519],[-73.96082,40.78095]],[[-73.96415,40.79229],[-73.95544,40.78854]],[[-73.97162,40.78205],[-73.96374,40.77715]],[[-73.9788,40.77247],[-73.97036,40.76811]]]}')) as geo
This should give us four lines in Central Park NY.
I have tested the GeoJSON with geojson.io and it seems to be valid.
Valid GeoJSON
When trying to visualize that into a deck.gl Geojson chart nothing seems to show.
deck.gl geojson result in Apache Superset
Could someone help with that?

Take a look at the "deck.gl Path" example called "Path", which seems like a better fit in your case. You will see that the JSON column should essentially just contain a LineString's "coordinates" array (i.e. of <longitude, latitude> position arrays):
In your case, you would break your MutltiLineString into four individual LineStrings, putting each one's "coordinates" array into it's own row in your dataset.

Related

How can I render time-series data on a geographic display in grafana?

My goal is to render time-series data from set locations on a map. Essentially, I have about 30 predefined (static) locations in Switzerland from which I will be receiving real-time data. The data itself is relatively simple, just the signal/noise ratio of the signal we're receiving, which should be updated every few seconds or every minute. I am using InfluxDB as my database. Are there any specific setups I should be using for this kind of visualization?
My first question is: is it best to use the worldmap panel or the geomap panel at this time? I seem to be finding more information/documentation on the worldmap panel even though i have also read that geomap is (or at least will be) its replacement.
Second, I assume that since I'm using time-series data, that I should be using the Time-Series format, and not the Table format. However, I have not been able to render any data points using the time-series feature, even by following the simplest of examples in your documentation. The best I can do is use the Table feature, and internally remove previous points from my database at every iteration (so that multiple points aren't rendered at the same time for each location). Here are two screenshots of when I'm able to render data on the geomap using the Table format, and then after switching to Time-Series format that the points are no longer there (note that I have the same problem with the Worldmap application as well).
I'm able to render data using the Table method:
...but not using time series:
Thanks for any help!
For rendering timeseries data on the geomap, you must convert your lat/long fields to a single geohash field. You'll have to do that prior to inserting the lat/longs into influxDB
See this answer

Is there a way I can get World shapefiles without the countries included?

I'm totally new to shapefiles so I might be missing something obvious but.
I'm trying to get the following shapefiles
A Global shapefile that only has the world boundaries
Every continent shapefile that only has the continent boundaries and no country included.
Any suggestions on where I can get such files? All I can get is one large world shapefile that contains all continents and countries.
You could use the land polygons from the Natural Earth dataset. There is also a countries layer that has a continent attribute that you could dissolve on to create the continents layer (I've never seen that as a prebuilt dataset).
You could probably run a dissolve with QGIS or ArcGIS on a countries shapefile and get the continent boundaries but you might either have to have a continent field or create one yourself for the dissolve.
A world land area would be similar but have it dissolve all boundaries.
Or you could search and find this link which allows you to download it for free.
https://hub.arcgis.com/datasets/esri::world-continents/data?geometry=101.953%2C-89.382%2C-101.953%2C86.054

Google data studio - Use multiple datasheet with same data keys/headers

So I've been stuck in this for some days, tryed a lot of search terms but all of them seems to bring me the same answers and i really need this:
I have a demand to join two different company's datas from the same owner, all of them have the same data sources (excel data sheets from FB ADS).
So they all share the same (keys/headers), like this:
COMPANY(1)'S ADS DATA
COMPANY(2)'S ADS DATA
So this way I need to put then togheter without having to join both of then on excel every time and also give him some nice data manipulation power.
The results should be something like this
By now I was trying to join data from the two companys but I couldn't really figure out how to properly do this so far I've made some tests and tryed reading a couple of articles and google data studio's help files. The merging data function seems to mess everything.
As a result of this merge, GDS gives me this fields:
Shouldn't I see like only one field labeled as cnt and cmp? I've noticed that GDS creates not one, but two data fields. If I try adding all data I need as key the left sheet turns all "0s". What Am I doing wrong here?
I have read your descriptions. It seems that you are looking for a solution to append both tables instead of merging the tables.
Do note that the data blending in GDS is a left outer join.
Hence, instead of doing the blending in GDS, I'd suggest you to append both datasets in Google Sheet in a separate tab before importing to GDS for visualisation. (assuming you don't mind copy-pasting the data into the Google Sheet).
Here is the formula to append both datasets in Google Sheets:
= {QUERY(A!A1:D1000,"SELECT A,B,C,D WHERE A <> ''",1);QUERY(B!A2:D, "SELECT A,B,C,D WHERE A <> '' ")}
I've created some dummy data in this google sheets and appended the data using the formula provided , you may take a look to understand further.
If you are unclear on the difference between merge and append, you may take a look in the Google Sheet documentation as well.
On a side note, I've screencast the process of answering this question and posted on my youtube channel. You may take a look if needed. (Thanks for the question and inspiration you provided for the video)

Google Spreadsheet: Script to pick the right values from data which is html-imported and never in the right order

I have the following problem I can't solve:
There is data of a measuring station for water quality available online (https://hamburg.de/clp/hu/fischerhof/clp1/). It updates every day, but the data is nowhere stored or put into a chart. So my play was to have a script which imports the data automatically. Functions in my spreadsheet would do the rest and put e.g. the water temperature in a chart. So far so good, I found all the scripts and work arounds here.
Then I discovered a problem I can't solve: When the data is uploaded on the website, it is not in the same order. Sometimes water temperature is in the first row, sometimes in the last, sometimes anywhere between. This messes all my data up, as I use a function which filters e.g. every 12-th row, to filter all the water temperature values out and make a chart out of it. When that position changed because of the import, I get wrong values.
Here is my setup so far:
I import the data into Sheet 1 with a script
This script also gathers the data in Sheet 2, where I filter the Water temp values on the right side, the red value shows the problem I mentioned aboth
Have you guys an idea how I can solve this problem? It's my first "project" of this kind, it was really fun until I discovered the problem, but I would really love to make it work!
Use this query
=QUERY(A2:C40,"select A, C where B matches 'Wassertemperatur'
label A 'date', C 'Watertemp.'",1)

Google Spreadsheet chart not pulling information from table correctly

I have 2 tabs relating to the graph I'm working with. I have multiple graphs all working properly but one in particular. I have tried selecting different ranges to use for the data range, I have tried using different types of graphs. All the same I get the same results. The other graphs use the same information from the same table.
The graph's purpose is to compare the Highest Price and the Lowest Price per item. HERE is a link to a sample sheet with the same information as the original. Thank you for any help you can give!
values needs to be numeric not text string so in worst case a conversion is needed:
=ArrayFormula({INDEX(SPLIT(F4:F13, " "),,1), INDEX(SPLIT(G4:G13, " "),,1)})
and then you can plot your chart...

Resources