Giter Club home page Giter Club logo

tidyweb's Introduction

tidyweb : Easily Install and Load Modern Web-Scraping Packages

Scraping the modern web requires having many tools in one’s toolbox and the tidyverse only enables easy installation and loading of a few of them. tidyweb bundles a more complete list of scraping tools to make it easier to both install and use them.

install.packages("tidyweb") will get you a nice bundle of packages all installed at once and library(tidyweb) will load a scraping “core” : “curl”, “jsonlite”, “httr”, “xml2”, “rvest”, “purrr”, “dplyr”, “stringi”, and “splashr”.

tidyweb's People

Contributors

hrbrmstr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tidyweb's Issues

Adding startup message?

A quick hack (mostly borrowed from https://github.com/tidyverse/tidyverse/blob/master/R/attach.R):

.onAttach <- function(...) {
  pkgs <- c("curl", "jsonlite", "httr", "xml2", "rvest", "purrr", "dplyr", "stringi", "splashr")

  message(
    cli::rule(left = crayon::bold("Attaching packages"),
              right = paste0("tidyweb ", packageVersion("tidyweb")))
    )

  versions <- sapply(pkgs, packageVersion)
  versions <- sapply(versions, paste, collapse = ".")

  packages <- paste0(
    crayon::green(cli::symbol$tick), " ", crayon::blue(format(pkgs)), " ",
    crayon::col_align(versions, max(crayon::col_nchar(versions)))
    )

  col1 <- seq_len(length(packages) / 2)
  info <- paste0(packages[col1], "     ", packages[-col1])

  message(paste(info, collapse = "\n"))

  tmp <- suppressPackageStartupMessages(
    lapply(pkgs, library, character.only = TRUE, warn.conflicts = FALSE)
  )
  invisible()
}

Results:

> devtools::load_all()
Loading tidyweb
── Attaching packages ────────────────────────────────────────────── tidyweb 0.1.1 ──
✔ curl     3.1rvest    0.3.2.9000jsonlite 1.5purrr    0.2.4httr     1.3.1dplyr    0.7.4xml2     1.2.0stringi  1.1.6curl     3.1splashr  0.4.0  

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.