One of the greatest thing about R is the thousands of packages available on CRAN and Github. Without being a pro on programming, this lets you to do pretty cool things thanks to all the hard work done by the community. In this blog post, I’d like to introduce two packages I recently used along with a Shiny dashboard I created using these packages.
The openfda package provides simple access to OpenFDA API from R. OpenFDA is a project aiming to provide easy access to Food and Drug Administration public datasets. Currently, OpenFDA includes public data for drug and medical device adverse events, recall information for all FDA-regulated products, and drug labeling.
The RISmed packages include a set of tools to extract content from the National Center for Biotechnology Information (NCBI) databases, including PubMed. PubMed is a free search engine for abstracts and references in the MEDLINE database in the fields of medicine and life sciences. The RISmed packages allows for easy extraction of a variety of information, such as article title, data of publication, country of publication, author names etc, from keyword search.
With the help of these two packages, I built a Shiny Dashboard presenting a brief report for newly approved drug substances in Canada between 2016 and 2017.
The dashboard is consisted of seven tabs. The overview tab gives the audience a general sense of the classification of the drug substances, the manufacturers along with the complete list of the substances. The adverse event report tab shows the number of adverse events reported to FDA for a selected substance. And this is where the openfda package was useful, it provides a direct link between R and OpenFDA API, so I can pull the counts from their public dataset and make the plot with highchart (https://www.highcharts.com). The Pubmed records tab pulls information from NCBI online database using drug substance names as keyword. With RISmed package, it presents a quick review of the literatures published since 2006 which mentioned the selected substance. The rest of the tabs were built based on information scraped from Health Canada and FDA websites. I will cover those tabs in more detail in my next blog about web scraping.
All data used in this Shiny Dashboard are from online sources available to public. As you can see, if you are willing to dig deeper into the online source, with the help of R, gaining an insight into a topic of your interest is not that hard! Happy coding!