1. Learn
  2. /
  3. Courses
  4. /
  5. Intro to data.world in Python

Exercise

Working with datasets

Datasets on data.world can be referenced by their full URL, or as we saw in the previous exercise, a portion of the URL that makes it's unique path or dataset key. We could have just as easily used https://data.world/stephen-hoover/chicago-city-council-votes in place of stephen-hoover/chicago-city-council-votes when loading our dataset with load_dataset(). We'll use the full URL for the rest of the tutorial, but this shorter 'dataset key' will be good to know for queries and APIs later on.

Datasets on data.world start with one or more files (including tabular data, documentation, scripts, reports, etc) and they are enhanced by members with metadata, including a dataset summary, descriptions for files and columns and more. The describe() function of the dataset object can be used to review all the metadata that is downloaded with the dataset.

In addition, data.world will analyze the data and attempt to extract a schema for all tabular files (CSVs). Use the same describe() function to get the metadata for a particular table (csv resource) by passing it as a parameter.

Instructions

100 XP
  • Import the datadotworld module as dw
  • Use the load_dataset method to assign https://data.world/stephen-hoover/chicago-city-council-votes to a dataset variable (notice that this time we're using the full URL).
  • Use the describe() function of the dataset object to print all the metadata that is downloaded with the dataset.
  • Use the same describe() function again, but now, use it to print a description of a specific resource: alderman_votes.