Web scraping in R with ChatGPT (4 Examples) no HTML knowledge needed

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 6

  • @trevorschrotz
    @trevorschrotz 27 дней назад +3

    Excellent. Very helpful.

  • @hamedrajhi
    @hamedrajhi 27 дней назад +2

    This is informative. Usually getting and cleaning the data is the hardest part of most projects

    • @TheDataDigest
      @TheDataDigest  27 дней назад

      Very true (sadly). There is a project called TidyTuesday, where a clean dataset is created every week, ready for analysis. But this is often an exception especially with new data. But here chatGPT was quite helpful with the separate() function and the conversion based on "k" or no-"k".

  • @qwerty3465
    @qwerty3465 25 дней назад +1

    Well done. No way around LLMs if you are in scripting. I would have expected chatGPT to get this right from just example values but in general it is very helpful to specify what approach you'd follow yourself when solving this or even just to point out potential tripwires to it.

    • @TheDataDigest
      @TheDataDigest  24 дня назад

      I first tried to copy the entire html code from the body into chatGPT, but that were too many lines of text. Is there a way to extract the grid or structure info from F12? Or could the online version chatGPT 4.0 access the website and investigate the structure by itself?

    • @qwerty3465
      @qwerty3465 24 дня назад +1

      @@TheDataDigest it claims it can ("I can certainly help with summarizing or describing the structure of a webpage. For example, I can outline the general HTML structure of a page, explain how its components work, or describe the layout based on what I can access.") but I can't waste any 4o prompts right now :D What you can try is to save the webpage as html and then supply that file to chatGPT, context windows are pretty large by now