Browse Source

Edit: recompiled PDF, extract hashtags, write TODO

pull/6/head
janwey 1 year ago
parent
commit
bd86de5581
3 changed files with 84 additions and 0 deletions
  1. BIN
      docs/collector.pdf
  2. 82
    0
      plotte.R
  3. 2
    0
      todo.txt

BIN
docs/collector.pdf View File


+ 82
- 0
plotte.R View File

@@ -0,0 +1,82 @@
################################################################################
# plotte.R #
# Plotting scraped data for "I Love Free Software Day" #
# Jan Weymeirsch janwey@fsfe.org #
################################################################################

## Loading Data {{{ ----
load(file = "./data/ilovefs-all_2018-02-14_16-39-12.RData")
# }}}

##
### Extract Hashtags
#### Fediverse
mastodon_hashtags_l <- stri_extract_all(str = mastodon$text, regex = "#\\w+")
mastodon_hashtags <- c()
for(i in c(1:length(mastodon_hashtags_l))){
for(j in c(1:length(mastodon_hashtags_l[[i]]))){
mastodon_hashtags <- c(mastodon_hashtags, mastodon_hashtags_l[[i]][j])
}
}
unique(mastodon_hashtags)

#### Twitter
twitter_hashtags_l <- stri_extract_all(str = twitter$text, regex = "#\\w+")
twitter_hashtags <- c()
for(i in c(1:length(twitter_hashtags_l))){
for(j in c(1:length(twitter_hashtags_l[[i]]))){
twitter_hashtags <- c(twitter_hashtags, twitter_hashtags_l[[i]][j])
}
}
unique(twitter_hashtags)

plot(mastodon$acct)
legend(x = "topleft", legend = unique(mastodon$acct))
mastodon$text[mastodon$acct == "JayVii_de"]
length(which(mastodon$acct == "mxmehl@quitter.no"))

mastodon$text
mastodon_projects <- c("astroidmail",
"general",
"astroidmail",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"opensourcedesign",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
"general",
NA,
"general",
"general",
NA,
NA,
NA,
NA,
NA,
"fdroid",
"fdroid",
NA,
"transportr",
"transportr",
NA,
"nextcloud")
length(mastodon_projects)
plot(as.factor(mastodon_projects))

+ 2
- 0
todo.txt View File

@@ -0,0 +1,2 @@
# TODO
- replace regex of date/time in collecto.R with strptime() https://stackoverflow.com/questions/15838548/parsing-iso8601-date-and-time-format-in-r

Loading…
Cancel
Save