Example #1
0
 def test_pie_chart_plot_by_violation_type(self):
     housing_data_test = hd.HousingComplaintsData()
     complaint_dataset = housing_data_test.construct_complaint_dataset(65, '20150801', '20150930')
     
     test_pie = Pie_Chart(complaint_dataset)
     test_pie.plot_by_violation_type()
     
     self.assertTrue(os.path.isfile('figures/piechart.pdf'))
Example #2
0
    def test_pie_chart_plot_by_violation_type(self):
        housing_data_test = hd.HousingComplaintsData()
        complaint_dataset = housing_data_test.construct_complaint_dataset(
            65, '20150801', '20150930')

        test_pie = Pie_Chart(complaint_dataset)
        test_pie.plot_by_violation_type()

        self.assertTrue(os.path.isfile('figures/piechart.pdf'))
Example #3
0
def make_visual_analyses(complaint_dataset):
    print 'Making visual analysis tools...'

    try:
        pie_chart = Pie_Chart(complaint_dataset)
        pie_chart.plot_by_violation_type()

        line_graph = lg.LineGraph()
        line_graph.plot_line_graph(complaint_dataset)

        bar_graph = bg.BarGraph()
        bar_graph.plot_bar_graph(complaint_dataset)

        print '\nFigures are now saved in the figures folder.'

    except (ValueError, TypeError):
        print "\nYour range of dates does not contain information for your choice of ID."
        print "Please, choose a different combination."
def make_visual_analyses(complaint_dataset):
    print 'Making visual analysis tools...'
    
    try:    
        pie_chart = Pie_Chart(complaint_dataset)
        pie_chart.plot_by_violation_type()
    
        line_graph = lg.LineGraph()
        line_graph.plot_line_graph(complaint_dataset)

        bar_graph = bg.BarGraph()
        bar_graph.plot_bar_graph(complaint_dataset) 
    
        print '\nFigures are now saved in the figures folder.'
        
    except (ValueError, TypeError):
        print "\nYour range of dates does not contain information for your choice of ID."
        print "Please, choose a different combination."