We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2ec48e commit 0a2f833Copy full SHA for 0a2f833
Twitter-Data-Analysis/json2tweets.R
@@ -0,0 +1,16 @@
1
+library(jsonlite)
2
+options(encoding = "UTF-8")
3
+
4
+# read in individual JSON lines
5
+json_file <- "C:\\Users\\ujjwal.karn\\Desktop\\Tweets\\python.json"
6
7
+# turn it into a proper array by separating each object with a "," and
8
+# wrapping that up in an array with "[]"'s.
9
10
+dat <- fromJSON(sprintf("[%s]", paste(readLines(json_file), collapse=",")))
11
12
+dim(dat)
13
+## [1] 3959 18
14
15
+tweets<-dat$text
16
+tweets
0 commit comments