Here we have a simple data acquisition demonstration regarding how to get the states available from CUSIP Global Services (CGS). The picture below shows this same R script, along with some of the information returned from CGS.

library(rCUSIPGlobalServices)
options(CGS_USERID=Sys.getenv("CGS_USERID"))
options(CGS_PASSWORD=Sys.getenv("CGS_PASSWORD"))
rCUSIPGlobalServices::Initialize ()
rCUSIPGlobalServices::Login(userId = getOption("CGS_USERID"), password = getOption("CGS_PASSWORD"))
result <- GetGovernmentMortgages(agencyCode = "FD", poolNumber = "R0-5501")

GovernmentMortgages Example