Patents endpoint

Which patents have been cited by more than 500 US patents?

How many distinct inventors are represented by these highly-cited patents?

Where geographically have Microsoft inventors been coming from over the past 20 years?

# Write the query
query <- with_qfuns(
  and(
    gte(patent_date = "2007-07-25"), # Dates are in yyyy-mm-dd format 
    contains(assignee_organization = "microsoft")
  )
)

# Create a field list
inv_fields <- get_fields(endpoint = "patents", groups = "inventors")
fields <- c(inv_fields, "patent_number")

# Pull the data
pv_out <- search_pv(query, fields = fields, all_pages = TRUE)

# Unnest the inventor list column
unnest_pv_data(pv_out$data, "patent_number")
#> List of 2
#>  $ inventors:'data.frame':   116794 obs. of  21 variables:
#>   ..$ patent_number                 : chr [1:116794] "10001683" ...
#>   ..$ inventor_city                 : chr [1:116794] "Mountain View" ...
#>   ..$ inventor_country              : chr [1:116794] "US" ...
#>   ..$ inventor_first_name           : chr [1:116794] "Andriy" ...
#>   ..$ inventor_first_seen_date      : chr [1:116794] "2017-09-12" ...
#>   ..$ inventor_id                   : chr [1:116794] "10001683-1" ...
#>   ..$ inventor_lastknown_city       : chr [1:116794] "Mountain View" ...
#>   ..$ inventor_lastknown_country    : chr [1:116794] "US" ...
#>   ..$ inventor_lastknown_latitude   : chr [1:116794] "37.3861" ...
#>   ..$ inventor_lastknown_location_id: chr [1:116794] "37.3861|-122.0828" ..
#>   ..$ inventor_lastknown_longitude  : chr [1:116794] "-122.083" ...
#>   ..$ inventor_lastknown_state      : chr [1:116794] "CA" ...
#>   ..$ inventor_last_name            : chr [1:116794] "Pletenetskyy" ...
#>   ..$ inventor_last_seen_date       : chr [1:116794] "2018-06-19" ...
#>   ..$ inventor_latitude             : chr [1:116794] "37.3861" ...
#>   ..$ inventor_location_id          : chr [1:116794] "37.3861|-122.0828" ..
#>   ..$ inventor_longitude            : chr [1:116794] "-122.083" ...
#>   ..$ inventor_sequence             : chr [1:116794] "0" ...
#>   ..$ inventor_state                : chr [1:116794] "CA" ...
#>   ..$ inventor_total_num_patents    : chr [1:116794] "5" ...
#>   ..$ inventor_key_id               : chr [1:116794] "4820" ...
#>  $ patents  :'data.frame':   32032 obs. of  1 variable:
#>   ..$ patent_number: chr [1:32032] "10001683" ...