Question: Step 1: Generate random cell towers. To start out, we're going to keep things simple and use artificial data to create our cell phone tower

 Step 1: Generate random cell towers. To start out, we're goingto keep things simple and use artificial data to create our cell

Step 1: Generate random cell towers. To start out, we're going to keep things simple and use artificial data to create our cell phone tower network. Specifically, we'll just populate a network of towers randomly. Do This: Write a function to randomly create a 2D numpy array with N rows representing cell towers and 2 columns representing the x (longitude) and y (latitude) positions of the cell towers on a map. You may assume that the map is a 2D plane and not a sphere. You can also assume that the "latitude" and "longitude" values are all in the range of 0 to 1 . 2.2 Do This: Now extend your code so that it runs over all data points (not just the first) and finds the nearest neighbor. Make sure to store the nearest neighbor in either a list or a dictionary. Note: this isn't a trivial function, so don't worry if you can't quite get it figured out. Do your best to work through the logic and implement a solution. If you get stuck, try to make a note of where you got stuck and include this in your follow-up survey. 1 \#Write your code here Do This: Run your nearest neighbor graphing function on the points you generated in step 1. Generate a plot of the points and include the edges of the graph. Your plot should look something like the following

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!