Retrieve number of citations of a scientific paper in a given year - cross-reference

How can I retrieve the number of citations of a paper in a given year?
I had a look at Scopus Citation Overview API but the pybliometrics documentation says the API key needs to be approved by Elsevier for this purpose, and in fact it is returning error 403.
Are there other data sources from which I can retrieve the number of citations?
The rcrossref package provides a function cr_citation_count which seems to get the number of citation today.
I need the number of citation at a given year (for instance, if a paper was published in 2010, I may need the number of citation in 2015, not as of today at 2021).

First, access the OpenCitations API with a given DOI.
Second, fetch the DOIs of all the citing papers.
Third, use these newly fetched DOIs and loop them through the CrossRef API to obtain the respective publication dates.
Example:
You are interested in obtaining all citations from the year 2020 to the paper with the DOI 10.1080/17512786.2019.1682940.
First, access OpenCitations via https://opencitations.net/index/coci/api/v1/citations/10.1080/17512786.2019.1682940 (which finds 6 citations in total).
Second, fetch the values in the field citing -- they show the DOIs of the citing papers. For example, the second citing DOI is 10.17645/mac.v8i3.3019.
Third, access CrossRef with the help of these DOIs, such as via https://api.crossref.org/works/10.17645/mac.v8i3.3019, and look at the published-field (which is 2020-07-10). Keep only those values that start with the year 2020.
Note - - maybe you could omit the third step if you fetch the creation-field in OpenCitations during the second step (it seems to be identical to the published-field in CrossRef). I haven't tested that systematically.
Be aware that the citation counts between OpenCitations and CrossRef can vary (OpenCitaions usually shows less citations than CrossRef).

Related

How do I get the asdoc output table to show both the variable labels and value labels in Stata?

I'm trying to make a table using asdoc that will include both the value labels and the variable labels in the output. When I run the following line of code in Stata
asdoc list progname progtype progterm publicprivate cohortsize grereq, label
I get this in the console (no variable labels):
But in the word doc, it comes out looking like this (has variable labels but no value labels in the table cells):
How do I get both the variable and value labels in the table?
The last update of asdoc was on April 10, 2021. I announced the following in that update.
It is now almost three years that I have been developing asdoc and constantly adding features to it. With the addition of _docx and xl() classes to Stata, it is high time to add support for native docx and xlsx output to asdoc. Also, given that there exists a significant number of LaTeX users, asdoc should be able to create LaTeX documents. It gives me immense pleasure to announce asdocx that is not only more flexible in making customized tables, but also creates documents in native docx, xlsx, html, and tex formats. If you have enjoyed and find asdoc useful, please consider buying a copy of asdocx to support its development. Details related to asdocx can be found on this page.
I am still committed to fixing bugs / issues in asdoc. However, I think it makes more sense to me to add features to asdocx than asdoc, given that asdocx supports all latest developments in Word, Excel and LaTeX.
The requested feature is already available in asdocx. See the following example.
sysuse nlsw88
asdocx list industry age race married grade south in 1/20, replace label

Question about how the sentimentr lexicon dictionary was built

I have used the Sentimentr package to do some sentiment analysis because it includes valence shifters. However I cannot find how this lexicon lexicon::hash_sentiment_jockers_rinker was built, how individual words were scored. From what I understand, the lexicon was originally exported by the syuzhet and is a combination of AFFIN, bing, nrc and syuzhet. Could someone help me to understand how individual words in the lexicon were calculated?
Thanks!
The NEWS file on github says this for version "2.1.0 - 2.2.3":
The default sentiment sentiment lookup table used within sentimentr is now
lexicon::hash_sentiment_jockers_rinker, a combined and augmented version of
lexicon::hash_sentiment_jockers (Jockers, 2017) & Rinker's augmented
lexicon::hash_sentiment_huliu (Hu & Liu, 2004) sentiment lookup tables.
It doesn't state how it was "combined and augmented", so if that was the essence of your question this might not be much help. In that case I'd suggest studying git history to see where the change was introduced, as the commit message, or source code comments, might explain the details.

Azure QnA Merging Same Questions

We are uploading a PDF with semi structured Question & Answers. QnA maker is merging same question if they are successive. If there is some other question exist between them, then QnA maker is not merging same questions. For example.
Q Machine was not able to be started
Answer 1
Q Machine was not able to be started
Answer 2
Q Burning plastic smell on machine
Answer 3
Now the QnA Maker will train it like this
Q Machine was not able to be started
Answer 1
Answer 2
Q Burning plastic smell on machine
Answer 3
Why is QnA is behaving like this and how to separate same questions. Help is required.
This is expected behavior. QnA works on the 'one question (and related, similar questions)' to one answer idea, and expects unique questions for the queries. The QnA documentation states:
A knowledge base consists of question and answer (QnA) sets. Each set has one answer and a set contains all the information associated with that answer. An answer can loosely resemble a database row or a data structure instance.
The required settings in a question-and-answer (QnA) set are:
a question - text of user query, used to QnA Maker's machine-learning, to align with text of user's question with different wording but the same answer
the answer - the set's answer is the response that's returned when a user query is matched with the associated question
Each set is represented by an ID.
The optional settings for a set include:
Alternate forms of the question - this helps QnA Maker return the correct answer for a wider variety of question phrasings
Metadata: Metadata are tags associated with a QnA pair and are represented as key-value pairs. Metadata tags are used to filter QnA pairs and limit the set over which query matching is performed.
Multi-turn prompts, used to continue a multi-turn conversation
QnA Maker doesn't differentiate between the two questions because it isn't two questions. It's literally the same question with two different answers.
This particular case would be a good use of QnAMaker's multi-turn prompt feature, where, after the customer has put in the query 'The machine won't start', QnA can follow up with a prompt that says "Which machine did you mean? Machine A or Machine B", and whichever they choose leads to the correct answer. I would look into Multi-Turn Conversations for your knowledgebase.

Has anything changed on geocode API

I just wanted to know if anything changed on geocode API from 21 st February because before 21st it was validating zip code 9 digits but from yesterday it is giving an error on 9 digits zip code and now it only validating 5 digits zip code.
More information in your question would be helpful.
I haven't noticed any change, but I thought I'd take a look at the GeoCoder Documentation FAQ for you.
Yes, based on that date, I'd say something changed recently.
Perhaps this is what you're referring to, but that's only a speculation since you didn't provide any detail or examples.
Troubleshooting
I’m getting more queries that return ZERO_RESULTS with the new geocoder. What’s going on?
In the new geocoder, ambiguous, incomplete and badly formatted queries, such as misspelled or nonexistent addresses, are prone to produce ZERO_RESULTS. These queries would typically produce incorrect results in the old geocoder, such as returning the suburb if the address could not be found. We believe that returning ZERO_RESULTS is actually a more correct response in such situations.
If your application deals with user input of addresses, the Place Autocomplete feature in the Places API may produce better quality results. Place Autocomplete allows users to select from a set of results based on what they’ve typed, which allows users to choose between similarly named results, and to adjust their query if they misspell an address.
If you have an application dealing with ambiguous or incomplete queries or queries that may contain errors, we recommend you use the Place Autocomplete feature in the Places API rather than the forward geocoder available in the Geocoding API. For more details, see Best Practices When Geocoding Addresses and the Address Geocoding in the Google Maps APIs blog post.
More Information:
Documentation FAQ
Related Issue Tracker

Scopus API -> All citations to publication

is it possible to get all citations to concrete publication (by scopus_id, doi ...) with Elsevier API?
I was trying do that, by all I can do, is get count of citations, but i need Authors annd Titles al least.
For example, if I wanna do:
https://api.elsevier.com/content/abstract/citations?pubmed_id=3472723&httpAccept=application/json&apiKey={myKey}
I get:
"{"service-error":{"status":{"statusCode":"AUTHENTICATION_ERROR","statusText":"Requestor configuration settings insufficient for access to this resource."}}}"
Is it possible to get what I want?
Thanks
I had same problem, but i found this solution:
Firstly you should have json with article data and article's 'eid'. Thus, you can find all citations of this article by next query:
"https://api.elsevier.com/content/search/scopus?query=refeid(" + str(article['eid']) + ')'
article is json data of this article
Also i had problem with keywords, and solution is:
Article json has article['prism:url'] parameter, and you can use it with keywords field, so you query to get keywords is:
article['prism:url'] + "?field=authkeywords"
Mikhail's answer is the best way to reach your goal, since you need authors and titles of citing works.
But for those who come here searching for the specific error: it is due to the fact that the https://api.elsevier.com/content/abstract/citations API needs "specific permission from Elsevier", which means that you need to write to their Integration Support, explaining your use case and providing your API key.
(as explained to me via email by a member of the Integration Support itself)
Just bumped into the same problem. the interactive API of Scopus might help you a lot with this and similar issues.
How to proceed:
Visit https://dev.elsevier.com/scopus.html#!/Citations_Overview/CitationsOverview
(If you are logged in and have an API key, the API key will automatically appear in the corresponding field)
Insert the doi of the article from which the citations are required in the appropriate field.
Get Request URL - here is an example: https://api.elsevier.com/content/abstract/citations?doi=10.1287%2Fmnsc.42.4.541&apiKey={apiKey}&httpAccept=application%2Fjson
(don't forget to insert your apiKey in the curly brackets.
Hope this helps and makes things a lot easier!
In case one cannot obtain "specific permission from Elsevier" to use their API in this manner, you can use the API of OpenCitations (documentation here).
Use the URL https://opencitations.net/index/coci/api/v1/citations/{DOI}. The field name citing contains as values the DOIs of all publications that cite the {DOI}.
One example with three citations here (as of January 2021).

Resources