rfcx / arbimon

Ecoacoustic analysis platform empowering conservationists to analyze acoustic data and to derive insights about the ecosystem at scale
https://arbimon.org
Apache License 2.0
5 stars 1 forks source link

Check country code in the projects #1589

Closed koonchaya closed 8 months ago

koonchaya commented 8 months ago

Original post: https://rfcx.slack.com/archives/C04R9TT711U/p1708619004510669?thread_ts=1708615967.208109&cid=C04R9TT711U

Project: https://arbimon.org/p/costa-rica-macaws-audiomoth/dashboard

“Costa Rica Macaws” has one site at (10.9637191,-84.4020265) that is incorrectly marked as being in Nicaragua. So one ticket is why is the country code wrong?

Extra context, I’m looking in the Arbimon sites table: select site_id, name, lat, lon, country_code from sites where project_id = 4897;

There should not be any NI or null values.

rassokhina-e commented 8 months ago

“Costa Rica Macaws” has one site at (10.9637191,-84.4020265) that is incorrectly marked as being in Nicaragua. So one ticket is why is the country code wrong?

It looks like the library is not accurate enough Similar problem to the timezone library not being accurate

Extra context, I’m looking in the Arbimon sites table: select site_id, name, lat, lon, country_code from sites where project_id = 4897;

There should not be any NI or null values.

Fixed.

koonchaya commented 8 months ago

@rassokhina-e How did you fix this? How can I check it?

rassokhina-e commented 8 months ago

I fixed it manually in both dbs, you can check it in the project countries, try to find it in the project directory

naluinui commented 8 months ago

@rassokhina-e can you also manual fix the country code for these 2 sites please?

select * from location_site ls where ls.location_project_id = 1134760 AND country_code = 'RS'

Image https://rfcx.slack.com/archives/C04R9TT711U/p1708970527240689?thread_ts=1708615967.208109&cid=C04R9TT711U

rassokhina-e commented 8 months ago

fixed

koonchaya commented 8 months ago

After fix the country, this project should only show 1 country which is Croatia? I still see Serbia on the directory.

Screenshot 2567-02-27 at 18 16 51
naluinui commented 8 months ago
Screenshot 2567-02-27 at 12 55 28

https://arbimon.org/api/projects/1134760/profile?fields=metrics,richnessByTaxon,readme,keyResults,countryCodes

I just check that it has been updated on the database, and it return correctly elsewhere (in project profile).

I think we might be facing another sync problem on opensearch. FYI @grindarius.

koonchaya commented 8 months ago

Can we mark this as done and close it or wait until the country gets updated?

naluinui commented 8 months ago

This can be marked done. FYI the countries on project directory will be update once per day

Screenshot 2567-02-28 at 08 53 43