Difference between revisions of "Enclosing Circle Algorithm (Plotting)"

From edegan.com
Jump to navigation Jump to search
(Created page with "{{McNair Projects |Has title=Enclosing Circle Algorithm (Plotting) |Has keywords=Tool |Has project status=Subsume }} == Step By Step Use== 1. The file "vc_circles.py" contain...")
 
Line 1: Line 1:
{{McNair Projects
+
{{Project
 
|Has title=Enclosing Circle Algorithm (Plotting)
 
|Has title=Enclosing Circle Algorithm (Plotting)
 
|Has keywords=Tool
 
|Has keywords=Tool

Revision as of 13:12, 20 September 2020


Project
Enclosing Circle Algorithm (Plotting)
Project logo 02.png
Project Information
Has title Enclosing Circle Algorithm (Plotting)
Has start date
Has deadline date
Has keywords Tool
Has project status Subsume
Subsumed by: Enclosing Circle Algorithm (Rework)
Copyright © 2019 edegan.com. All Rights Reserved.

Step By Step Use

1. The file "vc_circles.py" contains the main script, "master_circles", which takes in the following

  a. "textfile", which is the filepath of the text data to read in. It must have fields "latitude',"longitude","city","datefirstinv"
  b. "n", which is the number of points to include in each circle
  c. "iterations", the number of iterations to try and find a local optimum. Large numbers will slow the runtime.
  d. "basefn", the base file path of where to store the circles and points for each city, year pair 
an example: "C:\\Users\\Name\\Documents"
the function will add on the city,year to this base file name and save it to this file directory
"C:\\Users\\Name\\Documents\\CityYear.txt" e. "outputfn", the full file path of where to output the area of the circles for a given city,year

2. To plot the circles,points for a given year onto google maps, use the function "googleplotter.py"

  a. This function takes in the filename used in 1d 
an example: "C:\\Users\\Name\\Documents\\CityYearAreas.txt"

3. To plot just the circles do the following:

  a. go to command prompt and type in cd /d E:\McNair\Software\CodeBase\New Implement of Enclosing Circle (Constrained K Means, Smallest Circle)
  b. type in python plot_wrapper2.py
  c. follow the prompts
  d. file should pop up in the same directory
  *the data must have column headers 'latitude' and 'longitude'*