1. Learn
  2. /
  3. Courses
  4. /
  5. Importing Data in Java

Connected

Exercise

JSON data analysis

With the product catalog loaded, the marketing team has requested a pricing report. They want to know the average price, identify the most expensive product, and see how products are distributed across categories.

The good news: once JSON data is in a Tablesaw table, you can use the same column operations you already know.

The JsonReader, JsonReadOptions, and Table classes have been imported, and the products.json file contains the name, price, and category columns.

Instructions

100 XP
  • Complete the JSON read to load the products table.
  • Calculate the average price using a column method.
  • Find the maximum price in the dataset.