Using Frequency Plots and Bar Charts

[1]:
import transportation_tutorials as tt
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')

Questions

  1. Which county has the highest number of structurally deficient bridges? Use a frequency plot to find your answer.
  2. Which county has the lowest percentage of bridges that are in good condition? Use a bar chart to find your answer.

Data

To answer the questions, use the following data files:

[2]:
bridge = pd.read_csv(tt.data('FL-BRIDGES'))
[3]:
bridge.head()
[3]:
County Total # Good # Fair # Poor # SD # Total Area Good Area Fair Area Poor Area SD Area
0 ALACHUA (001) 111 64 47 - - 64767 55794 8973 NaN NaN
1 BAKER (003) 89 30 52 7 8 32162 19369 12282 510.0 623.0
2 BAY (005) 122 49 63 10 11 210039 98834 109628 1577.0 10120.0
3 BRADFORD (007) 62 23 37 2 2 9330 5492 3217 620.0 620.0
4 BREVARD (009) 241 160 81 - - 364138 204179 159959 NaN NaN
[4]:
bridge.columns
[4]:
Index(['County', 'Total #', 'Good #', 'Fair #', 'Poor #', 'SD #', 'Total Area',
       'Good Area', 'Fair Area', 'Poor Area', 'SD Area'],
      dtype='object')