utopian_data is a CLI application which fetches public data of Utopian into your Mongodb instance.
Supported collections:
- moderators (api/moderators)
- sponsors (api/sponsors)
- posts ( api/posts)
Why
I have been working on a separate statistics application (private) for a while to analyze Utopian data better. However, using a REST API for statistics is not practical.
You need a fast system where you can make complex queries. Syncing Utopian posts' data into your system (you can set a crontab and sync it in every 5 minutes) is much better.
Example Mongodb aggreegation Queries
Total Contribution Count
db.posts.find({}).count()
Top 3 moderators on blog category (moderation count)
db.posts.aggregate(
[
{"$match": {"json_metadata.type": "blog"}},
{"$group": {_id: "$moderator", count: {$sum : 1}}},
{"$sort": {"count": -1}},
{"$limit": 3},
]
)
Top 3 Contributors
db.posts.aggregate(
[
{"$group": {_id: "$author", count: {$sum : 1}}},
{"$sort": {"count": -1}},
{"$limit": 3},
]
)
And more... You can pretty much filter/group everything you want once
you learn how Mongodb aggregation queries work.
Installation and Usage
You need to install and configure golang first. After that:
$ go get github.com/emre/utopian_data
$ cd $GOPATH
$ go install github.com/emre/utopian_data
$ cd `$GOPATH`/bin
$ utopian_data --mongodb_uri=localhost
Output
Let me know if you encounter any issues.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @ms10398, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
something wrong with the posts ( api/posts) link.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Good for who is already friendly with those api, mongodb and golang :)
I just wanna see a list of graphic contributions, filtered by date. to see daily approval / rejection percentages and which mod intent to reject or accept etc. yet there are no end-user friendly options for it. Hope we'll get there at some point in the future.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Fixed! Thanks.
This is for developers/power users, not end users. For the end users, I have another app in progress.™
sneak peek
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This one step I had to run like this:
As opposed to :
Nice article. I enjoyed it and will try the code. Like to see more Gophers on Steem :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @emrebeyler I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
If you like Mongodb then you should try Elasticsearch. You would be able to learn Elasticsearch pretty quickly. Mongodb is kinda harder to learn than Elasticsearch in my opinion. Thanks for the article.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit