Metropolitan-Council / travel-study-stories

Travel Behavior Inventory analysis and interactive visualization
https://metrotransitmn.shinyapps.io/travel-survey-explorer/
GNU General Public License v3.0
2 stars 0 forks source link

non-ASCII strings #38

Open eroten opened 2 years ago

eroten commented 2 years ago

Low-priority issue, but it would be nice if we could remove/replace non-ASCII characters

See potential solution https://stackoverflow.com/a/37254905

ashleyasmus commented 2 years ago

you bet, where are you seeing these?

eroten commented 2 years ago

I'm getting a whole slew of warnings when I check the package. I believe its the open response entries in tbi_tables

ashleyasmus commented 2 years ago

got it. if the error messages are still handy to you, can you paste them in? And, are you using 2021 data now, or still only 2019?

eroten commented 2 years ago

2019 only. This is what I get when I run an R CMD CHECK

Warning: found non-ASCII strings
     'How often do you use a smartphone-app ride service (e.g.<c2><a0>Lyft, Uber)?' in object 'input_question_list'
     'How often do you use a smartphone-app ride service (e.g.<c2><a0>Lyft, Uber)?' in object 'tbi_dict'
     'Didn<e2><80><99>t need to go anywhere' in object 'tbi_tables'
     'Elderly and doesn<e2><80><99>t drive and no appointments' in object 'tbi_tables'
     'Didn<e2><80><99>t need to' in object 'tbi_tables'
     'Didn<e2><80><99>t need to leave home' in object 'tbi_tables'
     'CJN was home with JLN because it was JLN<e2><80><99>s day off.' in object 'tbi_tables'
     'He<e2><80><99>s a baby' in object 'tbi_tables'
     'I<e2><80><99>m elderly. Because of snowy conditions I didn<e2><80><99>t go out.' in object 'tbi_tables'
     'Walked to bus stop ro go to son<e2><80><99>s school' in object 'tbi_tables'
     'Going to son<e2><80><99>s school' in object 'tbi_tables'
     'Went to another family member<e2><80><99>s for dinner.' in object 'tbi_tables'
     'Pick up daughter<e2><80><99>s friend for trip to mall' in object 'tbi_tables'
     'Went to candy store to order Christmas gift to send to daughter<e2><80><99>s family in Texas' in object 'tbi_tables'
     'Drove to friend<e2><80><99>s house' in object 'tbi_tables'
     'Daughter<e2><80><99>s violin lesson' in object 'tbi_tables'
     'A<e2><80><99>s youth ballet class' in object 'tbi_tables'
     'Stopped at friend<e2><80><99>s place to pick up his son to take him to Hudson.' in object 'tbi_tables'
     'Went to check progress of construction of sister<e2><80><99>s new home.' in object 'tbi_tables'
     'Returned to sister<e2><80><99>s house' in object 'tbi_tables'
     'Boyfriend<e2><80><99>s holiday work party and networking' in object 'tbi_tables'
ashleyasmus commented 2 years ago

Thank you!!! ok I see right away that we need to get rid of d_purpose_other

ashleyasmus commented 2 years ago

also lol Boyfriend<80><99>s holiday work party and networking

ashleyasmus commented 2 years ago

Liz: can you bring over tbi19 object from metc.tbi.helper and use that instead? (Edited to add: I will make a branch to do this exact thing)

eroten commented 2 years ago

Are you referring to https://github.com/Metropolitan-Council/metc.tbi.helper/blob/main/data/tbi_tables.rda?

ashleyasmus commented 2 years ago

lol no because i hadn't pushed my commits yet! really winning today: https://github.com/Metropolitan-Council/metc.tbi.helper/blob/main/data/tbi19.rda

eroten commented 2 years ago

Does this follow the same formatting as tbi_tables? Like, can I just do usethis::use_data_raw(tbi19)?

ashleyasmus commented 2 years ago

yes! but also note: the dictionary is in the object too, so you might need to replace calls to tbi_dict with tbi19$dictionary

ashleyasmus commented 2 years ago

I believe this is now fixed with [ab3cbc7] over at metc.tbi.helper (https://github.com/Metropolitan-Council/metc.tbi.helper/commit/ab3cbc73cdc6f31c86a942d3c86169429a7d1c5f)