Example – working with airport data
In this example, we are going to tie together the functions from this chapter to analyze airport data. We need to do some work before we can play around with the functions that we have created. First, we need to get the data. On GitHub, you can find a .json
extract under https://github.com/PacktPublishing/Functional-Programming-in-Go./blob/main/Chapter6/resources/airlines.json.
The following snippet is the template for the dataset:
{ "Airport": { "Code": string, "Name": string }, "Statistics": { "Flights": { "Cancelled": number, "Delayed": number, ...