Skip to content

Commit

Permalink
Add country names data
Browse files Browse the repository at this point in the history
  • Loading branch information
mine-cetinkaya-rundel committed Nov 24, 2018
1 parent 55a19b0 commit bb865e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions data-raw/countries.R
@@ -0,0 +1,14 @@
# load packages ----------------------------------------------------------------
library(tidyverse)
library(rvest)
library(usethis)

# scrape data ------------------------------------------------------------------
countries_page <- read_html("https://simple.wikipedia.org/wiki/List_of_countries")

countries <- countries_page %>%
html_nodes(".b a") %>%
html_text()

# save data --------------------------------------------------------------------
use_data(countries)
Binary file added data/countries.rda
Binary file not shown.

0 comments on commit bb865e3

Please sign in to comment.