Group By Month+Year

14 views
Skip to first unread message

Steve Eichert

unread,
Jul 3, 2024, 4:38:05 PMJul 3
to OpenAlex Community
Is there a way to group works in the API by Month+Year.  I want to see how work volume is evolving over time by month.  I can currently do it at the year level but that doesn't give me the granularity I'm looking for.  Any suggestions?

Samuel Mok

unread,
Jul 4, 2024, 10:42:30 AMJul 4
to Steve Eichert, OpenAlex Community
Hi Steve,

AFAIK you cannot group on any other temporal attribute besides publication year directly through the API. A possible workaround is to filter the Works in your query to a certain date range by using the parameters 'from_publication_date' and 'to_publication_date'. Using this method, you could construct a separate query for each month, keeping the other grouping & filtering options the same; combining the results should give you what you want. This does mean a lot more API calls, but with the generous API limitations of OA it shouldn't take more than a minute to do. 
You can also do the filtering/grouping of the data yourself by retrieving the unfiltered/ungrouped data for each Work you're interested in, which is how I do things generally. This is also helpful because OpenAlex selects a single date from all possible publication dates linked to an item, which sometimes does not match up with records for an item in other systems. By grabbing the raw data for all the items I can supplement them with the publication dates from other sources like Crossref, so I have some more options to work with.

Regards,
Samuel

On Wed, Jul 3, 2024 at 10:38 PM Steve Eichert <steve....@gmail.com> wrote:
Is there a way to group works in the API by Month+Year.  I want to see how work volume is evolving over time by month.  I can currently do it at the year level but that doesn't give me the granularity I'm looking for.  Any suggestions?

--
You received this message because you are subscribed to the Google Groups "OpenAlex Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openalex-commun...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openalex-community/0ef32b90-82ed-4fe8-b656-a4bcbad901a4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages