mirror of
https://github.com/arnaucube/argos.git
synced 2026-02-07 02:56:41 +01:00
small update
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
twitter analyzer written in Go lang
|
twitter analyzer written in Go lang
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
needs a twitterConfig.json file on the /build folder with the content:
|
needs a twitterConfig.json file on the /build folder with the content:
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ func analyzeHours(tweets []twitter.Tweet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func analyzeDates(tweets []twitter.Tweet) {
|
func analyzeDates(tweets []twitter.Tweet) {
|
||||||
|
fmt.Println("Weekly activity distribution (per day)")
|
||||||
analyzeDays(tweets)
|
analyzeDays(tweets)
|
||||||
fmt.Println(" ")
|
fmt.Println(" ")
|
||||||
|
fmt.Println("Daily activity distribution (per hour)")
|
||||||
analyzeHours(tweets)
|
analyzeHours(tweets)
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
10
getUser.go
10
getUser.go
@@ -23,7 +23,17 @@ func getUser(client *twitter.Client) {
|
|||||||
Count: 200,
|
Count: 200,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
fmt.Println("word count")
|
||||||
analyzeWords(tweets)
|
analyzeWords(tweets)
|
||||||
|
|
||||||
analyzeDates(tweets)
|
analyzeDates(tweets)
|
||||||
|
|
||||||
|
fmt.Println(" ")
|
||||||
|
fmt.Print("first tweet analyzed: ")
|
||||||
|
fmt.Println(tweets[len(tweets)-1].CreatedAt)
|
||||||
|
fmt.Print("last tweet analyzed: ")
|
||||||
|
fmt.Println(tweets[0].CreatedAt)
|
||||||
|
|
||||||
|
fmt.Println(" ")
|
||||||
|
fmt.Println("User @" + username + " analysis finished")
|
||||||
}
|
}
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -7,7 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const minNumWords = 10
|
const minNumWords = 3
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("---------------")
|
fmt.Println("---------------")
|
||||||
|
|||||||
BIN
screen2.png
Normal file
BIN
screen2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
BIN
screen3.png
Normal file
BIN
screen3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
Reference in New Issue
Block a user