Good morning,
For my project, I need to generate random coordinates in the form of latitude and longitude pairs, where the generated coordinates need to be inside the borders of the USA, and ideally, there would be a higher probability for a coordinate to generate near the biggest cities in the USA. I have a CSV dataset, where I have the coordinates of such cities and their population.
So to summarize, I want my coordinates to generate with a higher probability near big cities, but sometimes I also want them to generate in the rural areas.
I'm using Python, and all Python's libraries are ok to use. One option I could do is to generate random coordinates in a rectangle, which surrounds the USA, but then somehow I also need to take into account the cities dataset.
Aucun commentaire:
Enregistrer un commentaire