Closed aco46 closed 7 years ago
Added a script here https://github.com/solgenomics/sgn/blob/topic/location_latlong_addition/bin/find_longitude_latitude.pl
Using it like:
perl find_longitude_latitude.pl -I https://cassavabase.org/brapi/v1/locations -O outfile.csv
produces this file:
OriginalName Longitude Latitude Country CountryCode
Ibadan 3.9470396 7.3775355 Nigeria NG
Jos 8.8583309 9.8965273 Nigeria NG
Ubiaja 6.3917654 6.6493305 Nigeria NG
Zaria 7.7199454 11.0855409 Nigeria NG
Mmdori -84.7763026 43.6045993 United States US
Mokwa 5.3102505 9.2394244 Nigeria NG
Onne 7.035316 4.744334 Nigeria NG
Cornell Biotech -76.4782923 42.4464096 United States US
unspecified -119.7417825 39.5369122 United States US
Umudike 7.5436801 5.4800614 Nigeria NG
TEST -122.6770504 45.512101 United States US
ONNE 7.035316 4.744334 Nigeria NG
Igbariam 6.9450688 6.3901861 Nigeria NG
Otobi 90.400763 23.8611325 Bangladesh BD
NaCRRI, Central Uganda 32.6123464 0.5287954 Uganda UG
Kano 8.5919561 12.0021794 Nigeria NG
Naliendele 40.1682033 -10.3539407 Tanzania TZ
Bwanga 31.7594384 -3.0332046 Tanzania TZ
Chambezi 38.9166669 -6.516667 Tanzania TZ
Kibaha 38.9928898 -6.7813218 Tanzania TZ
kasese 30.078078 0.1698986 Uganda UG
ngetta 32.9330457 2.2857621 Uganda UG
Ngetta 32.9330457 2.2857621 Uganda UG
CIAT -117.198316 33.145709 United States US
Dewein -98.523254 29.6008374 United States US
Gbarpolu -10.0807298 7.4952637 Liberia LR
Margibi -10.3048897 6.5151875 Liberia LR
Senjeh -10.8677256 6.8612707 Liberia LR
Suakoko -9.5896043 7.1222656 Liberia LR
Ikenne 3.7105118 6.8717415 Nigeria NG
Ilorin 4.5418141 8.4798786 Nigeria NG
Warri 5.7932008 5.5543995 Nigeria NG
Abuja 7.398574 9.0764785 Nigeria NG
Pajau. Brasil, Brazil -72.2314105 -7.2209841 Brazil BR
Cruz Das Almas. Bahia, Brazil -39.1016848 -12.6735557 Brazil BR
Popayan. Cauca, Colombia -76.6147395 2.4448143 Colombia CO
Carimagua. Meta, Colombia -71.3359316 4.566687 Colombia CO
Media Luna. Magdalena, Colombia -74.503856 10.512516 Colombia CO
CIAT. Valle, Colombia -76.355046 3.50259 Colombia CO
Valledupar. Cesar, Colombia -73.2436335 10.4742449 Colombia CO
El Carmen. Bolivar, Colombia -75.115733 9.721064 Colombia CO
Florencia. Caqueta, Colombia -75.6042364 1.6153858 Colombia CO
La Libertad. Meta, Colombia -73.46283 4.06142 Colombia CO
Fonseca. Guajira, Colombia -72.851515 10.886123 Colombia CO
Mondomo. Cauca, Colombia -76.550012 2.892025 Colombia CO
Cajibio. Cauca, Colombia -76.571608 2.621916 Colombia CO
Aremasain. Guajira, Colombia -72.69873 11.49867 Colombia CO
Granada. Meta, Colombia -73.705281 3.544831 Colombia CO
Santo Tomas. Atlantico, Colombia -74.756499 10.763286 Colombia CO
San Martin. Meta, Colombia -73.697308 3.698492 Colombia CO
Matazul. Meta, Colombia -72.65113 4.17257 Colombia CO
Caracoli. Atlantico, Colombia -74.838879 10.8593 Colombia CO
Repelon. Atlantico, Colombia -75.123706 10.494762 Colombia CO
Betulia. Sucre, Colombia -75.242577 9.273658 Colombia CO
Pescador. Cauca, Colombia -76.55359 2.80091 Colombia CO
El Overo. Valle, Colombia -76.13109 4.24549 Colombia CO
S. de Quilichao. Cauca, Colombia -76.484533 3.01228 Colombia CO
Sahagun. Cordoba, Colombia -75.446001 8.950643 Colombia CO
Montenegro. Quindio, Colombia -75.75012 4.566637 Colombia CO
Chinu. Cordoba, Colombia -75.401527 9.105964 Colombia CO
Cerete. Cordoba, Colombia -75.789633 8.888785 Colombia CO
Morales. Cauca, Colombia -76.628114 2.753912 Colombia CO
Armenia. Quindio, Colombia -75.6756888 4.5350004 Colombia CO
Luruaco. Atlantico, Colombia -75.142287 10.60959 Colombia CO
Darien. Valle, Colombia -76.487201 3.931322 Colombia CO
Pitalito. Atlantico, Colombia -74.85002 10.81664 Colombia CO
Molineros. Atlantico, Colombia -75.05001 10.6666899 Colombia CO
Doncello. Caqueta, Colombia -75.2833349 1.680042 Colombia CO
Cienaga De Oro. Cordoba, Colombia -75.621332 8.879215 Colombia CO
Restrepo. Meta, Colombia -73.562567 4.263082 Colombia CO
Aguazul. Casanare, Colombia -72.550819 5.170847 Colombia CO
Patia. Cauca, Colombia -77.053095 2.069301 Colombia CO
Vijes. Valle, Colombia -76.443177 3.698185 Colombia CO
Jamundi. Valle, Colombia -76.541073 3.262084 Colombia CO
El Espinal. Tolima, Colombia -74.884341 4.149819 Colombia CO
Buga. Valle, Colombia -76.3021889 3.9005079 Colombia CO
Cumaral. Meta, Colombia -73.488052 4.271262 Colombia CO
Cabuyaro. Meta, Colombia -72.7923129 4.284528 Colombia CO
Barranca De Upia. Casanare, Colombia -72.966577 4.567588 Colombia CO
Puerto Lopez. Meta, Colombia -72.955918 4.091354 Colombia CO
Baranoa. Atlantico, Colombia -74.915036 10.796589 Colombia CO
Mutata. Antioquia, Colombia -76.436567 7.244106 Colombia CO
Carepa. Antioquia, Colombia -76.6554309 7.755354 Colombia CO
Necocli. Antioquia, Colombia -76.787678 8.427174 Colombia CO
La Union. Sucre, Colombia -75.281155 8.853929 Colombia CO
Corozal. Sucre, Colombia -75.294467 9.321697 Colombia CO
Caloto. Cauca, Colombia -76.408081 3.033544 Colombia CO
La Dolores. Valle, Colombia -76.4779977 3.4982459 Colombia CO
Puerto Caicedo. Putumayo, Colombia -76.604072 0.684374 Colombia CO
Puerto Asis. Putumayo, Colombia -76.500191 0.504929 Colombia CO
La Hormiga. Putumayo, Colombia -76.904997 0.423385 Colombia CO
Villa Garzon. Putumayo, Colombia -76.617431 1.028507 Colombia CO
Orito. Putumayo, Colombia -76.880163 0.67688 Colombia CO
Cienaga. Magdalena, Colombia -74.248926 11.007984 Colombia CO
Rio Frio. Magdalena, Colombia -74.16664 10.91663 Colombia CO
Barranquilla. Atlantico, Colombia -74.8069813 11.0041072 Colombia CO
San Vicente. Santander, Colombia -73.413233 6.878518 Colombia CO
Valencia. Cordoba, Colombia -76.147936 8.2567869 Colombia CO
Barrancabermeja. Santander, Colombia -73.8519319 7.0617085 Colombia CO
Palmaseca. Valle, Colombia -76.434022 3.511354 Colombia CO
Pend. , Colombia -74.053042 4.6619765 Colombia CO
Tamalameque. Cesar, Colombia -73.810756 8.861748 Colombia CO
Candelaria. Valle, Colombia -76.348857 3.414112 Colombia CO
Sabanalarga. Atlantico, Colombia -74.920163 10.632409 Colombia CO
Armero. Tolima, Colombia -74.90489 4.96462 Colombia CO
Yopal. Casanare, Colombia -72.400523 5.348903 Colombia CO
Tauramena. Casanare, Colombia -72.750495 5.0106849 Colombia CO
Malambo. Atlantico, Colombia -74.7746834 10.8575824 Colombia CO
Costa -81.0922603 29.2079654 United States US
Llanos -101.4566299 39.4758692 United States US
Caribia. Magdalena, Colombia
Laberinto. Sucre, Colombia -75.49994 9.8666699 Colombia CO
Albania. Sucre, Colombia -75.228309 9.239005 Colombia CO
Montanita. Sucre, Colombia -75.3999457 9.2991914 Colombia CO
Carranzo. Cordoba, Colombia -75.4142015 9.0964409 Colombia CO
Pivijay. Magdalena, Colombia -74.614654 10.461181 Colombia CO
Quilcace. Cauca, Colombia -76.83332 2.33331 Colombia CO
Puerto Gaitan. Meta, Colombia -72.083573 4.312977 Colombia CO
Santa Cruz. Atlantico, Colombia -75.2133489 10.572819 Colombia CO
Acacias. Meta, Colombia -73.766129 3.991663 Colombia CO
El Salado. Cordoba, Colombia -75.58716 8.92528 Colombia CO
El Olivo. Cordoba, Colombia -75.46663 8.71954 Colombia CO
Momil. Cordoba, Colombia -75.6767349 9.239504 Colombia CO
Apiay. Meta, Colombia -73.56643 4.08468 Colombia CO
Kiggumba 32.0127067 1.8128226 Uganda UG
Kamuli 33.126717 0.944785 Uganda UG
Kasese 30.078078 0.1698986 Uganda UG
Lira -121.8677485 39.1451698 United States US
Arua 30.907304 3.0303299 Uganda UG
Paliisa
Mityana 32.043969 0.4016398 Uganda UG
Namulonge 32.63 0.5141667 Uganda UG
Kaberamaido 33.213851 1.6963322 Uganda UG
Serere 33.5490078 1.4994033 Uganda UG
Baka 16.8453869 46.7319345 Hungary HU
Chilimba 35.383333 -15.35 Malawi MW
Mkondezi 30.409835 -29.6481614 South Africa ZA
Chitala 29.866667 -14.266667 Zambia ZM
Chitedze 33.6371591 -13.9815026 Malawi MW
Kasinthuka
Mogincual 40.1452734 -15.6605401 Mozambique MZ
Mogovolas 39.2375507 -15.7799992 Mozambique MZ
Muriaze
Mutekelezi
Umbeluzi 31.0954154 -26.1462217 Swaziland SZ
Inharrime 35.0250484 -24.4733653 Mozambique MZ
Mtwapa 39.7497984 -3.9385695 Kenya KE
Kakamega 34.7518631 0.2827307 Kenya KE
Embu 37.4596409 -0.5388381 Kenya KE
Alupe 34.1335177 0.4961814 UG
Msambweni 39.481266 -4.4652898 Kenya KE
Siaya 34.2747004 -0.0998238 Kenya KE
Suluti 36.133333 -10.583333 Tanzania TZ
Hombolo 35.94548 -5.892951 Tanzania TZ
Bunda 7.2712674 53.1850881 Germany DE
Kizimbani 39.31778 -9.062239 Tanzania TZ
Kazilamuyaga
Wakiso 32.4792744 0.3987229 Uganda UG
Rakai 31.4084731 -0.709917 Uganda UG
Mbarara 30.6545022 -0.6071596 Uganda UG
Bundibugyo 30.0636349 0.707531 Uganda UG
Zombo 35.3356518 -15.3765857 Malawi MW
Mubende 31.3884671 0.5539013 Uganda UG
Michikichini 39.2615754 -6.8208252 Tanzania TZ
Bambi -122.1758284 37.4271509 United States US
Kama -87.869395 41.815559 United States US
Mahonda 39.2401484 -6.0084272 Tanzania TZ
Haji_Zanzibar 67.0202486 24.8599654 Pakistan PK
Mbuni -57.3051757 -25.1802116 Paraguay PY
test -122.6770504 45.512101 United States US
Kibos 34.8168791 -0.0699392 Kenya KE
Msabaha 40.05 -3.266667 Kenya KE
Maruku 135.503263 34.674454 Japan JP
Ukiriguru 33.0186877 -2.7266963 Tanzania TZ
Chato 2.160098 48.896391 France FR
Chokwe 32.9831998 -24.5323166 Mozambique MZ
Nhacoongo 105.823113 21.0303844 Vietnam VN
Mocuba 36.9648534 -16.8402212 Mozambique MZ
Liupo 39.9427233 -15.6064543 Mozambique MZ
Nametil 39.3361881 -15.7153919 Mozambique MZ
Nebbi 31.0851019 2.4778169 Uganda UG
Santo Tomas. Atlantico, Colombia -74.756499 10.763286 Colombia CO
Palmar de Varela. Atlantico, Colombia -74.755272 10.74044 Colombia CO
Pitalito. Atlantico, Colombia -74.85002 10.81664 Colombia CO
Sabanalarga. Atlantico, Colombia -74.920163 10.632409 Colombia CO
La Union. Sucre, Colombia -75.281155 8.853929 Colombia CO
Sampues. Sucre, Colombia -75.381105 9.18357 Colombia CO
Corozal. Sucre, Colombia -75.294467 9.321697 Colombia CO
Monteria (UNICORDOBA). Cordoba, Colombia -75.8603864 8.7905063 Colombia CO
La Libertad. Meta, Colombia -73.46283 4.06142 Colombia CO
CIAT. Valle, Colombia -76.355046 3.50259 Colombia CO
@nmenda should we curate these lat/long/country info before saving it into db?
this is definitely useful . . . and any location coordinates that are off could be fixed easily after loading them - that option and many other additions will be ready to merge soon from topic/manage_locations branch
For the country code, doesn't BrAPI use the ISO three letter coutnry codes though? I've been working based off the example that has "countryCode": "NGA", "countryName": "Nigeria
right BrAPI expects 3 letter contry code, but the googleapi e.g. https://maps.googleapis.com/maps/api/geocode/json?address=boyce+thompson+institute
returns a 2 letter country shorthand.
ran script on cassava databases
Needed for Breeding API app implementation.