Coder Social home page Coder Social logo

symplur / sdk-php Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 0.0 31 KB

Client SDK for the Symplur API giving access to the Healthcare Social Graph

Home Page: https://www.symplur.com/product/symplur-api/

License: MIT License

PHP 100.00%
sdk client-sdk php symplur-api

sdk-php's Introduction

SympluR

DOI CRAN_Status_Badge Build Status License: MIT

SympluR is an R package for analyzing data from the Healthcare Social Graph via access to the Symplur API.

Healthcare Social Graph

The Symplur API gives access to insights from the Healthcare Social Graph® – the vast neural network of public healthcare communities, conversations and people, hand curated by Symplur and powered by machine learning.

#hcsmR

Take a look at the over 300 published journal articles that have employed or referenced Symplur data in their research. #hcsmR is a collaboration between Symplur and Stanford Medicine X.

Get started

Install R package from CRAN:

install.packages("SympluR")
library(SympluR)

For latest development version, install the package from GitHub:

library("devtools")
install_github('symplur/SympluR')
library(SympluR)

Symplur API Credentials

To make use of this R package you need to have access to the Symplur API. The package comes with free demo credentials that allow you to access the demo dataset #LCSMDemoData. This dataset is a 4-week snapshot of the conversations from #LCSM (Lung Cancer Social Media) from 08/16/2017 to 09/15/2017.

You can get a quick look at the data now by opening the same demo dataset in Symplur Signals Dashboards with a free account.

To access any other datasets, please contact Symplur for further details.

The R package will prompt you for your credentials during the first API call in your R session. Paste in your credentials when asked, or if you want to try out the demo data then hit enter without entering anything.

Documentation

Find the documentation in R for each function in this package. Example:

?symplurTweetsSummary

?symplurTweetsActivity

?symplurPeopleInfluencers

?symplurContentRetweets

?symplurContentWords

To learn more about each Symplur API endpoint used in this package and the accepted parameters please see the Symplur API Documentation.

Example Usage

Summary

The symplurTweetsSummary() function will create a list with statistics of the database and the time span selected. The stats includes tweets, mentions, impressions, users, retweets, replies, urls_shared, etc.

LCSM <- symplurTweetsSummary("09/01/2017", "09/08/2017", databases = "#LCSMDemoData")

Summary Table

The symplurTweetsSummaryTable() function will create a data frame with summary statistics of all databases and time spans defined in an existing data frame. First create in a spreadsheet columns 'database', 'start' and 'end'. Add rows according to your query needs, then export as a CSV-file. See example CSV-file.

Example table:

database start end
#LCSMDemoData 09/01/2017 09/06/2017
#LCSMDemoData 09/06/2017 09/13/2017
#LCSMDemoData 09/13/2017 09/19/2017

Load such an CSV-file into R as a data frame:

library(readr)
LCSMquery <- read_csv(file.choose())

Now we're ready to run the analysis:

LCSManalysis <- symplurTweetsSummaryTable(LCSMquery)

You can also try out symplurTweetsSummaryTable() with an example CSV file:

library(readr)
datasets <- read_csv(system.file("extdata", "datasets.csv", package = "SympluR", mustWork = TRUE))
LCSMDemoDataTweetsSummaryTable <- symplurTweetsSummaryTable(datasets)

Credits

Thank you to Professor Larry Chu, MD at Stanford University School of Medicine for the idea of the SympluR R package.

sdk-php's People

Contributors

audvin avatar curtisdf avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.