Download class materials onto your desktop
This presentation is the property of its rightful owner.
Sponsored Links
1 / 8

Download class materials onto your desktop… PowerPoint PPT Presentation


  • 34 Views
  • Uploaded on
  • Presentation posted in: General

Download class materials onto your desktop…. as usual. JSON (JavaScript Object Notation). Think of it as a string representation of a Python object, in particular, a dictionary

Download Presentation

Download class materials onto your desktop…

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Download class materials onto your desktop

Download class materials onto your desktop…

as usual


Json javascript object notation

JSON(JavaScript Object Notation)

  • Think of it as a string representation of a Python object, in particular, a dictionary

  • The json package in Python allows you to convert a library to a JSON object(string representation) or from a JSON object to a Python object.

  • This allows easy data transfer and storage across platforms.


Streamer

Streamer


Analyzer

Analyzer


Answer the following questions

Answer the following questions

  • How many keys (attributes) are there in a single tweet?

  • What are they (can you print them out)?

  • One of the keys is 'user'. What type of object is its value?

  • Does a tweet have a key called 'place'? What type of object is its value?


Next tasks

Next tasks

  • I just loaded one tweet for you. Can you load all of them

  • Can you find out how many tweets whose 'place' attribute is not None?

  • For those tweets whose 'place' attributes are not None, print the values of 'place'. What type of object they are?


More about geotag

More about geotag

  • The value of 'place', when not None, is a dictionary. Find out what are its keys.

  • Look at 'bounding_box'. These are four coordinates that specify a square on the earth. Take the first one. Can you find out where it is?


  • Login