sul-dlss-deprecated / rialto-webapp

The web front end of the RIALTO project
4 stars 0 forks source link

Italy does not seem to be represented on the chloropleth even when data exists #246

Closed peetucket closed 5 years ago

peetucket commented 5 years ago

Select co-authors by country report, for all of Stanford. There 1077 entries for Italy but not shown on the map. Tried filtering by school, had some result (no italy). screen shot 2018-11-20 at 3 02 09 pm screen shot 2018-11-20 at 3 02 20 pm

justinlittman commented 5 years ago

Add the end of the day, Plotly depends on this regex to match names for Italy, which "Repubblica Italiana" does not match.

peetucket commented 5 years ago

Maybe we need to make a PR for them to ITA: 'italy|italia', ?

peetucket commented 5 years ago

Looks like that project hasn't been touched in a couple years

justinlittman commented 5 years ago

And then it needs to get upstream to Plotly. Plus, could also be a problem for other countries.

justinlittman commented 5 years ago

Geonames dataset provides ISO-2 country codes; Plotly requires ISO-3 country codes.

Sigh.

justinlittman commented 5 years ago

Rather than using the country label from countries.tsv, could possibly use primary English name from alternatenames.txt:

DN0a233536:alternateNamesV2 jlittman$ grep "3175395\ten" alternateNamesV2.txt 
1350609 3175395 en  Republic of Italy                       
1563645 3175395 en  Italy   1                   
4664748 3175395 en  Italian Republic                        
DN0a233536:alternateNamesV2 jlittman$ grep "1655842\ten" alternateNamesV2.txt 
1562505 1655842 en  Laos    1   1               
3981456 1655842 en  Lao People’s Democratic Republic                        
8103218 1655842 en  Lao         1           
9410786 1655842 en  Lao PDR         1   
The table 'alternate names' :
-----------------------------
alternateNameId   : the id of this alternate name, int
geonameid         : geonameId referring to id in table 'geoname', int
isolanguage       : iso 639 language code 2- or 3-characters; 4-characters 'post' for postal codes and 'iata','icao' and faac for airport codes, fr_1793 for French Revolution names,  abbr for abbreviation, link to a website (mostly to wikipedia), wkdt for the wikidataid, varchar(7)
alternate name    : alternate name or name variant, varchar(400)
isPreferredName   : '1', if this alternate name is an official/preferred name
isShortName       : '1', if this is a short name like 'California' for 'State of California'
isColloquial      : '1', if this alternate name is a colloquial or slang term. Example: 'Big Apple' for 'New York'.
isHistoric        : '1', if this alternate name is historic and was used in the past. Example 'Bombay' for 'Mumbai'.
from          : from period when the name was used
to        : to period when the name was used
peetucket commented 5 years ago

If the primary English name equivalents are consistently there, that would be a nicer view for the table as well.

From: Coveralls notifications@github.com Reply-To: sul-dlss/rialto-webapp reply@reply.github.com Date: Wednesday, November 21, 2018 at 11:51 AM To: sul-dlss/rialto-webapp rialto-webapp@noreply.github.com Cc: Peter Alexander Mangiafico pmangiafico@stanford.edu, Author author@noreply.github.com Subject: Re: [sul-dlss/rialto-webapp] Italy does not seem to be represented on the chloropleth even when data exists (#246)

Rather than using the country label from countries.tsv, could possibly use primary English name from alternatenames.txt:

DN0a233536:alternateNamesV2 jlittman$ grep "3175395\ten" alternateNamesV2.txt

1350609 3175395 en Republic of Italy

1563645 3175395 en Italy 1

4664748 3175395 en Italian Republic

DN0a233536:alternateNamesV2 jlittman$ grep "1655842\ten" alternateNamesV2.txt

1562505 1655842 en Laos 1 1

3981456 1655842 en Lao People’s Democratic Republic

8103218 1655842 en Lao 1

9410786 1655842 en Lao PDR 1

The table 'alternate names' :


alternateNameId : the id of this alternate name, int

geonameid : geonameId referring to id in table 'geoname', int

isolanguage : iso 639 language code 2- or 3-characters; 4-characters 'post' for postal codes and 'iata','icao' and faac for airport codes, fr_1793 for French Revolution names, abbr for abbreviation, link to a website (mostly to wikipedia), wkdt for the wikidataid, varchar(7)

alternate name : alternate name or name variant, varchar(400)

isPreferredName : '1', if this alternate name is an official/preferred name

isShortName : '1', if this is a short name like 'California' for 'State of California'

isColloquial : '1', if this alternate name is a colloquial or slang term. Example: 'Big Apple' for 'New York'.

isHistoric : '1', if this alternate name is historic and was used in the past. Example 'Bombay' for 'Mumbai'.

from : from period when the name was used

to : to period when the name was used

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sul-dlss/rialto-webapp/issues/246#issuecomment-440789517, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAC4IaSi3FXGKFaq3jYJ9HKoVCvQ8m3Pks5uxa6ogaJpZM4YsFj8.