Coder Social home page Coder Social logo

challenge-week-12's Introduction

Challenge Week 12 Submission Template

Peyman Mortazavi

Reddit Data Challenges

Challenge 1

Image

Challenge 2

It's interesting that our data has some issues, I wanted to find the ratio / but we only have 'null' for likes.

db.reddit.distinct("likes") returns [ null ]

Challenge 3

You could find interesting social facts. Like finding top downvoted posts, that's what people in society--or at least in reddit don't like.

Challenge 4

What majority of topics are about/likes and dislikes in the community. Like you could see if majoriy of people in reddit are tilted towards a political party or not.

Challenge 5

[Link to Code or pasted code] [Answer]

Challenge 6

It'll affect our analyze dramatically. The people who are good writers in reddit space and often attract many upvotes will remove many raddits from our data.

Challenge 7

Yes, very much. If we only study posts or people whose post are upvoted often, our results and conclusion will be biased.

Challenge 8

We'll be biased towards popularity.

Challenge 9

Private subraddits are filtered out. Only popular raddits are included.

Challenge 10

To analyze real data modified data and see if the result is biased toward a specific direction.

Yelp and Weather

Challenge 1

db.precipitation.aggregate([{"$match":{"date":{$regex:/20100425/}, "station.name":"MADISON DANE CO REGIONAL AIRPORT WI US"}},{"$group":{"_id":null,"total":{"$sum":"$hpcp"}}}])

ANSWER: 62

Challenge 2

[Query snippet]

db.normal.aggregate([ {$match: {"DATE": {$regex: /20100425/}, "STATION_NAME": {$regex: /LAS VEGAS/}}}, {$group: {"_id":null, avg: { $avg:"$HLY-WIND-AVGSPD"}}} ])

ANSWER: 110.08333333333333

Challenge 3

db.businesses.aggregate([{ $match: { city: "Madison", state: "WI" } }, { $group: { _id: null, total: { $sum: "$review_count" } } }, { $sort: { total: -1 } } ])

ANSWER: 34410

Challenge 4

db.businesses.aggregate([{ $match: { city: "Las Vegas", state: "NV" } }, { $group: { _id: null, total: { $sum: "$review_count" } } }, { $sort: { total: -1 } } ])

ANSWER: 577509

Challenge 5

db.businesses.aggregate([{ $match: { city: "Phoenix", state: "AZ" } }, { $group: { _id: null, total: { $sum: "$review_count" } } }, { $sort: { total: -1 } } ])

ANSWER: 200089

Challenge 6 [BONUS]

[Code] [Answer]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.