mustberuss / patentsview

An R client to the PatentsView API

Home Page:https://ropensci.github.io/patentsview/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

output
github_document

patentsview Package Logo

An R client to the PatentsView API, recently renamed the PatentSearch API

R-CMD-check CRAN version

Installation

You can get the stable version for the original version of the API from CRAN:

install.packages("patentsview")

Or the development version from GitHub (Currently broken):

if (!"devtools" %in% rownames(installed.packages())) {
  install.packages("devtools")
}

devtools::install_github("ropensci/patentsview")

Or the R package for the new version of the API from r-universe:

install.packages("patentsview", repos = c("https://mustberuss.r-universe.dev"))

Or the R package for the new version of the API from GitHub:

if (!"devtools" %in% rownames(installed.packages())) {
  install.packages("devtools")
}

devtools::install_github("mustberuss/patentsview@api-redesign")

Important API Change

The new version of the API requires an API key, or all of your requests will be blocked. An API key can be obtained here. The updated R package will look for an environmental variable PATENTSVIEW_API_KEY set to the value of your key. For windows it would be

set PATENTSVIEW_API_KEY=my_keys_value_without quotes

See this page about the change. The navigation there will get you to the updated vignettes and reference pages.

Basic usage

The PatentsView API provides an interface to a disambiguated version of USPTO. The patentsview R package provides one main function, search_pv(), to make it easy to interact with the API:

library(patentsview)

search_pv(query = '{"_gte":{"patent_date":"2007-01-01"}}')
#> $data
#> #### A list with a single data frame on patents level:
#> 
#> List of 1
#>  $ patents:'data.frame':	1000 obs. of  3 variables:
#>   ..$ patent_id   : chr [1:1000] "10000000" ...
#>   ..$ patent_title: chr [1:1000] "Coherent LADAR using intra-pixel quadrature"..
#>   ..$ patent_date : chr [1:1000] "2018-06-19" ...
#> 
#> $query_results
#> #### Distinct entity counts across all downloadable pages of output:
#> 
#> total_hits = 5,362,291

Learning more

Head over to the package's webpage for more info, including:

This package was first introduced in 2017 in an rOpenSci blog post which used the original version of the API. The same content, reworked to use the new version of the API, is available here. A draft of a possible Tech Note about the new version of the API and R package is here.

About

An R client to the PatentsView API

https://ropensci.github.io/patentsview/index.html

License:Other


Languages

Language:R 98.8%Language:Makefile 1.1%Language:CSS 0.0%