Type: | Package |
Title: | Access RePEc Data Through API |
Version: | 0.1.0 |
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. |
License: | MIT + file LICENSE |
URL: | https://github.com/chrMongeau/repec |
BugReports: | https://github.com/chrMongeau/repec/issues |
Imports: | jsonlite, utils |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 6.1.0 |
NeedsCompilation: | no |
Packaged: | 2018-08-25 16:44:04 UTC; chr |
Author: | Christian Alexander Mongeau Ospina
|
Maintainer: | Christian Alexander Mongeau Ospina <christian+rpkg-repec@mongeau.net> |
Repository: | CRAN |
Date/Publication: | 2018-08-31 18:20:08 UTC |
repec: access RePEc data through API
Description
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.
Details
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')
Author(s)
Maintainer: Christian Alexander Mongeau Ospina christian+rpkg-repec@mongeau.net (0000-0002-4047-3924)
See Also
Useful links:
Verifies whether the server is alive
Description
Verifies whether the server is alive
Usage
areyouthere()
are_you_there()
Value
TRUE if the server if alive, FALSE otherwise.
Examples
## Not run:
areyouthere()
## End(Not run)
Get the NEP fields for the papers of an author
Description
Get the NEP fields for the papers of an author
Usage
getauthornep(id, code = NA)
get_author_nep(id, code = NA)
Arguments
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. |
Value
data.frame
Examples
## Not run:
getauthornep('pmo915', code = YOURCODE)
## End(Not run)
Provides info about author, mostly in the form of handles
Description
Provides info about author, mostly in the form of handles
Usage
getauthorrecordfull(id, code = NA)
get_author_record_full(id, code = NA)
Arguments
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. |
Value
data.frame
Examples
## Not run:
getauthorrecordfull('pmo915', code = YOURCODE)
## End(Not run)
Provides extended info about author
Description
Provides extended info about author
Usage
getauthorrecordraw(id, code = NA)
get_author_record_raw(id, code = NA)
Arguments
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. |
Value
data.frame. Note: columns article
and paper
are data.frames.
Examples
## Not run:
getauthorrecordraw('pmo915', code = YOURCODE)
## End(Not run)
Get Authors for an item
Description
Get Authors for an item
Usage
getauthorsforitem(id, code = NA)
get_authors_for_item(id, code = NA)
Arguments
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. |
Value
data.frame.
Examples
## 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
Description
Get Short-ID and name from string in name or email
Usage
getauthorshortid(x, code = NA)
get_author_short_id(x, code = NA)
Arguments
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. |
Value
data.frame
Examples
## Not run:
getauthorshortid('christian', code = YOURCODE)
## End(Not run)
Provides Author's statistics
Description
Provides Author's statistics
Usage
getauthorstats(id, code = NA)
get_author_stats(id, code = NA)
Arguments
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. |
Value
Author's statistics.
Examples
## Not run:
getauthorstats('pmo915', code = YOURCODE)
## End(Not run)
Provides Twitter handle
Description
Provides Twitter handle
Usage
getauthortwitter(id, code = NA)
get_author_twitter(id, code = NA)
Arguments
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. |
Value
String with the Twitter author linked to the Short-ID.
Examples
## Not run:
getauthortwitter('pmo915', code = YOURCODE)
## End(Not run)
Provides Author's first publication year
Description
Provides Author's first publication year
Usage
getfirstpubyear(id, code = NA)
get_first_pub_year(id, code = NA)
Arguments
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. |
Value
Author's first publication year.
Examples
## Not run:
getfirstpubyear('pmo915', code = YOURCODE)
## End(Not run)
Provides Author's genealogy
Description
Provides Author's genealogy
Usage
getgenealogy(id, code = NA)
get_genealogy(id, code = NA)
Arguments
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. |
Value
Author's genealogy.
Examples
## Not run:
getgenealogy('pmo915', code = YOURCODE)
## End(Not run)
Provides H-index
Description
Provides H-index
Usage
gethindex(id, code = NA)
get_h_index(id, code = NA)
Arguments
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. |
Value
H-index.
Examples
## Not run:
gethindex('pmo915', code = YOURCODE)
## End(Not run)
Get record of Institution
Description
Get record of Institution
Usage
getinstrecord(id, code = NA)
get_inst_record(id, code = NA)
Arguments
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. |
Value
data.frame.
Examples
## Not run:
getinstrecord('RePEc:edi:dechiit', code = YOURCODE)
## End(Not run)
Get JEL codes for item
Description
Get JEL codes for item
Usage
getjelforitem(id, code = NA)
get_jel_foritem(id, code = NA)
Arguments
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. |
Value
Vector with JEL codes.
Examples
## 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
Description
Generic API call, with an ID
Usage
repec_api_with_id(id = NA, method = NA, code = NA)
Arguments
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. |
Value
String with the Twitter author linked to the Short-ID.
Examples
## 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
Description
Verifies whether the connection is performed from the registered IP
Usage
testip(code = NA)
test_ip(code = NA)
Arguments
code |
User code required to use API. Included in every API call. If not supplied, the REPEC_API_KEY environment variable will be used. |
Value
TRUE if the connection is from a registered IP, FALSE otherwise.
Examples
## Not run:
testip(YOURCODE)
## End(Not run)
Returns the IP address you use to call the API
Description
Returns the IP address you use to call the API
Usage
whatismyip()
what_is_myip()
Value
String with IP.
Examples
## Not run:
whatismyip()
## End(Not run)