how to retrieve all authors for each Scopus record in a query - scopus

I have retrieved some records from Scopus using elsapy, using this search query:
search_query = 'TITLE-ABS-KEY(teleworking) AND SUBJAREA(SOCI)'
search_results = ElsSearch(search_query, 'scopus')
All is good except that the retrieved records only contain the first author for each paper.
Take for instance this record, with Scopus ID: 1542427662. If you have an API key, you can try:
https://api.elsevier.com/content/abstract/scopus_id/1542427662?apikey=your-api-key
All you got is the first author, but this paper actually has 6 authors. What is the proper way to retrieve all the authors connected to the paper?

In that record, you can see the DOI:
<prism:doi>10.1146/annurev.soc.22.1.213</prism:doi>
Extract this DOI and use CrossRef's API to fetch author data at https://api.crossref.org/works/{DOI}.
In our case, https://api.crossref.org/works/10.1146/annurev.soc.22.1.213 shows six authors in the author field.

Related

Search specific key's value from a json field database entry using eloquent

Hello everyone please I am working on a system and need to add a query that receives a search term stored with the variable $search and fetch all matching values for a specific key in a json field from database.
I have tried the code bellow
$query = Book::whereJsonContains('book_details->author',['like'=>"%{$search}%"])->get();
Book is my model, book_details is the json field name and author is the key. I want to retrieve every book with authors related to the search term
In Laravel, you can perform a query that retrieves all matching values for a specific key in a JSON field by utilizing the whereJsonContains method. A revised version of your code could look like this:
$query = Book::whereJsonContains('book_details->author', $search)->get();
This query will return all Book records where the value of the author key in the book_details JSON field contains the search term stored in the $search variable.
Note that you don't need to wrap the search term in % characters, as the whereJsonContains method performs a case-insensitive search for matching values by default.

Return a list of keywords associated with a place id in Google API?

Google API allows to retrieve a list of places based on Text Search in an area and the place_id initially retrieved can then be used with Place Details to get more information. However Google doesn't provide relevant keywords associated with this place. I am wondering if given a known place_id, it is possible to search all the associated keywords that would have return this result in a Google search otherwise.
For instance, a Text Search for "Mexican" Restaurant in Chelsea would return a number of places including place_id X. If you search for "Tacos" in Chelsea, it may return a number of places also including place_id X. Is there a way for me to query details about place_id X and return keywords "Mexican" and "Tacos" ?
If not, is there a cost-effective workaround? I thought about creating a master keywords database of 1000+ terms relevant to my market and then query every term in all the areas my app intends to serve and associate each keyword search with place ids but it may cost me a lot vs. querying these details with known place ids directly.
Thank you!

Using Bigsheets I want to refine my twitter tweets, like removing url, and # tags etc

Is there any formula or functions which I can use to remove URL and #tags etc which come when we get the tweets using twitter in the node. I also need to make new columns which would contain the tweets which have specific keywords. But when I use the inbuilt formula "contains" in IBM BigSheets it is not of much help.
Finally, I need my result to extract the tweets into different columns based on the sentiment score they have got. I have attached my "twitter in" node with sentiment node to get the sentiment score. Therefore, it should make separate columns based on the score it has got and also based on the keywords it contains. Can we create a function to do so?

Elasticsearch with multiple search criteria

I am try to build a full text search engine using elasticsearch. We have a application which has conferences running across the globe. We have the future and past conferences data. For a POC we have already loaded the conferences details into elasticsearch and it contains fields like title,date,venue,geo_location of the venue as document.
I am able to do simple search using match all query. And also by using function_score I can get the current on going conferences and also using user geo location i can get nearby conferences to users location.
But there are some uses cases where i got stuck and could not proceed. Use cases are.
1) If user try to search with "title + location" then I should not use the user current geo location rather whatever user has provided the city_name use that place geo location and retrieve those doc. Here I know some programming is also required.
2) User search with "title + year", for ex. cardio 2014. User interested to see all the caridology conf of 2014 and it should retrieve that year documents only. But using function score it is retrieving the current years documents.
First of all let me know that above two use cases can be handled in single query. I am thinking to handle it one request, but got stuck.
A proper solution would require you to write your own query parser in your application (outside of elasticsearch) that will parse the query and extract dates, locations, etc. Once all features are extracted, the parser should generate a bool query where each feature would become an appropriate must clause. So, the date would became a range query, the location - geo_location query and everything else would go into a match query for full text matching. Then this query can be sent to elasticsearch.

Sort on a Ref<?> attribute - Objectify Query

I am struck in a data operation where I want to sort results of a query by a Ref field.
Lets say I have the following Data Objects.
EmployeeDO {Long id, String name, Ref refCompany}
CompanyDO {Long id, String name}
Now i want to query employees arranged by company name.
I tried the query
Query<EmployeeDO> query = ofy().load().type(EmployeeDO.class).order("refCompany");
Obviously this did not sort results with company name, but this compiled successfully too.
Please suggest if such sorting is possible by this way or some other workaround can be tried?
You can order by refCompany if you #Index refCompany, but it won't sort by company name - it will index by the key (if you aren't using #Parent, just an id order).
There are two 'usual' choices:
Load the data into ram and sort there. This is what an RDBMS would do internally. It's not exactly true that GAE doesn't support joins; it's just that you're the query planner.
Denormalize and pre-index the companyName. Put #Index companyName in the EmployeeDO. This is what you would do with an RDBMS if you the magic sorting performed poorly (say, there are too many employees).

Resources