Description Usage Arguments Value Note See Also Examples
Generic method for parsing data retrieved from getBillText API call
Method for parsing LegiScan API calls to getBillText
1 2 3 4 5 6 7 | parseBillText(theBillText)
## S4 method for signature 'XMLDocumentContent'
parseBillText(theBillText)
## S4 method for signature 'character'
parseBillText(theBillText)
|
theBillText |
An object with the returned data from the billText method |
A list object containing metadata and the MIME data retrieved by the API call
The getBillText API call method returns a binary MIME object with any of several document format types. While this may be of interest, it is much easier to retrieve the text data from the cleanBill function with an option specified for the text argument.
Other LegiScan API Parser Generics: parseAmendment
,
parseAmendment,XMLDocumentContent-method
,
parseAmendment,character-method
;
parseBill
,
parseBill,XMLDocumentContent,logical,character-method
,
parseBill,character,logical,character-method
;
parseMasterList
,
parseMasterList,XMLDocumentContent,logical,logical,numeric-method
,
parseMasterList,character,logical,logical,missing-method
,
parseSessions,character,logical,logical,missing-method
;
parseQuery
,
parseQuery,XMLDocumentContent-method
,
parseQuery,character-method
;
parseRollCall
,
parseRollCall,XMLDocumentContent,logical-method
,
parseRollCall,character,logical-method
;
parseSessions
,
parseSessions,XMLDocumentContent,logical-method
,
parseSessions,character,logical-method
;
parseSponsor
,
parseSponsor,XMLDocumentContent,logical-method
,
parseSponsor,character,logical-method
;
parseStates
,
parseStates,XMLDocumentContent,logical-method
,
parseStates,character,logical-method
;
parseSupplement
,
parseSupplement,XMLDocumentContent-method
,
parseSupplement,character-method
Other LegiScan Parser Methods: parseAmendment
,
parseAmendment,XMLDocumentContent-method
,
parseAmendment,character-method
;
parseBill
,
parseBill,XMLDocumentContent,logical,character-method
,
parseBill,character,logical,character-method
;
parseMasterList
,
parseMasterList,XMLDocumentContent,logical,logical,numeric-method
,
parseMasterList,character,logical,logical,missing-method
,
parseSessions,character,logical,logical,missing-method
;
parseQuery
,
parseQuery,XMLDocumentContent-method
,
parseQuery,character-method
;
parseRollCall
,
parseRollCall,XMLDocumentContent,logical-method
,
parseRollCall,character,logical-method
;
parseSessions
,
parseSessions,XMLDocumentContent,logical-method
,
parseSessions,character,logical-method
;
parseSponsor
,
parseSponsor,XMLDocumentContent,logical-method
,
parseSponsor,character,logical-method
;
parseStates
,
parseStates,XMLDocumentContent,logical-method
,
parseStates,character,logical-method
;
parseSupplement
,
parseSupplement,XMLDocumentContent-method
,
parseSupplement,character-method
Other LegiScan Parser Methods: parseAmendment
,
parseAmendment,XMLDocumentContent-method
,
parseAmendment,character-method
;
parseBill
,
parseBill,XMLDocumentContent,logical,character-method
,
parseBill,character,logical,character-method
;
parseMasterList
,
parseMasterList,XMLDocumentContent,logical,logical,numeric-method
,
parseMasterList,character,logical,logical,missing-method
,
parseSessions,character,logical,logical,missing-method
;
parseQuery
,
parseQuery,XMLDocumentContent-method
,
parseQuery,character-method
;
parseRollCall
,
parseRollCall,XMLDocumentContent,logical-method
,
parseRollCall,character,logical-method
;
parseSessions
,
parseSessions,XMLDocumentContent,logical-method
,
parseSessions,character,logical-method
;
parseSponsor
,
parseSponsor,XMLDocumentContent,logical-method
,
parseSponsor,character,logical-method
;
parseStates
,
parseStates,XMLDocumentContent,logical-method
,
parseStates,character,logical-method
;
parseSupplement
,
parseSupplement,XMLDocumentContent-method
,
parseSupplement,character-method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
# Create object of class LegiScan
myLegiScan <- legiscanR()
# Get the master list for Mississippi
theMasterList <- masterList(myLegiScan, "MS")
# Parse the XML/JSON formatted data into a data frame
cleanerMasterList <- parseMasterList(theMasterList)
# Get A bill (bill_id is in the 3rd Column of the master list)
aBill <- bill(myLegiScan, cleanerMasterList[1, 3])
# Parse the bill data
cleanerBill <- cleanBill(aBill, dataframe = FALSE, text = 'state_link')
# Retrieve the Bill Text from the API call
legiscanBillText <- billText(myLegiScan, cleanerBill[["texts"]][["doc_id"]])
# Store the API response in new object
aBillText <- legiscanBillText[[1]]
# Parse the bill text response from LegiScan
cleanedBillText <- parseBillText(aBillText)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.