<commit_before>from graph import Greengraph
from argparse import ArgumentParser
from matplotlib import pyplot as this_plot

def process():
   ''' 
       Command Line Interface Allowing The User To Specify Arguments 
       This Function Then Plots The Results Where The Package Was Called From
	   For Example, If It Was Called From The Desktop, The Resulting Chart Would Be Saved On The Desktop For The User.
   '''
   
   parser = ArgumentParser(description = "Generate Green Density Chart Based on Two Points")
   
   parser.add_argument('from', '-f',help='Enter a start location here such as London. [STRING]', dest='startPoint', required=True)
   parser.add_argument('to', '-t',help='Enter an end location here such as Oxford. [STRING]', dest='endPoint',required=True) 
   parser.add_argument('--steps', '-s', type=int, help='Enter the number of steps you wish to chart. [INT]', default=10)
   parser.add_argument('--out', '-o', help='Enter the file name you wish to call the image (Default=PNG)', default='output.png')
   
   arguments= parser.parse_args()
   
   this_chart = Greengraph(arguments.startPoint,arguments.endPoint)
   this_data = this_chart.green_between(arguments.steps)
   this_plot.plot(this_data)
   #Add Annotations
   this_plot.xlabel("Steps")
   this_plot.ylabel("'Green Pixel Density'")
   this_plot.title("Green Land Density: " + arguments.startPoint + " - " + arguments.endPoint)
   #Save result and show user
   this_plot.savefig(arguments.out)
   this_plot.show()<commit_msg>Changed function structure of charting from command line<commit_after>from graph import Greengraph
from argparse import ArgumentParser
from matplotlib import pyplot as this_plot

def chart(start, end, steps, out):
   this_chart = Greengraph(start,end)
   this_data = this_chart.green_between(steps)
   this_plot.plot(this_data)
   #Add Annotations
   this_plot.xlabel("Steps")
   this_plot.ylabel("'Green Pixel Density'")
   this_plot.title("Green Land Density: " + start + " - " + end)
   #Save result and show user
   this_plot.savefig(out)
   this_plot.show()

def process():
   ''' 
       Command Line Interface Allowing The User To Specify Arguments 
       This Function Then Plots The Results Where The Package Was Called From
	   For Example, If It Was Called From The Desktop, The Resulting Chart Would Be Saved On The Desktop For The User.
   '''
   
   parser = ArgumentParser(description = "Generate Green Density Chart Based on Two Points")
   
   #Positional Arguments
   parser.add_argument('from', help='Enter a start location here such as London. [STRING]', dest='startPoint', required=True)
   parser.add_argument('to',help='Enter an end location here such as Oxford. [STRING]', dest='endPoint',required=True) 
   
   #Optional Arguments
   parser.add_argument('--steps', '-s', type=int, help='Enter the number of steps you wish to chart. [INT]', default=10)
   parser.add_argument('--out', '-o', help='Enter the file name you wish to call the image (Default=PNG)', default='output.png')
   
   arguments= parser.parse_args()
   
   chart(arguments.startPoint,arguments.endPoint,arguments.steps,arguments.out)
   
{'fraction_non_alphanumeric': 0.10477707006369427, 'fraction_numerical': 0.0012738853503184713, 'mean_word_length': 4.314720812182741, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1319954', 'n_tokens_mistral': 919, 'n_tokens_neox': 900, 'n_words': 303}