dss-hmi / suicide-prevention-2019

Projects evaluates change in suicide morbidity and mortality rates among youth (10-24) in relationship to the GLS suicide prevention program in selected Florida counties.
GNU General Public License v2.0
0 stars 1 forks source link

Separate county name and zipcode #3

Closed andkov closed 5 years ago

andkov commented 5 years ago

in #2, (./manipulation/0-greeter-gls.R) lines 135-136 https://github.com/dss-hmi/suicide-prevention-2019/blob/5879571bed189728c06c1fd52c062785a9ae17fe/manipulation/0-greeter-gls.R#L135 we start splitting the column county_zipcode into two separate columns.

image as you can see, regular expression governing this task need to be more flexible to accommodate variety of county spellings. image

@Jodh , develop the regexes in this section of the code to properly parse county_zipcode into two separate columns.

Jodh commented 5 years ago

Testing this regex successfully extracts the name part for all three cases:

  1. Longname/12334
  2. Long. name/1234
  3. Long name/1234
andkov commented 5 years ago

Sorry, @Jodh , I think I have solved this first. We have to use this regex in order to capture some non-digits in the zipcode.