Data Science Classroom Notes 18/Dec/2021

Connecting to PostgreSQL with R

  • Connecting and reading from mysql Preview
  • Executing Queries Preview

R Binary Files

  • When we are working with R, we can pass around data or any R objects such as variables, functions using RData files.
  • These are binary files that represent R objects
  • Lets create an R Object from recipes
save(recipes, file='data/recipes.rdata')
save(users, file='data/users.rdata')
  • If you want to load rdata use load function Preview
  • We can store multiple multiple objects at one shot Preview Preview

Extract Data From Websites

  • Simple HTML Tables:

  • Scraping Web Data:

    • Note: Python is very good at scraping web data, so in reality we would use python for this.
    • In R there is a package created to extract data in usable format => rvest Preview
    • Read different html pages information Preview
  • Reading json data

    • To read json we have jsonlite library Preview

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner