library(RCurl)
library(XML)
library(tidyverse)
library(rvest)
library(stringr)
library(ggplot2)

Searching for “Data Scientist $145,000+ in New York, NY” in indeed.com gives us this URL to start with:
https://www.indeed.com/q-data-scientist-$145,000-l-New-York,-NY-jobs.html

Read [and store] HTML from the starting URL

#NOTE: provide existing path to store the files
data_store_path <- "~/R/Project 3"

url <- "https://www.indeed.com/q-data-scientist-$145,000-l-New-York,-NY-jobs.html"

h <- read_html(url)
write_html(h, file.path(data_store_path,"indeed_job_search.html"))

Create a data frame holding the result of scraping (job title, job summary, etc.)

job_df <- data.frame(job_post_source = "INDEED", job_post_title = job_title, job_post_summary = job_sum_text)
glimpse(job_df)
## Observations: 16
## Variables: 3
## $ job_post_source  <fct> INDEED, INDEED, INDEED, INDEED, INDEED, INDEE...
## $ job_post_title   <fct> Data Scientist - Fixed Income Real-Time Prici...
## $ job_post_summary <fct> Job Requisition Number:64749The Fixed Income ...