8 The Brainstorm Bot

# as always, i have to make sure the disco engine is loaded
library(discoveryengine)

At this point, you’re pretty empowered to search through the database for all sorts of prospects, provided you know something about the codes in the database. Even if you don’t know the exact code for, say, basketball, you can use the synonym search feature because you know which widget to use:

played_sport(?basketball)
## Regular codes and synonyms:
##              synonym code
##       basketball_men MABB
##  cal_basketball_club RSBK
##     basketball_women WABB

But now imagine someone has asked you for a list of people interested in robotics. Where would that be coded? Perhaps in multiple places? How can you find out?

Enter the brainstorm bot. The brainstorm bot is a robot that is knowledgeable about the code tables in CADS. Let’s ask it about robotics:

brainstorm_bot("robotics")
## attended_event 
##     9325: BARS 2017: Bay Area Robotics Symposium
##     8761: Silicon Valley Forum: Medical Robotics
## fec_gave_to_committee 
##     C00521765: LIQUID ROBOTICS INC POLITICAL ACTION COMMITTEE (LIQUID ROBOTICS PAC)
##     C00582767: CAMPAIGN FOR A FEDERAL ROBOTICS COMMISSION
## has_interest 
##     ROB: Robotics
## participated_in 
##     RENY: Robotics & Engineering for Youth
##     ENRO: Cal Robotics
## sec_filed 
##     1409269: Restoration Robotics, Inc.
##     1528557: Corindus Vascular Robotics, Inc.
##     1409269: Restoration Robotics Inc

Hey brainstorm bot, thanks for the ideas! The results show the name of a widget, along with the codes that are of interest, along with their description from the CADS code tables, so you can decide if they are appropriate for your project. You can then copy and paste to build up the right population:

display(has_interest(ROB))
## # A tibble: 8 x 1
##   entity_id
##       <dbl>
## 1     24020
## 2    300717
## 3    470691
## 4    824520
## 5    836356
## 6   3104808
## 7   3368828
## 8   3447240

If it turns out you agree with every one of the brainstorm bot’s suggestions, then you don’t even have to copy and paste, because (surprise!) the brainstorm bot is actually giving you a fully filled out widget:

# if i wanted robotics fans in the san francisco MSA
prospects = brainstorm_bot("robotics") %and%
    lives_in_msa(san_francisco)
display(prospects)
## # A tibble: 37 x 1
##    entity_id
##        <dbl>
##  1     20288
##  2    290025
##  3    300717
##  4    349805
##  5    391263
##  6    398291
##  7    398320
##  8    415023
##  9    419351
## 10    442491
## # … with 27 more rows

8.1 Search features

The brainstorm bot understands wildcards at the beginning and/or ending of your search term:

brainstorm_bot("robot*")
## attended_event 
##     8760: Robots on the Edge:Intelligent Machines
##     6724: Haas East Bay Chp Robotic Event 06-18-14
##     9325: BARS 2017: Bay Area Robotics Symposium
##     8761: Silicon Valley Forum: Medical Robotics
##     9431: SVF: Robots on the Edge
## fec_gave_to_committee 
##     C00596908: ROBOTECHNOLOGY INC C.R.
##     C00521765: LIQUID ROBOTICS INC POLITICAL ACTION COMMITTEE (LIQUID ROBOTICS PAC)
##     C00717249: RALLY ROBOT ZAPS AOC
##     C00582767: CAMPAIGN FOR A FEDERAL ROBOTICS COMMISSION
##     C00717074: RALLY ROBOT 2020
## has_interest 
##     ROB: Robotics
## participated_in 
##     UROB: Robotmedia Presents
##     RENY: Robotics & Engineering for Youth
##     ENRO: Cal Robotics
## sec_filed 
##     1409269: Restoration Robotics, Inc.
##     1528557: Corindus Vascular Robotics, Inc.
##     1409269: Restoration Robotics Inc

It also will do multiple searches at once:

brainstorm_bot("robot*", "data science")
## attended_event 
##     8760: Robots on the Edge:Intelligent Machines
##     6724: Haas East Bay Chp Robotic Event 06-18-14
##     9325: BARS 2017: Bay Area Robotics Symposium
##     7643: Career Conn: Data Science
##     9533: Applied Data Science Forum
##     8761: Silicon Valley Forum: Medical Robotics
##     8341: Career Connections: Data Science
##     9431: SVF: Robots on the Edge
##     7565: UR NY LG Data Science Salon 10-27-16
## fec_gave_to_committee 
##     C00596908: ROBOTECHNOLOGY INC C.R.
##     C00521765: LIQUID ROBOTICS INC POLITICAL ACTION COMMITTEE (LIQUID ROBOTICS PAC)
##     C00717249: RALLY ROBOT ZAPS AOC
##     C00582767: CAMPAIGN FOR A FEDERAL ROBOTICS COMMISSION
##     C00717074: RALLY ROBOT 2020
## gave_to_department 
##     DT: Berkeley Institute for Data Science
## has_interest 
##     DAT: Data Science
##     ROB: Robotics
## has_philanthropic_interest 
##     DT: Berkeley Institute for Data Science
##     M1: Data Science Education Program
## majored_in 
##     250AM: Data Science
##     2E0: Master of Information & Data Science
##     2011: Applied Data Science Certificate
## participated_in 
##     UROB: Robotmedia Presents
##     HDSC: Haas Data Science Club
##     RENY: Robotics & Engineering for Youth
##     ENRO: Cal Robotics
## sec_filed 
##     1409269: Restoration Robotics, Inc.
##     1528557: Corindus Vascular Robotics, Inc.
##     1409269: Restoration Robotics Inc