How to get multilingual sites after Wikidata reconciliation in OpenRefine - wikidata

I have a column of reconciled entities in OpenRefine which include entities like Q56085233 and I would like to retrieve all links inside "Multilingual sites", if possible with a separator or only one at a time.
That is Q56085233, for instance, has two pages, one from "commons" (https://commons.wikimedia.org/wiki/Category:Wikimedia_Tamazight) and the other one from "meta" (https://meta.wikimedia.org/wiki/Wikimedians_of_Tamazight_User_Group).
Is there a way to retrieve both websites from the "Add column from reconciled values" function? Moreover, is it possible to first call only "meta" pages, and then only "commons" pages?

The Wikidata reconciliation service supports special "properties" to fetch such things, as documented at https://wikidata.reconci.link/ (look for "special properties" there).
The links inside the "Multilingual sites" are called "sitelinks". For meta.wikimedia.org they can be fetched by using the Smetawiki code in the "Add columns from reconciled values" dialog. You could similarly fetch sitelinks for other Wikimedia sites (Sitwiki for the Italian Wikipedia, for instance).

Related

Google Analytics Enhanced Ecommerce - Product Impression - List Name Parameter Best Practices

From Google's Docs I learned almost everything I need to know on how to use "list_name" with product info. Two things I'm unclear on and looking for best case practices:
1) Should the list name include the page it's on, such as "Home Page Books" for the home page, and then on the book category page "Books Page Books"? Or should both just be called "Books" (because it's the same list just on different pages)??? Maybe the GA reports already add the "appearing on" url data to the list data, so the first way would just look strange, be redundant, and segment something that shouldn't be segmented??? Or maybe the intent is each list is unique and gets its own name??? So maybe you have a "Home Page Search" list for the search feature on the home page, and a "Blog Page Search" list for the search feature on the blog index page??? Or maybe GA intends you to only have one "Search" list that describes the search functionality no matter what page it's on, and GA automatically adds in the url/page data so you can segment by page?????
2) I'm a little fuzzy on what a "list" is defined as, thus where to, and where NOT to use this. If it's a page listing a "red widget", "blue widget", and a "green widget" it's a "Widget" list and everything makes sense. But as an example, what if it's a text link in the body of your homepage text for a "paid consultation"? To me, that seems like a "product impression" just like with the widgets, so you'd want to record that data. So with that assumption, would I use a list_name of "Paid Consultation" and set it up as a list of one item??? I guess what I'm unclear on, does Google intend a "list" as literally a list of multiple products of the same kind, and they don't consider a single product text link as part of a list" -OR- is "list" a clumsy name used because they could come up with anything better and the intent of their system is that anytime you mention a product, whether in a nice grid of multiple products, or as a lone text link on the page, you register the product impression. Or to ask this another way: Is Google's intent for this feature "showing how different products in a category compeat", or rather to record every time you mention any product anywhere on your website???
From looking at the Google Analytics Demo Account Data...
Product List Name is generic, and should be the same for multiple pages. As an example "Search Results" would be a list name for any page that has a search results list. This data can be segmented by "page" by using the "Secondary dimension" button from inside the report under "Conversions" -> "Ecommerce" -> "Product List Performance".
The intent with a "list" at the most basic level, is to measure product impressions. Think of this like answering the question: How many times did I show this product to the user before they clicked on it? For products mentioned as a link inside page text, I'm using the list name of "Text Link".

Drupal 7: In Views, how could I order/sort in this manner?

Say for example I am printing name tags for thousands of content nodes in one content type called “Attendee.” Each of these nodes specifies a single "Attendee" for an event, (and their respective name tag). Say these attendees also needed name tags printed out for their “friends” who are attending with them. That is no problem—these “friends” obviously need their own node with the same fields to get their own name tag, so I distinguish that they are a “Friend of an Attendee” with a simple checkbox.
Now here’s the sorting order / grouping problem: When rendering the view, I need these “friends of attendees” to appear “right after” the attendee they are going with. Is there a way for me to maybe create a new autocomplete text field to link these together and then have them output next to each other?
p.s. I am technically using the Views PDF module, but it has the basic Views functions, so if it's possible with Views, it will probably be possible with this module.
In order to group these together, you have to have some way of linking friends to the attendees. You can do this by adding an entity reference field to the content type. See https://drupal.org/project/entityreference
here are the steps:
from admin/structure/types select "manage fields" on your content type
on the "manage fields" tab, click in "Add new field", and type in a label name. say "friend of"
for "type", select "Entity Reference", and for now, choose "Autocomplete" for your widget
click save
in the field edit tab:
select Target Type: Node
under Entity Selection, set Mode: Simple
set Target bundles: ( your attendees type )
click save
go to admin/config/development/performance and clear all caches
You should now see an autocomplete field when you edit an attendee that you can use to set the friend relationship
Things normally get a bit complicated now, as you have to tell views about the relationship between attendees and their friends. If you want to keep this dead easy, you can set the primary attendees as their own "friend" ( who they are going with ) so that you can group them together easily with their companions, without having to worry about contexts, relationships, or any other fancy stuff.

multiple node reference formatted in drupal7

In my website, I have a section for documents. Those documents are available in different languages.
When I show those documents, I want to group them to have an input like that :
Document-001 [ENGLISH] [DUTCH] [CHINESE] [FRENCH]
... and when we click on "english" , it download the english version.
How can I do ?
Right now, I have a CCK named "documents" where I put files and description. I'm trying to use them to show it like the example above but I didn't found the way to.
I used the "Field collections" Module to set "Document" and "Language" fields.
With that implementaion, in every node, I can attach multiple documents and languages.

Create a Drupal view that loads all articles that share any one taxonomy term (Contextual Filters)

I have a custom article type that contains a list of taxonomy terms
For example articles can be tagged with a location and possibly multiple topics.
On any given article's display page I would like to be able to pull a single view that gives a list of other articles that share any of of the taxonomy terms.
If an article was tagged with the topics of recipes & chicken as well as the location of new york I would like my single view to present the five most recent articles that share any one of the above tags.
The taxonomy terms have been added to the articles in the form of new fields of either the "Term reference" or "Node Reference" type. (field_topic, field_location)
I know that I have to somehow use a Contextual Filter, but I am having some trouble figuring out how to set and debug my "default argument".
I suspect that I've got to choose:
Taxonomy term ID from URL
Load the default filter from the node page
Do something with PHP code
I'm really struggling to get this displaying anything, and I can't even see a way to debug to find out what the values I'm getting are.
Can anyone help figure this out? Even some guidance on the right direction to look would be welcome at this point.
You can do this in just clicks if you have Drupal 7 and Views 3 (You already have this I'm sure).
Your configuration is correct so far.
Choose " Provide default value " as action to take if arg is not given.
Choose Term ID from URL"
Check "Load default filter from node page, that's good for related taxonomy blocks"
:)
this will load term IDs from the current node's term reference field if arguments are not given.

Drupal 6: creating location list manually or dynamically via cms

I'm starting my first Drupal project, pretty excited :) I have a question;
the project is a hotel directory site. at sidebar I have locations list (London, Manchester, Liverpool, etc..) and filter the hotels related on location click.
So, how should I create these cities? Should I put them manually and give links manually depending on location id? or is there any better way to create this location list and linking filtering dynamically (via cms, or custom module, etc...)
Appreciate advices!!!!
This would be a good example of when to use the core (part of the base Drupal software) Taxonomy module. With Taxonomy you can set up one or more lists of terms that describe some or all of your nodes. For example, you can have a list of locations, a list of amenities (pool, sauna, golf course, etc.), and a list of price ranges (low, medium, high).
For each hotel you can select a location from the locations list, one or more amenities, and a price range. Then you can select all of the hotels that match one of the lists, using a neat feature of Taxonomy where it will return a list of those nodes.
The lists of terms are called "Vocabularies", and you'll want to create a vocabulary for each list. Go to Administer -> Taxonomy -> Add Vocabulary. Give it a name, like "Location" a description if you'd like, and choose the content types that it should be allowed to be associated with. (In your case, the hotels should probably be a custom content type that is different from the Page and Story types, but for trying this out, just pick Page for now.) There are several checkboxes at the bottom to decide on: Don't check Tags or Multiple Select, as these allow free tagging by users (images users making up city names) and also allow a node to have multiple locations. Do check the Required checkbox, as each hotel should have one.
Click Save and then click Add Terms on the vocabulary list page, and add a few locations. Then create a few hotel nodes (Pages for now) and you'll see that there is a new section in the Create Content page that is a dropdown selector that contains the locations. Choose one for each hotel, and add a few hotels in the locations that you just created.
To select the hotels for a given location, you will need to know the path associated with each term. Go back to the Taxonomy admin page and choose List Terms for the Location vocabulary. On the Terms in Location page you can get the list of hotels for a location by clicking on a location's name. The resulting page's path (e.g. example.com/taxonomy/term/2) would be what you'd use in your menu for that location. Each location will have its own term number that would be at the end of the path.
This is the simplest way to use the Taxonomy module, but it works really well with other modules like Views. Using Views you can control the format of the list of hotels for each location.
For more information, see the Taxonomy documentation and especially this sub-page called About Taxonomy.

Resources