Hello all,
I am building an R package stellardata that pulls and formats the Horizon API endpoint data for analysis or use in other projects.
It is currently tested for some of the endpoints as well as some of the links generated by these endpoints. (ledgers, effects, operations, payments, transactions, trades )
It is still in development and I want to use the Horizon data in some R training so I would like to user experience to be easier
Current usage examples include:
ledger_data <- getStellarData('ledgers',limit=500)
effects_data <- getStellarData('effects',limit=250)
transaction_effects_data <- getStellarData(link="https://horizon.stellar.org/transactions/f93dfc81770019f2e842c6a1f3ecb2746db8e2b9b5b30b316128e6504de52f06/effects")
There is also a lineage explorer that goes back a default 10 accounts:
lineage <- getLineage(stellar_address,max_generations)
As my focus is more around the data endpoints in Horizon I am thinking about a way of including a tutorial/links on how to set up an address etc rather than building that functionality in R.
Update: 27/02/2018
There are focused functions that use getStellarData()
as a basis and are targeted towards a specific endpoint.
getAccountData('GDXCFI3YAWU5PWFY4J2GEK3DRGQXQYAIT2OSTN7H2DLUIZQ55WKVLBTQ')
getAssets(limit=100)
getEffects()
getLedgers()
getLedgerData('16485192')
getOperations()
getOperationData('12884905985')
getTrades()
getTrades(offerid='36')
getPayments()
getTransactions()
getTransactionData("d1814e94c242596dc9e6870f366ad2abd4f8800a61c3011a232eeeb73f1c7874")
Most of these functions return formatted data frames, some functions - e.g. getAccountData()
, getLedgerData()
and getTransactionData()
- return lists containing information and the associated additional endpoints.
Looking next into some visualisation functions
Suggestions welcome, and let me know if you find any bugs ?