Exemplo n.º 1
0
    def showMenu(self, jsonData):
        plt = Plot(jsonData)

        while True:

            opt1 = self.__showOption1()

            if opt1 == 1:
                pass
            elif opt1 == 2:
                while True:

                    opt2 = self.__showOption2()

                    if opt2 == 1:
                        state = input('Selecione o estado: ', end='')
                        year = int(input('Selecione o ano: ', end=''))
                        plt.plot_state_year(state, year)

                        if plt.__showOption3() == 1:
                            continue
                        else:
                            break

                    elif opt2 == 2:
                        plt.plot_aState_aYear()

                        if plt.__showOption3() == 1:
                            continue
                        else:
                            break

                    elif opt2 == 3:
                        state = input('Selecione o estado: ', end='')
                        start = int(input('Insira o ano de inicio'))
                        end = int(input('Insira o ano de fim'))
                        plt.plot_timeline(state, start, end)

                        if plt.__showOption3() == 1:
                            continue
                        else:
                            break
                    elif opt2 == 4:
                        break

            elif opt1 == 3:
                exit()