Locations aren't necessarily of the form:
"city, state ZIP"/"city, state"
They could merely be "state" (where state is given completely, not just as an abbreviation), or "Remote" or some other phrase. What must be done is to parse the "location" term, and come up with a procedure to determine its parts.
I believe the best course is to gsub() the string first, then check the remainder(s) against pre-made lists of cities/states.
Locations aren't necessarily of the form: "city, state ZIP"/"city, state" They could merely be "state" (where state is given completely, not just as an abbreviation), or "Remote" or some other phrase. What must be done is to parse the "location" term, and come up with a procedure to determine its parts. I believe the best course is to gsub() the string first, then check the remainder(s) against pre-made lists of cities/states.