How to create an API for your R code

How to create an API for your R code

R
In the video linked below we discuss how to convert your R code into an API using the awesome plumber package! Learn more by clicking here or by following the links below. The plumber package allows you to convert R functions into API calls. For example, rather than launching R and executing a function, you can use plumber to turn the function into an API request that can be called from other software (e.g. Python, cURL, etc.). This is enormously useful in a lot of applications e.g. building a web application with Python that can make API calls to R model objects, retrieving R plots into other applications, and more. Check out the video below to learn more! Link to full video: https://www.youtube.com/watch?v=Z2Aofr4UIFY To skip to specific parts of the…
Read More
How to scrape news articles with Python

How to scrape news articles with Python

Python, Web Scraping
In this post we're going to discuss how to scrape news articles with Python. This can be done using the handy newspaper package. Introduction to Python's newspaper package The newspaper package can be installed using pip: [code] pip install newspaper [/code] Once its installed, we can get started. newspaper can work by either scraping a single article from a given URL, or by finding the links on a webpage to other news articles. Let's start with handling a single article. First, we need to import the Article class. Next, we use this class to download the content from the URL to our news article. Then, we use the parse method to parse the HTML. Lastly, we can print out the text of the article using .text. Scraping a single article…
Read More