-2

everyone. I have data from Instagram using this request: https://www.instagram.com/netflix/?__a=1

  1. How can I read the JSON File?
  2. How do I convert JSON to a Data Frame in R or other applications?

Thank you very much!

r2evans
  • 108,754
  • 5
  • 72
  • 122
Adriana
  • 1
  • 1

1 Answers1

0

To read the JSON it's as simple as this

library(jsonlite)
fromJSON("https://www.instagram.com/netflix/?__a=1")

Now turning it into a data.frame is a completely bespoke problem - JSON returns a key-value store, which can be very unique in it's 'shape'. Data.frames are typically rectangular (tabular) data, whereas key-value stores can be extremely unique in their strcuture. So TL;DR, you have to think about which parts of the list you keep, or how you manipulate it into a data.frame.

stevec
  • 27,285
  • 13
  • 133
  • 181