Can I get AuthorRetrieval data since a specific year? - pybliometrics

I tried to use this format but it returns data from all the years:
AuthorRetrieval(author_id, refresh=True, kwds='PUBYEAR IS 2022 OR PUBYEAR IS 2021 OR PUBYEAR IS 2020 OR PUBYEAR IS 2019 OR PUBYEAR IS 2018')
To be more specific to my problem, I am trying to get the number of documents that have cited(cited by) excluding the self-cited documents of the past five years.
For the citations I used the parameters start, end(CitationOverview), but I cant find something for the number of cited-by.

That is unfortunately not possible. The Author Retrieval API returns only the current state - just as if you were looking at an Author profile on scopus.com.
The reason why your kwds parameter is ignored is because it's not a valid keyword. It's not made for a Scopus query string. See https://www.programiz.com/python-programming/args-and-kwargs for an overview of what the parameter does.
Your only option is to reconstruct author values from her publications. You can get them with the ScopusSearch() class.
I'd recommend to use a query like "AU-ID(123466)" and then extract the documents based on their publication year. This way it's much more likely that you can re-use the cached results.

Related

Powerapps Filter Collection By Today's Date

Good day all,
I am trying to filter todays result in SQL table to a collection in powerapps. The column "dt" represents the column in sql of datetime type.
This is my powerapps filter:
ClearCollect(myCollectionName, Filter(myDatasource, Text(dt,"dd/mm/yyyy") = Text(Now(),"dd/mm/yyyy" )));
Seems like the collection is still empty even there is data for today in sql. May I know if my approach is the correct way in filtering?
Short answer: the data is likely being changed based on the client time zone. To fix it, you can update it by applying the time zone offset to the data from the SQL table, something along the lines of:
ClearCollect(
myCollectionName,
Filter(
myDatasource,
Text(DateAdd(dt, TimeZoneOffset(dt), Minutes), "dd/mm/yyyy") =
Text(Now(), "dd/mm/yyyy")))
Long(er) answer: the datetime type in SQL Server represents an absolute value of date and time. For example, the value '2021-12-23 09:30:00' represents 9:30 in the morning of the 23rd day of December, 2021 - at any part of the world. The date/time type in Power Apps, however, represents a point in time, typically referring to the local time where the app is being executed (or created). For example, if I selected that value and I'm in the US Pacific Time Zone (UTC-08:00), that would represent the same value as if someone in London (UTC+00:00) selected 2021-12-23 17:30:00. Since the two types represent different concepts, we may have mismatches like you are facing. To fix this, we can either use a type in SQL Server that has the same semantics as Power Apps (for example, 'datetimeoffset'), or adjust the time when it is being transferred between SQL and Power Apps.
The blog post at https://powerapps.microsoft.com/en-us/blog/working-with-datetime-values-in-sql explains in more details how to work with date/time values in SQL and Power Apps.

PowerBI: How to display/filter row tables between 2 years dynamically

I was wondering if there's a way where I can filter out my table results based on two years. My table A has date column and many miscellaneous columns. So currently I would like the table A to display January 2018 (or 1/1/2018) and December 2019 (or 12/31/2019 --basically ongoing) information. However, once January 1st, 2020 appears, I would like my table A to display row results between January 2019 and December 2020. Is there a way I can do so? Maybe in DAX or clicking some filter option? Could someone show me? I'm still fairly new to PowerBI.
Thanks
The easiest way to meet this requirement is usually using the Relative Date Slicer or Filter functionality:
https://learn.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Not sure if any of those options will meet your scenario. Maybe Last 12 Months (Calendar)? Your requirements description didnt make much sense to me - you probably need to explain "ongoing" and "appears".
If the Relative Date functions dont meet your needs, then you'll need to construct a column (in Power Query or DAX) that returns a static value you can use in a Slicer or Filter.

Is there a way to check date dynamically in eloqua?

Context: I am using Microsoft Dynamics (CRM) and Eloqua to send email campaigns. I have a date field in CRM that I want to check against in Eloqua for a specific campaign. This campaign needs to check to see if the date field is <= today's date + 90 days. I am using the campaign UI in Eloqua, not doing anything programmatically at this point.
I have tried using the Compare Custom Object Fields decision in Eloqua by finding the date field, setting the comparator to dynamically on or before, and I want to make the compared value Today + 90 days. I'm not sure how to accomplish this in this type of Decision object because the only options I have to compare the date field to are Yesterday, Today, or Tomorrow. See image below:
I have also tried to use the Compare Date Decision object, but there is no dynamic comparison, just hard-coded date options.
The last thing I tried was a Wait step, but that only waits a hard-coded number of days rather than checking dynamically.
Has anyone run into this issue or know of a solution to this problem?
We were able to find an Eloqua Date App to download that adds a Date Decision step to the program builder which allowed us more flexibility with comparing dates in a custom range.

neo4j 2.0 / cypher searching by date

I have looked at previous SO questions about using neo4j with dates and this blog post
http://blog.nigelsmall.com/2012/09/modelling-dates-in-neo4j.html
I'm not exactly sure how to get this to work however. Basically I need two things, to add a date to a node and then to query nodes by date.
As an example of something similar to what I like, imagine I have the movie The Matrix in my graph. Text examples for queries that should include then the movie The Matrix:
Movies released in Q1, 1999
Movies relased on March 31, 1999
Movies released in March 1999
Movies released before 2000
Movies released between 1998 and 20000
What I've tried for now as a start is building the date graph as described in the blog post. I tried with the following query, but I guess it's not constructed correctly
CREATE UNIQUE p = (CAL)-[:YEAR]->(1999 { number:1999 })-[:QUARTER]->(1 { number:1} )-[:MONTH]->(3 { number:3})-[:DAY]->(31 { number:31}) return p;
I guess then after I've made a node for a specific date, I would add a released_on->(that_date) to The Matrix.
So now I'm wondering if this is the way to go for the kind of queries I'd like to do, and how to actually make it work.
If those are the only queries you are planning to do, I would say that a property and an index query might be a better idea.
For each movie, you add a date property as a string in the following format : YYYYMMDD
You can then query for a specific date from a date_index, or have where conditions like : > 19990101 and <19990401 for the first quarter of 1999.
There are of course few shortcomings with this approach, one that comes to my mind being that you can't get movies by "seasonality", say for examples all summer movies for all the years ! In this, the in graph data index is a better idea.
I ended up putting the dates in the graph in a similar way to what is described in the blog post.
To add a date I use the following query:
MERGE (n0:Calendar) CREATE UNIQUE (n0)-[r0:YEAR]->(n1 {number: 2003})-[:QUARTER]->(q { number: 1} )-[r1:MONTH]->(n2 {number: 3})-[r2:DAY]->(n3 {number: 31}) RETURN n3;
Then I use queries similar to this to get nodes and their dates:
MATCH (r)-[:has_date]->(day)<-[:DAY]-(month)<-[:MONTH]-(quarter)<-[:QUARTER]-(year) return day,month,quarter,year;

Calculating days between last login and current date

Upon logging into their accounts, each user has their login date and time stored to the database. What I was looking to do however is figure out the amount of days (or preferably convert into months if greater than a month) so that if a user views their profile they can see how active the band are. Also, this could benefit me in terms of keeping active profiles top of the agenda for content on the site so that it doesn't become stale from inactive users content filling up main page content.
I'm using ColdFusion so i'd be looking for a way to find for example how many days ago #lastLogin# was from #now()#. So say if the date of the last login was 23/04/2013 and todays date is 29/04/2013 it would read "Last Active, 1 day ago." However if the last login was 23/03/2013, it would read "Last Active, 1 month ago".
Anybody know how to do this? Thanks.
P.S I currently have no code from testing this as I have no idea where to start in terms of achieving this.
Use DateDiff
<cfset days = dateDiff("d", LoginDateVariable, now()) />
It's as simple as that.
P.S I currently have no code from testing this as I have no idea where
to start in terms of achieving this.
This doesn't answer your direct question but to help you know where to get started, I would strongly suggest reviewing the built in ColdFusion functions and tags that are available to you.
Tags
Tags by function
Functions
Functions by category
Also, Google searches usually land you at the docs, just add "coldfusion" to your search string. Searching google for coldfusion date functions yields very helpful answers, the first of which are a list of all ColdFusion date functions.
Dale's answer is spot on. But I would also suggest returning it as a variable with your query. Let the SQL server do the work. It's very efficient for those types of calculations. Not that CF can't do them well, too. But it's probably more appropriate for SQL to do that lifting. Especially if you're already returning the lastLogin date.
It would be similar to the CF solution:
SELECT ...., lastLogin, DATEDIFF(d, lastLogin, GETDATE()) AS LastLoginDays
FROM ....
WHERE ....
That would give you the number of days. You'd have to decide how you wanted to define a month if you wanted to break it out by month/day. That would get a bit more complex. You could write a SQL function that could be run on both dates and give you an accurate count of days/months/years since last login.
One other thing to keep in mind: Where are the dates being generated? When you insert loginDate into the database, are you doing a now() in CF before you insert it or are you doing a getDate() in SQL when you insert it? Again, I would let the database do your date logic, but you'd want to compare the two dates from the same source. For instance, if your loginDate was a database getDate() then you may not want to compare that to a CF now(). One goes by the datetime of the SQL server and the other goes by the datetime of the CF server. They could be different.