Return to Video

Handling Attributes - Data Wranging with MongoDB

  • 0:00 - 0:02
    As we saw with the OpenStreetMap data,
  • 0:02 - 0:05
    XML tags often contain attribute name value pairs.
  • 0:05 - 0:08
    One example of attributes in this data set
  • 0:08 - 0:12
    is the iid attribute of this institutional relationship
  • 0:12 - 0:16
    tag, or insr tag. The iid value here
  • 0:16 - 0:18
    actually defines a relationship between an author and
  • 0:18 - 0:22
    institutions with which they are affiliated. Institutions appear
  • 0:22 - 0:25
    later in this institution group, here, as individual
  • 0:25 - 0:28
    elements of their own. Now in the last
  • 0:28 - 0:32
    exercise we ignored these insr tags. Let's address
  • 0:32 - 0:34
    them here. We're going to update our solution
  • 0:34 - 0:37
    to the last exercise to use the data
  • 0:37 - 0:39
    in these insr tags. See the code I've
  • 0:39 - 0:44
    provided. However, rather than an insr field in
  • 0:44 - 0:47
    your author dictionaries, store an iid field for
  • 0:47 - 0:50
    each author. Note that some authors will have
  • 0:50 - 0:56
    multiple insr tags. The value for the iid field then for
  • 0:56 - 1:01
    authors needs to be an array composed of all the iids for a given author. For
  • 1:01 - 1:03
    each author, create an iid field. Note
  • 1:03 - 1:05
    that some authors are actually affiliated with
  • 1:05 - 1:10
    multiple institutions, so the value for your iid fields needs to be an array.
Cím:
Handling Attributes - Data Wranging with MongoDB
Video Language:
English
Team:
Udacity
Projekt:
UD032: Data Wrangling with MongoDB
Duration:
01:11

English subtitles

Felülvizsgálatok Compare revisions