Halloween loot

Challenge
No

Help goattos analyze Halloween loot data. You can download the start workbook. It looks like this:

Start

Each record has four fields, with the rules given:

  • Neighborhood. Must be one of the four shown. Extra spaces and upper/lowercase differences don't matter, though.
  • Goat name.
  • Number of houses raided... er, visited. Must be a number between 0 and 50 inclusive.
  • Grams of candy collected. Must be a number between 0 and 5000 inclusive.

Compute:

  • The totals and averages shown.
  • The goat who collected the most candy.
  • The number of valid, invalid, and total records.

Make sure the code you write still works if the number of records changes.

Here's some output:

Output

Upload your solution here. The usual programming standards apply.

Where referenced