1. Engineering
  2. Computer Science
  3. tweetjson file quotcoordinatesquot null quotcreatedatquot quotthu oct 21 160246...

Question: tweetjson file quotcoordinatesquot null quotcreatedatquot quotthu oct 21 160246...

Question details
TWEET.JSON FILE
{
  "coordinates": null,
  "created_at": "Thu Oct 21 16:02:46 +0000 2010",
  "favorited": false,
  "truncated": false,
  "id_str": "28039652140",
  "entities": {
    "urls": [
      {
        "expanded_url": null,
        "url": "http://gnip.com/success_stories",
        "indices": [
          69,
          100
        ]
      }
    ],
    "hashtags": [
     {
      "text": "gnip",
      "indices": [46, 52]
     },
     {
      "text": "data",
      "indices": [47, 51]
     },
     {
      "text": "story",
      "indices": [48, 53]
     }
 
    ],
    "user_mentions": [
      {
        "name": "Gnip, Inc.",
        "id_str": "16958875",
        "id": 16958875,
        "indices": [
          25,
          30
        ],
        "screen_name": "gnip"
      }
    ]
  },
  "in_reply_to_user_id_str": null,
  "text": "what we've been up to at @gnip -- delivering data to happy customers http://gnip.com/success_stories",
  "contributors": null,
  "id": 28039652140,
  "retweet_count": null,
  "in_reply_to_status_id_str": null,
  "geo": null,
  "retweeted": false,
  "in_reply_to_user_id": null,
  "user": {
    "profile_sidebar_border_color": "C0DEED",
    "name": "Gnip, Inc.",
    "profile_sidebar_fill_color": "DDEEF6",
    "profile_background_tile": false,
    "profile_image_url": "http://a3.twimg.com/profile_images/62803643/icon_normal.png",
    "location": "Boulder, CO",
    "created_at": "Fri Oct 24 23:22:09 +0000 2008",
    "id_str": "16958875",
    "follow_request_sent": false,
    "profile_link_color": "0084B4",
    "favourites_count": 1,
    "url": "http://blog.gnip.com",
    "contributors_enabled": false,
    "utc_offset": -25200,
    "id": 16958875,
    "profile_use_background_image": true,
    "listed_count": 23,
    "protected": false,
    "lang": "en",
    "profile_text_color": "333333",
    "followers_count": 260,
    "time_zone": "Mountain Time (US & Canada)",
    "verified": false,
    "geo_enabled": true,
    "profile_background_color": "C0DEED",
    "notifications": false,
    "description": "Gnip makes it really easy for you to collect social data for your business.",
    "friends_count": 71,
    "profile_background_image_url": "http://s.twimg.com/a/1287010001/images/themes/theme1/bg.png",
    "statuses_count": 302,
    "screen_name": "gnip",
    "following": false,
    "show_all_inline_media": false
  },
  "in_reply_to_screen_name": null,
  "source": "web",
  "place": null,
  "in_reply_to_status_id": null
}

WCUP.JSON FILE

[{"id":1,"country":"Brazil","alternate_name":null,"fifa_code":"BRA","group_id":1,"group_letter":"A","wins":4,"draws":1,"losses":2,"games_played":7,"points":13,"goals_for":11,"goals_against":14,"goal_differential":-3},
 {"id":2,"country":"Croatia","alternate_name":null,"fifa_code":"CRO","group_id":1,"group_letter":"A","wins":1,"draws":0,"losses":2,"games_played":3,"points":3,"goals_for":6,"goals_against":6,"goal_differential":0},
 {"id":3,"country":"Mexico","alternate_name":null,"fifa_code":"MEX","group_id":1,"group_letter":"A","wins":2,"draws":1,"losses":1,"games_played":4,"points":7,"goals_for":5,"goals_against":3,"goal_differential":2},
 {"id":4,"country":"Cameroon","alternate_name":null,"fifa_code":"CMR","group_id":1,"group_letter":"A","wins":0,"draws":0,"losses":3,"games_played":3,"points":0,"goals_for":1,"goals_against":9,"goal_differential":-8},
 {"id":5,"country":"Spain","alternate_name":null,"fifa_code":"ESP","group_id":2,"group_letter":"B","wins":1,"draws":0,"losses":2,"games_played":3,"points":3,"goals_for":4,"goals_against":7,"goal_differential":-3},
 {"id":6,"country":"Netherlands","alternate_name":"Holland","fifa_code":"NED","group_id":2,"group_letter":"B","wins":6,"draws":0,"losses":1,"games_played":7,"points":18,"goals_for":15,"goals_against":4,"goal_differential":11},
 {"id":7,"country":"Chile","alternate_name":null,"fifa_code":"CHI","group_id":2,"group_letter":"B","wins":2,"draws":0,"losses":2,"games_played":4,"points":6,"goals_for":6,"goals_against":4,"goal_differential":2},
 {"id":8,"country":"Australia","alternate_name":null,"fifa_code":"AUS","group_id":2,"group_letter":"B","wins":0,"draws":0,"losses":3,"games_played":3,"points":0,"goals_for":3,"goals_against":9,"goal_differential":-6},
 {"id":9,"country":"Colombia","alternate_name":null,"fifa_code":"COL","group_id":3,"group_letter":"C","wins":4,"draws":0,"losses":1,"games_played":5,"points":12,"goals_for":12,"goals_against":4,"goal_differential":8},
 {"id":10,"country":"Greece","alternate_name":null,"fifa_code":"GRE","group_id":3,"group_letter":"C","wins":1,"draws":1,"losses":2,"games_played":4,"points":4,"goals_for":3,"goals_against":5,"goal_differential":-2},
 {"id":11,"country":"Ivory Coast","alternate_name":"Côte d'Ivoire","fifa_code":"CIV","group_id":3,"group_letter":"C","wins":1,"draws":0,"losses":2,"games_played":3,"points":3,"goals_for":4,"goals_against":5,"goal_differential":-1},
 {"id":12,"country":"Japan","alternate_name":null,"fifa_code":"JPN","group_id":3,"group_letter":"C","wins":0,"draws":1,"losses":2,"games_played":3,"points":1,"goals_for":2,"goals_against":6,"goal_differential":-4},
 {"id":13,"country":"Uruguay","alternate_name":null,"fifa_code":"URU","group_id":4,"group_letter":"D","wins":2,"draws":0,"losses":2,"games_played":4,"points":6,"goals_for":4,"goals_against":6,"goal_differential":-2},
 {"id":14,"country":"Costa Rica","alternate_name":null,"fifa_code":"CRC","group_id":4,"group_letter":"D","wins":3,"draws":1,"losses":1,"games_played":5,"points":10,"goals_for":5,"goals_against":2,"goal_differential":3},
 {"id":15,"country":"England","alternate_name":null,"fifa_code":"ENG","group_id":4,"group_letter":"D","wins":0,"draws":1,"losses":2,"games_played":3,"points":1,"goals_for":2,"goals_against":4,"goal_differential":-2},
 {"id":16,"country":"Italy","alternate_name":null,"fifa_code":"ITA","group_id":4,"group_letter":"D","wins":1,"draws":0,"losses":2,"games_played":3,"points":3,"goals_for":2,"goals_against":3,"goal_differential":-1},
 {"id":17,"country":"Switzerland","alternate_name":null,"fifa_code":"SUI","group_id":5,"group_letter":"E","wins":2,"draws":0,"losses":2,"games_played":4,"points":6,"goals_for":7,"goals_against":7,"goal_differential":0},
 {"id":18,"country":"Ecuador","alternate_name":null,"fifa_code":"ECU","group_id":5,"group_letter":"E","wins":1,"draws":1,"losses":1,"games_played":3,"points":4,"goals_for":3,"goals_against":3,"goal_differential":0},
 {"id":19,"country":"France","alternate_name":null,"fifa_code":"FRA","group_id":5,"group_letter":"E","wins":3,"draws":1,"losses":1,"games_played":5,"points":10,"goals_for":10,"goals_against":3,"goal_differential":7},
 {"id":20,"country":"Honduras","alternate_name":null,"fifa_code":"HON","group_id":5,"group_letter":"E","wins":0,"draws":0,"losses":3,"games_played":3,"points":0,"goals_for":1,"goals_against":8,"goal_differential":-7},
 {"id":21,"country":"Argentina","alternate_name":null,"fifa_code":"ARG","group_id":6,"group_letter":"F","wins":6,"draws":0,"losses":1,"games_played":7,"points":18,"goals_for":8,"goals_against":4,"goal_differential":4},
 {"id":22,"country":"Bosnia and Herzegovina","alternate_name":"Bosnia-Herzegovina","fifa_code":"BIH","group_id":6,"group_letter":"F","wins":1,"draws":0,"losses":2,"games_played":3,"points":3,"goals_for":4,"goals_against":4,"goal_differential":0},
 {"id":23,"country":"Iran","alternate_name":null,"fifa_code":"IRN","group_id":6,"group_letter":"F","wins":0,"draws":1,"losses":2,"games_played":3,"points":1,"goals_for":1,"goals_against":4,"goal_differential":-3},
 {"id":24,"country":"Nigeria","alternate_name":null,"fifa_code":"NGA","group_id":6,"group_letter":"F","wins":1,"draws":1,"losses":2,"games_played":4,"points":4,"goals_for":3,"goals_against":5,"goal_differential":-2},
 {"id":25,"country":"Germany","alternate_name":null,"fifa_code":"GER","group_id":7,"group_letter":"G","wins":6,"draws":1,"losses":0,"games_played":7,"points":19,"goals_for":18,"goals_against":4,"goal_differential":14},
 {"id":26,"country":"Portugal","alternate_name":null,"fifa_code":"POR","group_id":7,"group_letter":"G","wins":1,"draws":1,"losses":1,"games_played":3,"points":4,"goals_for":4,"goals_against":7,"goal_differential":-3},
 {"id":27,"country":"Ghana","alternate_name":null,"fifa_code":"GHA","group_id":7,"group_letter":"G","wins":0,"draws":1,"losses":2,"games_played":3,"points":1,"goals_for":4,"goals_against":6,"goal_differential":-2},
 {"id":28,"country":"USA","alternate_name":null,"fifa_code":"USA","group_id":7,"group_letter":"G","wins":1,"draws":1,"losses":2,"games_played":4,"points":4,"goals_for":5,"goals_against":6,"goal_differential":-1},
 {"id":29,"country":"Belgium","alternate_name":null,"fifa_code":"BEL","group_id":8,"group_letter":"H","wins":4,"draws":0,"losses":1,"games_played":5,"points":12,"goals_for":6,"goals_against":3,"goal_differential":3},
 {"id":30,"country":"Algeria","alternate_name":null,"fifa_code":"ALG","group_id":8,"group_letter":"H","wins":1,"draws":1,"losses":2,"games_played":4,"points":4,"goals_for":7,"goals_against":7,"goal_differential":0},
 {"id":31,"country":"Russia","alternate_name":null,"fifa_code":"RUS","group_id":8,"group_letter":"H","wins":0,"draws":2,"losses":1,"games_played":3,"points":2,"goals_for":2,"goals_against":3,"goal_differential":-1},
 {"id":32,"country":"Korea Republic","alternate_name":"South Korea","fifa_code":"KOR","group_id":8,"group_letter":"H","wins":0,"draws":1,"losses":2,"games_played":3,"points":1,"goals_for":3,"goals_against":6,"goal_differential":-3}]

QUESTIONS

1. Download the tweet.json file above. Create a javascript parser that displays the following information:

– The creation date of the tweet

– The user that created the tweet

– The text that the user tweeted

– The screen name of the user

– The hashtags that user used in the tweet.

2. Download the wcup.json file above. This file has the overall stats for all the 32 teams that participated in the 2014 soccer world cup. Create a javascript parser that displays the following information:

– One line for each team: displaying the team’s fifa code, win, draw, and loss.

– Display the teams that had no win.

– Display the teams that lost all the game they played.

NOTE: THIS IS DATABASE IN JSON USING JAVASCRIPT. SO THE CODE HAVE TO BE IN JAVASCRIPT. If you need more information or explanation, lemme know in the comments section. Thanks

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution