concept governor in category algorithms

appears as: governors, governor
Classic Computer Science Problems in Java

This is an excerpt from Manning's book Classic Computer Science Problems in Java.

6.3      Clustering governors by age and longitude

Every American state has a governor. In June 2017, those governors ranged in age from 42 to 79. If we take the United States from east to west, looking at each state by its longitude, perhaps we can find clusters of states with similar longitudes and similar-age governors. Figure 6.2 is a scatter plot of all 50 governors. The x-axis is state longitude, and the y-axis is governor age.

Classic Computer Science Problems in Python

This is an excerpt from Manning's book Classic Computer Science Problems in Python.

6.3. Clustering governors by age and longitude

Every American state has a governor. In June 2017, those governors ranged in age from 42 to 79. If we take the United States from east to west, looking at each state by its longitude, perhaps we can find clusters of states with similar longitudes and similar-age governors. Figure 6.2 is a scatter plot of all 50 governors. The x-axis is state longitude, and the y-axis is governor age.

Classic Computer Science Problems in Swift: Essential techniques for practicing programmers

This is an excerpt from Manning's book Classic Computer Science Problems in Swift: Essential techniques for practicing programmers.

6.3. Clustering governors by age and longitude

Every American state has a governor. In June 2017, those governors ranged in age from 42 to 79. If we take the United States from east to west, looking at each state by its longitude, perhaps we can find clusters of states with similar longitudes and similar age governors. Figure 6.1 is a scatter plot of all 50 governors. The x-axis is state longitude and the y-axis is governor age.

let governors = [Governor(longitude: -86.79113, age: 72, state: "Alabama"),
Governor(longitude: -152.404419, age: 66, state: "Alaska"),
Governor(longitude: -111.431221, age: 53, state: "Arizona"),
Governor(longitude: -92.373123, age: 66, state: "Arkansas"),
Governor(longitude: -119.681564, age: 79, state: "California"),
Governor(longitude: -105.311104, age: 65, state: "Colorado"),
Governor(longitude: -72.755371, age: 61, state: "Connecticut"),
Governor(longitude: -75.507141, age: 61, state: "Delaware"),
Governor(longitude: -81.686783, age: 64, state: "Florida"),
Governor(longitude: -83.643074, age: 74, state: "Georgia"),
Governor(longitude: -157.498337, age: 60, state: "Hawaii"),
Governor(longitude: -114.478828, age: 75, state: "Idaho"),
Governor(longitude: -88.986137, age: 60, state: "Illinois"),
Governor(longitude: -86.258278, age: 49, state: "Indiana"),
Governor(longitude: -93.210526, age: 57, state: "Iowa"),
Governor(longitude: -96.726486, age: 60, state: "Kansas"),
Governor(longitude: -84.670067, age: 50, state: "Kentucky"),
Governor(longitude: -91.867805, age: 50, state: "Louisiana"),
Governor(longitude: -69.381927, age: 68, state: "Maine"),
Governor(longitude: -76.802101, age: 61, state: "Maryland"),
Governor(longitude: -71.530106, age: 60, state: "Massachusetts"),
Governor(longitude: -84.536095, age: 58, state: "Michigan"),
Governor(longitude: -93.900192, age: 70, state: "Minnesota"),
Governor(longitude: -89.678696, age: 62, state: "Mississippi"),
Governor(longitude: -92.288368, age: 43, state: "Missouri"),
Governor(longitude: -110.454353, age: 51, state: "Montana"),
Governor(longitude: -98.268082, age: 52, state: "Nebraska"),
Governor(longitude: -117.055374, age: 53, state: "Nevada"),
Governor(longitude: -71.563896, age: 42, state: "New Hampshire"),
Governor(longitude: -74.521011, age: 54, state: "New Jersey"),
Governor(longitude: -106.248482, age: 57, state: "New Mexico"),
Governor(longitude: -74.948051, age: 59, state: "New York"),
Governor(longitude: -79.806419, age: 60, state: "North Carolina"),
Governor(longitude: -99.784012, age: 60, state: "North Dakota"),
Governor(longitude: -82.764915, age: 65, state: "Ohio"),
Governor(longitude: -96.928917, age: 62, state: "Oklahoma"),
Governor(longitude: -122.070938, age: 56, state: "Oregon"),
Governor(longitude: -77.209755, age: 68, state: "Pennsylvania"),
Governor(longitude: -71.51178, age: 46, state: "Rhode Island"),
Governor(longitude: -80.945007, age: 70, state: "South Carolina"),
Governor(longitude: -99.438828, age: 64, state: "South Dakota"),
Governor(longitude: -86.692345, age: 58, state: "Tennessee"),
Governor(longitude: -97.563461, age: 59, state: "Texas"),
Governor(longitude: -111.862434, age: 70, state: "Utah"),
Governor(longitude: -72.710686, age: 58, state: "Vermont"),
Governor(longitude: -78.169968, age: 60, state: "Virginia"),
Governor(longitude: -121.490494, age: 66, state: "Washington"),
Governor(longitude: -80.954453, age: 66, state: "West Virginia"),
Governor(longitude: -89.616508, age: 49, state: "Wisconsin"),
Governor(longitude: -107.30249, age: 55, state: "Wyoming")]