def searchcountry(query): array = getdata(sql(query)) #print(tabulate(array[0], headers=["Country Code", "Table Name", "Long Name"])) return array[0] #query = "United"
def scatterplottotal(info, figure): sequel = sql(info) data = getdata(sequel) p = points(data) plot(data[0][0][2], data[1][0][2], p, figure) #info = ["SL.UEM.TOTL.ZS", "FP.CPI.TOTL.ZG"]
def scatterplotyear(info, figure): sequel = sql(info) data = getdata(sequel) p = points(data) plot(info[0], data[2][0][0], data[3][0][0], p, figure) #info = [2014, "NY.GDP.PCAP.KD", "FP.CPI.TOTL.ZG"]
def scatterplotcountry(info, figure): sequel = sql(info) data = getdata(sequel) p = points(data) plot(info[0], data[0][0][2], data[1][0][2], p, figure) #info = ["USA", "SL.UEM.TOTL.ZS", "FP.CPI.TOTL.ZG"]
def linegraph(info, figure): plot(info, getdata(sql(info)), figure) #info = [1960, 2014, "USA", "NY.GDP.MKTP.KD"]
def searchstat(query): array = getdata(sql(query)) #print(tabulate(array[0], headers=["Series Code", "Topic", "Indicator Name"])) return array[0] #query = "GDP"