AmphibiaWeb / amphibian-disease-tracker

Amphibian Disease Tracker Portal
GNU General Public License v3.0
6 stars 0 forks source link

validate country names in fims #294

Closed jdeck88 closed 4 years ago

jdeck88 commented 6 years ago

country names should be validated by FIMS. I propose that we use the GeOMe list of country names (which is based also on Biocode and DIPNet and i think we got from CIA Factbook-- not sure about this though). In any case, these all match except for the following changes:

amphibian disease -> geome name if different United States -> USA République du Congo -> Democratic Republic of the Congo  Vietnam -> Viet Nam

I would suggest, if we use the Geome list to update the above country names in the AD portal. Just let me know that is cool.

Also, while we're at it, do we want to require a country name be entered to pass the fims validation? And, as a separate rule, validate that the country name MUST be in the list (assume yes!) ?

For reference, here are the country names in the Geome list: "Afghanistan" "Albania" "Algeria" "American Samoa" "Andorra" "Angola" "Anguilla" "Antarctica" "Antigua and Barbuda" "Arctic Ocean" "Argentina" "Armenia" "Aruba" "Ashmore and Cartier Islands" "Atlantic Ocean" "Australia" "Austria" "Azerbaijan" "Bahamas" "Bahrain" "Baltic Sea" "Baker Island" "Bangladesh" "Barbados" "Bassas da India" "Belarus" "Belgium" "Belize" "Benin" "Bermuda" "Bhutan" "Bolivia" "Borneo" "Bosnia and Herzegovina" "Botswana" "Bouvet Island" "Brazil" "British Virgin Islands" "Brunei" "Bulgaria" "Burkina Faso" "Burundi" "Cambodia" "Cameroon" "Canada" "Cape Verde" "Cayman Islands" "Central African Republic" "Chad" "Chile" "China" "Christmas Island" "Clipperton Island" "Cocos Islands" "Colombia" "Comoros" "Cook Islands" "Coral Sea Islands" "Costa Rica" "Cote d'Ivoire" "Croatia" "Cuba" "Curacao" "Cyprus" "Czech Republic" "Democratic Republic of the Congo" "Denmark" "Djibouti" "Dominica" "Dominican Republic" "East Timor" "Ecuador" "Egypt" "El Salvador" "Equatorial Guinea" "Eritrea" "Estonia" "Ethiopia" "Europa Island" "Falkland Islands (Islas Malvinas)" "Faroe Islands" "Fiji" "Finland" "France" "French Guiana" "French Polynesia" "French Southern and Antarctic Lands" "Gabon" "Gambia" "Gaza Strip" "Georgia" "Germany" "Ghana" "Gibraltar" "Glorioso Islands" "Greece" "Greenland" "Grenada" "Guadeloupe" "Guam" "Guatemala" "Guernsey" "Guinea" "Guinea-Bissau" "Guyana" "Haiti" "Heard Island and McDonald Islands" "Honduras" "Hong Kong" "Howland Island" "Hungary" "Iceland" "India" "Indian Ocean" "Indonesia" "Iran" "Iraq" "Ireland" "Isle of Man" "Israel" "Italy" "Jamaica" "Jan Mayen" "Japan" "Jarvis Island" "Jersey" "Johnston Atoll" "Jordan" "Juan de Nova Island" "Kazakhstan" "Kenya" "Kerguelen Archipelago" "Kingman Reef" "Kiribati" "Kosovo" "Kuwait" "Kyrgyzstan" "Laos" "Latvia" "Lebanon" "Lesotho" "Liberia" "Libya" "Liechtenstein" "Line Islands" "Lithuania" "Luxembourg" "Macau" "Macedonia" "Madagascar" "Malawi" "Malaysia" "Maldives" "Mali" "Malta" "Marshall Islands" "Martinique" "Mauritania" "Mauritius" "Mayotte" "Mediterranean Sea" "Mexico" "Micronesia" "Midway Islands" "Moldova" "Monaco" "Mongolia" "Montenegro" "Montserrat" "Morocco" "Mozambique" "Myanmar" "Namibia" "Nauru" "Navassa Island" "Nepal" "Netherlands" "New Caledonia" "New Zealand" "Nicaragua" "Niger" "Nigeria" "Niue" "Norfolk Island" "North Korea" "North Sea" "Northern Mariana Islands" "Norway" "Oman" "Pacific Ocean" "Pakistan" "Palau" "Palmyra Atoll" "Panama" "Papua New Guinea" "Paracel Islands" "Paraguay" "Peru" "Philippines" "Pitcairn Islands" "Poland" "Portugal" "Puerto Rico" "Qatar" "Republic of the Congo" "Reunion" "Romania" "Ross Sea" "Russia" "Rwanda" "Saint Helena" "Saint Kitts and Nevis" "Saint Lucia" "Saint Pierre and Miquelon" "Saint Vincent and the Grenadines" "Samoa" "San Marino" "Sao Tome and Principe" "Saudi Arabia" "Senegal" "Serbia" "Seychelles" "Sierra Leone" "Singapore" "Sint Maarten" "Slovakia" "Slovenia" "Solomon Islands" "Somalia" "South Africa" "South Georgia and the South Sandwich Islands" "South Korea" "South Sudan" "Southern Ocean" "Spain" "Spratly Islands" "Sri Lanka" "State of Palestine" "Sudan" "Suriname" "Svalbard" "Swaziland" "Sweden" "Switzerland" "Syria" "Taiwan" "Tajikistan" "Tanzania" "Tasman Sea" "Thailand" "Togo" "Tokelau" "Tonga" "Trinidad and Tobago" "Tromelin Island" "Tunisia" "Turkey" "Turkmenistan" "Turks and Caicos Islands" "Tuvalu" "USA" "Uganda" "Ukraine" "United Arab Emirates" "United Kingdom" "Uruguay" "Uzbekistan" "Vanuatu" "Venezuela" "Viet Nam" "Virgin Islands" "Wake Island" "Wallis and Futuna" "West Bank" "Western Sahara" "Yemen" "Zambia" "Zimbabwe"

mkoo commented 6 years ago

I like the fims validation rule to follow Geome AND require it. Can be added to the value list in the template, yes? Do the other templates using FIMS do that? and require country?

jdeck88 commented 6 years ago

Yes, this will be added to the value list in template.
All other FIMS installations at least require the country name to match a value in the list. They don't all, however, require a country to be provided... some do some don't. I'd suggest requiring it for submission... pretty easy to know the country.

tigerhawkvok commented 6 years ago

Since I was poking around here anyway ....

When the records are being copied to the flat records_list table, they are reverse geocoded to fetch the country.

If the three renames are the only strange ones, those entries can be added to the $synonymizeNames array for the flat records. A little more work would need to be done to hook that up to the Carto store or the project summary, as the records processor is done after both of those.

mkoo commented 4 years ago

ok we will be using the geome ISO/NCBI admin names which also includes oceans for validation. Closing since this is part of migration