How can I pull and concactenate a Wikipedia table with individual article data - sparql

I'm looking to pull together a full list of the current FTSE 100 constituents with the addition of a column highlighting when the company was founded.
Each wiki info box for the individual companies within a table contains the founder date. I'm struggling to work out the function in sparql utilising dbpedia to take the existing ftse 100 table.

Related

GDELT Medical/Doctor/Nurse/Hospital protest data

I am trying to fetch data related to medical or doctor related protest from gdelt. I have tried using GDELT API, it returns results with a few irrelevant links but for further analysis it has very few columns.
While using Big query the columns returned our more and good for analysis. But I want to know what event codes should I use to fetch only medical or doctor related protests data.

Tableau count values after a GROUP BY in SQL

I'm using Tableau to show some schools data.
My data structure gives a table that has all de school classes in the country. The thing is I need to count, for example, how many schools has Primary and Preschool (both).
A simplified version of my table should look like this:
In that table, if I want to know the number needed in the example, the result should be 1, because in only one school exists both Primary and Preschool.
I want to have a multiple filter in Tableau that gives me that information.
I was thinking in the SQL query that should be made and it needs a GROUP BY statement. An example of the consult is here in a fiddle: Database example query
In the SQL query I group by id all the schools that meet either one of the conditions inside de IN(...) and then count how many of them meet both (c=2).
Is there a way to do something like this in Tableau? Either using groups or sets, using advanced filters or programming a RAW SQL calculated fiel?
Thanks!
Dubafek
PS: I add a link to my question in Tableu's forum because you can download my testing workbook there: Tableu's forum question
I've solved the issue using LODs (specifically INCLUDE and EXCLUDE statements).
I created two calculated fields having the aggregation I needed:
Then I made a calculated field that leaves only the School IDs that matches the number of types they have (according with the filtering) with the number of types selected in the multiple filter (both of the fields shown above):
Finally, I used COUNTD([Condition]) to display the amounts of schools matching with at least the School types selected.
Hope this helps someone with similar issue.
PS: If someone wants the Workbook with the solution I've uploaded it in an answer in the Tableau Forum

Bulk data filters in Tableau

Our organization is in e-commerce and users are looking to change a filter everyday with a different list of items, and none of the users will have their own license, just read-only access. The data is connected through Google Big Query, is there a way to have this bulk filter upload capability without the License owners having to touch the filter each time?
Example
Product ID is the filter
Monday: they have a list of 10,000 ID's they want to check sales for
Tuesday: They have a new list of 4,000 different ID's they want to check sales for.
Without clicking each ID each time, is there a way to just upload a list, csv, google sheet etc.
We thought users can upload a list of Product ids to Google sheets which can map to a BigQuery table. We can use it to join with the sales table and get the relevant data. However this becomes unmanageable when we have more than 1 user as users might step on to others data.
Any suggestions/recommendations are welcome. Our team is pretty new to Tableau as such. Let me know if any additional details are needed.
Have you tried changing the filter type to "Multi Values (custom list)" and then having the report user paste their list into the filter? See below:

What is the most performant way to build and execute a multiple where clause in SQL from a single table of identifiers?

Here's the challenge. Users want to be able to create filters based on N-criteria and the criteria being used for the filter is a fluid heirarchy. To simplify it, let's use two hierarchies that the user could select from:
All Territories
Europe
UK
France
Americas
US
Canada
Mexico
Media
Music
Downloads
CDs
Movies
Streaming
DVD
Objects would have a table of tags associated with them. The ObjectsTags table would contain an indicator as two which type of data the tag is linked to
The issue is that user would want to select and group the tags they want to filter by. So they might want Movies in Europe so they would select those three tags as a single grouped filter. It's easy enough to get a filter based on those three tags that says:
Any object that has a tag of: (All Territories OR Europe OR UK or FRANCE) AND (All Media OR Movies OR DVD OR Streaming). The challenge is that I need to support any number of new hierarchies that might be needed and any level of filters, since a user could also want a filter that returns everything from that filter as well as all of the CDs in the US.
Is there any new feature in SQL Server that would be better suited for handling this type of a where clause in a performant way?
You are either going to have to create your where clause dynamically, or you will pre-create the SQL using a where clause similar to the following:
where country = coalesce(p_country, country)
and media = coalesce(p_media, medias)
and music = coalesce(p_music, music)
The really cool part of this statement? Your performance will be the
worst that it can possibly be.
I recommend creating a dynamic statement with the specific conditions you need.

Show hitted documents in the same series together in Lucene

The are some articles are written in several parts,
for example, I got those articles from IBM developer works:
Distributed data processing with
Hadoop, Part 1:Getting started
Distributed data processing with
Hadoop, Part 2:Going further
Distributed data processing with
Hadoop, Part 3: Application
development
I will index those three articles separately. And some one search certain keywords, it is possible the part3 is on the top of hit whle part1 is on the 32th. Therefor, if I list results page by page, the part1 and part3 will display on different page.
How can I make sure the hitted documents in the same series displayed together?
I guess in SQL, we can use "group by".
I believe what you are asking for is Field Collapsing, which is currently a trunk feature in Solr, and will be incorporated into the next Solr version.
If you want to roll your own, One possible way to do this is:
Add a "series id" field to each document that is a member of a series. You will have to ensure that this gets incremented for every new series.
Make an initial query to Lucene, and get a hit list.
For each hit, check to see if it has a series id; If it does, make another query by the series id in order to retrieve all the members of the series.
An alternative is to store the ids of all the series members in a field inside each member's document.