Title: | Access RePEc Data Through API |
---|---|
Description: | Utilities for accessing RePEc (Research Papers in Economics) through a RESTful API. You can request a code and get detailed information at the following page: <https://ideas.repec.org/api.html>. |
Authors: | Christian Alexander Mongeau Ospina [aut, cre] |
Maintainer: | Christian Alexander Mongeau Ospina <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-03 03:03:44 UTC |
Source: | https://github.com/chrmongeau/repec |
repec
provides a way to interact with the RePEc API (Application
Programming Interface) in order to get various information stored
on RePEc about authors, items, institutions, etc.
By using the functions of this package, you will be able to import
RePEc information in R. You will need to ask for an access code
by following the instructions at https://ideas.repec.org/api.html.
The code will be needed when calling most of the functions by using
the code
parameter. One way to avoid passing explicitly the code
is to create the REPEC_API_KEY
environment variable. The code below
can be put in your .RProfile
so that it is always available when
you start R:
# YOURCODE is your personal access code Sys.setenv(REPEC_API_KEY = 'YOURCODE')
Maintainer: Christian Alexander Mongeau Ospina [email protected] (0000-0002-4047-3924)
Useful links:
Verifies whether the server is alive
areyouthere() are_you_there()
areyouthere() are_you_there()
TRUE if the server if alive, FALSE otherwise.
## Not run: areyouthere() ## End(Not run)
## Not run: areyouthere() ## End(Not run)
Get the NEP fields for the papers of an author
getauthornep(id, code = NA) get_author_nep(id, code = NA)
getauthornep(id, code = NA) get_author_nep(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
data.frame
## Not run: getauthornep('pmo915', code = YOURCODE) ## End(Not run)
## Not run: getauthornep('pmo915', code = YOURCODE) ## End(Not run)
Provides info about author, mostly in the form of handles
getauthorrecordfull(id, code = NA) get_author_record_full(id, code = NA)
getauthorrecordfull(id, code = NA) get_author_record_full(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
data.frame
## Not run: getauthorrecordfull('pmo915', code = YOURCODE) ## End(Not run)
## Not run: getauthorrecordfull('pmo915', code = YOURCODE) ## End(Not run)
Provides extended info about author
getauthorrecordraw(id, code = NA) get_author_record_raw(id, code = NA)
getauthorrecordraw(id, code = NA) get_author_record_raw(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
data.frame. Note: columns article
and paper
are data.frames.
## Not run: getauthorrecordraw('pmo915', code = YOURCODE) ## End(Not run)
## Not run: getauthorrecordraw('pmo915', code = YOURCODE) ## End(Not run)
Get Authors for an item
getauthorsforitem(id, code = NA) get_authors_for_item(id, code = NA)
getauthorsforitem(id, code = NA) get_authors_for_item(id, code = NA)
id |
RePEc handle for an item. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
data.frame.
## Not run: getauthorsforitem('RePEc:eee:enepol:v:78:y:2015:i:c:p:41-50', code = YOURCODE) ## End(Not run)
## Not run: getauthorsforitem('RePEc:eee:enepol:v:78:y:2015:i:c:p:41-50', code = YOURCODE) ## End(Not run)
Get Short-ID and name from string in name or email
getauthorshortid(x, code = NA) get_author_short_id(x, code = NA)
getauthorshortid(x, code = NA) get_author_short_id(x, code = NA)
x |
string. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
data.frame
## Not run: getauthorshortid('christian', code = YOURCODE) ## End(Not run)
## Not run: getauthorshortid('christian', code = YOURCODE) ## End(Not run)
Provides Author's statistics
getauthorstats(id, code = NA) get_author_stats(id, code = NA)
getauthorstats(id, code = NA) get_author_stats(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
Author's statistics.
## Not run: getauthorstats('pmo915', code = YOURCODE) ## End(Not run)
## Not run: getauthorstats('pmo915', code = YOURCODE) ## End(Not run)
Provides Twitter handle
getauthortwitter(id, code = NA) get_author_twitter(id, code = NA)
getauthortwitter(id, code = NA) get_author_twitter(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
String with the Twitter author linked to the Short-ID.
## Not run: getauthortwitter('pmo915', code = YOURCODE) ## End(Not run)
## Not run: getauthortwitter('pmo915', code = YOURCODE) ## End(Not run)
Provides Author's first publication year
getfirstpubyear(id, code = NA) get_first_pub_year(id, code = NA)
getfirstpubyear(id, code = NA) get_first_pub_year(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
Author's first publication year.
## Not run: getfirstpubyear('pmo915', code = YOURCODE) ## End(Not run)
## Not run: getfirstpubyear('pmo915', code = YOURCODE) ## End(Not run)
Provides Author's genealogy
getgenealogy(id, code = NA) get_genealogy(id, code = NA)
getgenealogy(id, code = NA) get_genealogy(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
Author's genealogy.
## Not run: getgenealogy('pmo915', code = YOURCODE) ## End(Not run)
## Not run: getgenealogy('pmo915', code = YOURCODE) ## End(Not run)
Provides H-index
gethindex(id, code = NA) get_h_index(id, code = NA)
gethindex(id, code = NA) get_h_index(id, code = NA)
id |
Short-ID. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
H-index.
## Not run: gethindex('pmo915', code = YOURCODE) ## End(Not run)
## Not run: gethindex('pmo915', code = YOURCODE) ## End(Not run)
Get record of Institution
getinstrecord(id, code = NA) get_inst_record(id, code = NA)
getinstrecord(id, code = NA) get_inst_record(id, code = NA)
id |
RePEc handle for an institution |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
data.frame.
## Not run: getinstrecord('RePEc:edi:dechiit', code = YOURCODE) ## End(Not run)
## Not run: getinstrecord('RePEc:edi:dechiit', code = YOURCODE) ## End(Not run)
Get JEL codes for item
getjelforitem(id, code = NA) get_jel_foritem(id, code = NA)
getjelforitem(id, code = NA) get_jel_foritem(id, code = NA)
id |
RePEc handle for an item. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
Vector with JEL codes.
## Not run: getjelforitem('RePEc:eee:enepol:v:78:y:2015:i:c:p:41-50', code = YOURCODE) ## End(Not run)
## Not run: getjelforitem('RePEc:eee:enepol:v:78:y:2015:i:c:p:41-50', code = YOURCODE) ## End(Not run)
Generic API call, with an ID
repec_api_with_id(id = NA, method = NA, code = NA)
repec_api_with_id(id = NA, method = NA, code = NA)
id |
Short-ID. |
method |
API method to call. |
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
String with the Twitter author linked to the Short-ID.
## Not run: repec_api_with_id(id = 'pmo915', method = 'getauthortwitter', code = YOURCODE) ## End(Not run)
## Not run: repec_api_with_id(id = 'pmo915', method = 'getauthortwitter', code = YOURCODE) ## End(Not run)
Verifies whether the connection is performed from the registered IP
testip(code = NA) test_ip(code = NA)
testip(code = NA) test_ip(code = NA)
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
TRUE if the connection is from a registered IP, FALSE otherwise.
## Not run: testip(YOURCODE) ## End(Not run)
## Not run: testip(YOURCODE) ## End(Not run)
Returns the IP address you use to call the API
whatismyip() what_is_myip()
whatismyip() what_is_myip()
String with IP.
## Not run: whatismyip() ## End(Not run)
## Not run: whatismyip() ## End(Not run)