+1(316)4441378

+44-141-628-6690

Archive for the ‘Python IDLE Assignment’ Category

Biodiversity Estimation Assignment

"This assignment will provide an introduction to working with biodiversity data and estimating the biodiversity for a number of locations within the UK and how geographical data can be visualised.

Data
A data set of mammals has been created from GBIF, Mammal.txt contains 125,000 sightings of mammals. Each entry consists of three fields, a species name, a latitude and a longitude, the fields are separated using tabs. A data set of birds (Birds.txt) is also included for testing purposes, it is in the same file format.

Details
A Python script Biodiversity.py contains two functions CalculateDistance which calculates the distance between two locations. CalculateDistance takes four variables, the latitude and longitude of the first location and the latitude and longitude of the second location, it returns the distance in km between the two locations. The second function, LineToList, converts a line of the input file to a list of three elements. Braking the line on tabs, t