I am sorry, i forgot ![]()
’ import Pkg
import CSV
import DataFrames
import Dates
import Plots
Pkg.add(“CSV”)
Pkg.add(“DataFrames”)
Pkg.add(“Dates”)
Pkg.add(“Plots”)
using CSV
using DataFrames
using Dates
using Plots
df = CSV.read(“Praktikum//zip//RedditUkraineThreadsAndComments_20220625-1630.csv.gzip”, DataFrame)
#df = CSV.read(“C://Users//Me//Path//To//File//RedditUkraineThreadsAndComments_20220625-1630.csv.gzip”, DataFrame)
transform!(df, [:thread_created_utc, :comment_created_utc] .=> ByRow(s → DateTime(s, dateformat"yyyy-mm-dd HH:MM:SS.s")), renamecols = false)
df.threadcreateddate = Date.(df.thread_created_utc)
df.commentcreateddate = Date.(df.comment_created_utc)
collection_threads = combine(groupby(df, :threadcreateddate), :thread_id => length ∘ unique => :number_of_threads)
collection_comments = combine(groupby(df, :commentcreateddate), :thread_id=> length∘ unique => :number_of_comments)
collection_threads.plot(x = :threadcreateddate, y = :number_of_threads, title = “Number of threads per day”)
collection_comments.plot(x = :commentcreateddate, y = :number_of_comments, title = “Number of comments per day”)
#plot(collection_threads.threadcreateddate, collection_threads.number_of_threads)
#plot(collection_comments.commentcreateddate, collection_comments.number_of_comments)’
The last 2 lines with plot(collection_…) are giving this “Possible method call error.Julia(IncorrectCallArgs)” Warning in VSC, while in the REPL i get a plot output from GKS QTerm (WindowsOS)