data-raw/raw_elements_wiki.R

library(rvest)
library(dplyr)
library(readr)

periodic_table <- read_html("https://en.wikipedia.org/wiki/List_of_chemical_elements") %>%
  html_nodes("table") %>%
  .[[1]] %>%
  html_table(fill = TRUE) %>%
  slice(-1)

write_csv(periodic_table, "periodic_table.csv")
ismayc/chemistr documentation built on Feb. 4, 2023, 12:44 p.m.