Fill in the following functions in a program that maps GIS data from NYC OpenData CSV files and marks the current location and closest point: getData() that asks the user for the name of the CSV and returns a dataframe of the contents. getColumnNames() that asks the user for the exact name of the columns that contains the latitude and longitude and returns those values as a tuple. Since the NYC OpenData files use different names for the columns in different datasets (such as "Lat", "Latitude", "LATITUDE" for latitude), the program asks for the name of the column as well as the name of the data file. getLocale() asks the user for latitude and longitude of the user's current location and returns those floating points numbers. computeDist() that computes the squared distance between two points (x1,y1) and (x2,y2):(x1-x2)2 + (y1-y2)2 A sample run to find the closest CUNY campus to the Brooklyn Navy Yard: Enter CSV file name: cunyLocations.csv Enter column name for latitude: Latitude Enter column name for longitude: Longitude Enter current latitude: 40.7021 Enter current longitude: -73.9708 Enter output file: closestCUNY.html
Fill in the following functions in a program that maps GIS data from NYC OpenData CSV files and marks the current location and closest point: getData() that asks the user for the name of the CSV and returns a dataframe of the contents. getColumnNames() that asks the user for the exact name of the columns that contains the latitude and longitude and returns those values as a tuple. Since the NYC OpenData files use different names for the columns in different datasets (such as "Lat", "Latitude", "LATITUDE" for latitude), the program asks for the name of the column as well as the name of the data file. getLocale() asks the user for latitude and longitude of the user's current location and returns those floating points numbers. computeDist() that computes the squared distance between two points (x1,y1) and (x2,y2):(x1-x2)2 + (y1-y2)2 A sample run to find the closest CUNY campus to the Brooklyn Navy Yard: Enter CSV file name: cunyLocations.csv Enter column name for latitude: Latitude Enter column name for longitude: Longitude Enter current latitude: 40.7021 Enter current longitude: -73.9708 Enter output file: closestCUNY.html
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
Related questions
Question
Fill in the following functions in a program that maps GIS data from NYC OpenData CSV files and marks the current location and closest point:
- getData() that asks the user for the name of the CSV and returns a dataframe of the contents.
- getColumnNames() that asks the user for the exact name of the columns that contains the latitude and longitude and returns those values as a tuple. Since the NYC OpenData files use different names for the columns in different datasets (such as "Lat", "Latitude", "LATITUDE" for latitude), the program asks for the name of the column as well as the name of the data file.
- getLocale() asks the user for latitude and longitude of the user's current location and returns those floating points numbers.
- computeDist() that computes the squared distance between two points (x1,y1) and (x2,y2):(x1-x2)2 + (y1-y2)2
A sample run to find the closest CUNY campus to the Brooklyn Navy Yard:
Enter CSV file name: cunyLocations.csv
Enter column name for latitude: Latitude
Enter column name for longitude: Longitude
Enter current latitude: 40.7021
Enter current longitude: -73.9708
Enter output file: closestCUNY.html
Using the template: https://github.com/stjohn/csci127/blob/master/closestPoint.py
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning