Answer to Question #314510 in Python for Shubham

Question #314510

Find latitude and longitude of first 20 countries with a population greater than or equal to the population limit given below. Use the country details from this dataset ( https://cdn.jsdelivr.net/gh/apilayer/restcountries@3dc0fb110cd97bce9ddf27b3e8e1f7fbe115dc3c/src/main/resources/countriesV2.json ).

Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.

  • Assume radius of earth: 6371 km
  • Round length of each line and final result to 2 decimal points
  • If co-ordinates are missing for any country use 0.000 N 0.000 E

Population limit: 11750

1
Expert's answer
2022-03-19T19:25:30-0400
df = pd.read_csv('country.json')
df[df['population] > 11750]['', 'lon']

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS