Poling, William
2020-May-12 16:10 UTC
[R] Help with Kmeans output and using broom to tidy etc..
Hello Eric, thank you so much for your consideration. Here are snippets of data that I hope will be helpful WHP geo1a <- geo1[, c(2:5)] <-- eliminating ID which is not useful for my purposes anyway #This is for R-Help use geo1a <- geo1a %>% top_n(25) state city latitude longitude 1 ME FAIRFIELD 44.64485 -69.65948 2 ME JONESPORT 44.57935 -67.56743 3 ME CASWELL 46.97529 -67.83023 4 ME ELLSWORTH 44.52916 -68.38717 5 ME VASSALBORO 44.45095 -69.60629 6 ME UNION 44.20059 -69.26123 7 ME PALERMO 44.45142 -69.41115 8 ME ORONO 44.87426 -68.68327 9 ME SANGERVILLE 45.10138 -69.33580 10 ME ISLESBORO 44.29015 -68.90812 11 ME TOPSHAM 43.93600 -69.96565 12 ME FREEPORT 43.84089 -70.11160 13 ME SKOWHEGAN 44.76687 -69.71644 14 ME MILLINOCKET 45.65501 -68.70261 15 ME ORRINGTON 44.72417 -68.74026 16 ME ST. GEORGE 43.96726 -69.20827 17 ME FORT FAIRFIELD 46.80911 -67.88079 18 ME MARS HILL 46.56580 -67.89006 19 ME FREEPORT 43.85302 -70.03726 20 ME EASTON 46.64143 -67.91203 21 ME WATERVILLE 44.53621 -69.65913 22 ME BRUNSWICK 43.87771 -69.96297 23 ME BRUNSWICK 43.91719 -69.89905 24 ME BUCKSPORT 44.60665 -68.81892 25 ME FAYETTE 44.46380 -70.12047 trnd1_tbla <- trnd1_tbl %>% top_n(25) print(trnd1_tbla) head(trnd1_tbla,n=25) A tibble: 25 x 5 city state Basecountsum Basecount2 prop_of_total <fct> <fct> <dbl> <dbl> <dbl> 1 ATLANTA GA 2352 12 0.00510 2 BRADENTON FL 2352 8 0.00340 3 BROOKLYN NY 2352 30 0.0128 4 CHARLOTTE NC 2352 8 0.00340 5 CHICAGO IL 2352 17 0.00723 6 COLUMBUS OH 2352 11 0.00468 7 CUMMING GA 2352 8 0.00340 8 DALLAS TX 2352 8 0.00340 9 ERIE PA 2352 12 0.00510 10 HOUSTON TX 2352 12 0.00510 # ... with 15 more rows WHP From: Eric Berger <ericjberger at gmail.com> Sent: Tuesday, May 12, 2020 8:39 AM To: Poling, William <PolingW at aetna.com> Cc: r-help at r-project.org Subject: [EXTERNAL] Re: [R] Help with Kmeans output and using broom to tidy etc.. **** External Email - Use Caution **** Can you create a reproducible example?? Your question involves objects that are unknown to us. (geo1, trnd1_tbl) On Tue, May 12, 2020 at 2:41 PM Poling, William via R-help <mailto:r-help at r-project.org> wrote: #RStudio Version Version 1.2.1335 need this one--> 1.2.5019 sessionInfo() # R version 4.0.0 Patched (2020-05-03 r78349) #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows 10 x64 (build 17763) Hello: I have data that I am trying to manipulate for Kmeans clustering. Original data looks like this str(geo1) # 'data.frame': 2352 obs. of? 5 variables: # $ ID: Factor w/ 2352 levels "101040199600",..: 590 908 976 509 1674 690 1336 86 726 1702 ... # $ state? ? ? ? ? ?: Factor w/ 41 levels "AL","AR","AZ",..: 32 10 25 11 9 32 13 31 12 12 ... # $ city? ? ? ? ? ? : Factor w/ 1337 levels "ABBOTTSTOWN",..: 932 156 230 698 965 1330 515 727 1127 1304 ... # $ latitude? ? ? ? : num? 40.4 31.2 40.8 42.1 26.8 ... # $ longitude? ? ? ?: num? -79.9 -81.5 -74 -91.6 -82.1 ... I created a subset adding column prop_of_total str(trnd1_tbl) tibble [1,457 x 5] (S3: tbl_df/tbl/data.frame) ?$ city? ? ? ? ?: Factor w/ 1337 levels "ABBOTTSTOWN",..: 1 2 3 4 5 6 7 8 9 10 ... ?$ state? ? ? ? : Factor w/ 41 levels "AL","AR","AZ",..: 32 36 10 28 12 36 10 11 26 38 ... ?$ Basecountsum : num [1:1457] 2352 2352 2352 2352 2352 ... ?$ Basecount2? ?: num [1:1457] 1 1 1 1 1 2 1 1 2 1 ... ?$ prop_of_total: num [1:1457] 0.000425 0.000425 0.000425 0.000425 0.000425 ... Then I spread it trnd2_tbl <- trnd1_tbl %>% ? ? dplyr::select(city, state, prop_of_total) %>% ? ? spread(key = city, value = prop_of_total, fill = 0) #remove the NA's with fill str(trnd2_tbl)#tibble [41 x 1,338] (S3: tbl_df/tbl/data.frame) Then I run a Kmeans kmeans_obj1 <- trnd2_tbl? %>% ? dplyr::select(- state) %>% ? kmeans(centers = 20, nstart = 100) str(kmeans_obj1) List of 9 ?$ cluster? ? ?: int [1:41] 11 11 9 11 11 4 11 11 16 2 ... ?$ centers? ? ?: num [1:20, 1:1337] 0 0 0 0 0 0 0 0 0 0 ... ? ..- attr(*, "dimnames")=List of 2 ? .. ..$ : chr [1:20] "1" "2" "3" "4" ... ? .. ..$ : chr [1:1337] "ABBOTTSTOWN" "ABILENE" "ACWORTH" "ADAMS" ... ?$ totss? ? ? ?: num 0.00158 ?$ withinss? ? : num [1:20] 0 0 0 0 0 0 0 0 0 0 ... ?$ tot.withinss: num 0.0000848 ?$ betweenss? ?: num 0.0015 ?$ size? ? ? ? : int [1:20] 1 1 1 1 1 1 1 1 1 1 ... ?$ iter? ? ? ? : int 3 ?$ ifault? ? ? : int 0 ?- attr(*, "class")= chr "kmeans" Then I go and try to tidy: #Tidy, glance, augment #Just makes it easier to use or view the obj's in the obj list ? broom::tidy(kmeans_obj1) %>% glimpse() ? ? ? ? broom::glance(kmeans_obj1) ##A tibble: 1 x 4 # totss tot.withinss betweenss? iter # <dbl>? ? ? ? <dbl>? ? ?<dbl> <int> #? ?1 0.00158? ? 0.0000848? ?0.00150? ? ?3 However, when I run this piece I get an error: broom::augment(kmeans_obj1, trnd2_tbl) %>% ? dplyr::select(city, .cluster)? ? ? ? ? ? ? #Error: Must subset columns with a valid subscript vector. # The subscript has the wrong type `data.frame< ?# u: double #? x: double>`.i It must be numeric or character. Here is the back trace: rlang::last_error() # Backtrace: #? ?1. broom::augment(kmeans_obj1, trnd2_tbl) # 9. dplyr::select(., city, .cluster) # 11. tidyselect::vars_select(tbl_vars(.data), !!!enquos(...)) # 12. tidyselect:::eval_select_impl(...) # 20. tidyselect:::vars_select_eval(...) # 21. tidyselect:::walk_data_tree(expr, data_mask, context_mask) # 22. tidyselect:::eval_c(expr, data_mask, context_mask) # 23. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init) # 24. tidyselect:::walk_data_tree(new, data_mask, context_mask) # 25. tidyselect:::as_indices_sel_impl(...) # 26. tidyselect:::as_indices_impl(x, vars, strict = strict) # 27. vctrs::vec_as_subscript(x, logical = "error") I am not sure what I am supposed to fix? Maybe someone has had similar error and can advise me please? Thank you. WHP Proprietary NOTICE TO RECIPIENT OF INFORMATION:\ This e-mail may con...{{dropped:16}} ______________________________________________ mailto:R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=DwMFaQ&c=wluqKIiwffOpZ6k5sqMWMBOn0vyYnlulRJmmvOXCFpM&r=j7MrcIQm2xjHa8v-2mTpmTCtKvneM2ExlYvnUWbsByY&m=sMhCVDVDKajwJ9te2qVsWXQ2aq4kAe7150EICM51Pw4&s=eSV6ISkAsnmonaRvNdtmx4Lr9vumgXwMYF87DoRP86s&ePLEASE do read the posting guide https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwMFaQ&c=wluqKIiwffOpZ6k5sqMWMBOn0vyYnlulRJmmvOXCFpM&r=j7MrcIQm2xjHa8v-2mTpmTCtKvneM2ExlYvnUWbsByY&m=sMhCVDVDKajwJ9te2qVsWXQ2aq4kAe7150EICM51Pw4&s=8wmXM73ofNcrn1i9gF-qxOzj7zRJZSPcaA5qg0vggG4&eand provide commented, minimal, self-contained, reproducible code. Proprietary NOTICE TO RECIPIENT OF INFORMATION: This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. This e-mail may also contain protected health information (PHI) with information about sensitive medical conditions, including, but not limited to, treatment for substance use disorders, behavioral health, HIV/AIDS, or pregnancy. This type of information may be protected by various federal and/or state laws which prohibit any further disclosure without the express written consent of the person to whom it pertains or as otherwise permitted by law. Any unauthorized further disclosure may be considered a violation of federal and/or state law. A general authorization for the release of medical or other information may NOT be sufficient consent for release of this type of information. Thank you. Aetna
Eric Berger
2020-May-12 19:07 UTC
[R] Help with Kmeans output and using broom to tidy etc..
Please use dput() On Tue, May 12, 2020 at 7:11 PM Poling, William <PolingW at aetna.com> wrote:> Hello Eric, thank you so much for your consideration. > > Here are snippets of data that I hope will be helpful > > WHP > > geo1a <- geo1[, c(2:5)] <-- eliminating ID which is not useful for my > purposes anyway > > #This is for R-Help use > geo1a <- geo1a %>% top_n(25) > > state city latitude longitude > 1 ME FAIRFIELD 44.64485 -69.65948 > 2 ME JONESPORT 44.57935 -67.56743 > 3 ME CASWELL 46.97529 -67.83023 > 4 ME ELLSWORTH 44.52916 -68.38717 > 5 ME VASSALBORO 44.45095 -69.60629 > 6 ME UNION 44.20059 -69.26123 > 7 ME PALERMO 44.45142 -69.41115 > 8 ME ORONO 44.87426 -68.68327 > 9 ME SANGERVILLE 45.10138 -69.33580 > 10 ME ISLESBORO 44.29015 -68.90812 > 11 ME TOPSHAM 43.93600 -69.96565 > 12 ME FREEPORT 43.84089 -70.11160 > 13 ME SKOWHEGAN 44.76687 -69.71644 > 14 ME MILLINOCKET 45.65501 -68.70261 > 15 ME ORRINGTON 44.72417 -68.74026 > 16 ME ST. GEORGE 43.96726 -69.20827 > 17 ME FORT FAIRFIELD 46.80911 -67.88079 > 18 ME MARS HILL 46.56580 -67.89006 > 19 ME FREEPORT 43.85302 -70.03726 > 20 ME EASTON 46.64143 -67.91203 > 21 ME WATERVILLE 44.53621 -69.65913 > 22 ME BRUNSWICK 43.87771 -69.96297 > 23 ME BRUNSWICK 43.91719 -69.89905 > 24 ME BUCKSPORT 44.60665 -68.81892 > 25 ME FAYETTE 44.46380 -70.12047 > > > trnd1_tbla <- trnd1_tbl %>% top_n(25) > print(trnd1_tbla) > head(trnd1_tbla,n=25) > > A tibble: 25 x 5 > city state Basecountsum Basecount2 prop_of_total > <fct> <fct> <dbl> <dbl> <dbl> > 1 ATLANTA GA 2352 12 0.00510 > 2 BRADENTON FL 2352 8 0.00340 > 3 BROOKLYN NY 2352 30 0.0128 > 4 CHARLOTTE NC 2352 8 0.00340 > 5 CHICAGO IL 2352 17 0.00723 > 6 COLUMBUS OH 2352 11 0.00468 > 7 CUMMING GA 2352 8 0.00340 > 8 DALLAS TX 2352 8 0.00340 > 9 ERIE PA 2352 12 0.00510 > 10 HOUSTON TX 2352 12 0.00510 > # ... with 15 more rows > > WHP > > From: Eric Berger <ericjberger at gmail.com> > Sent: Tuesday, May 12, 2020 8:39 AM > To: Poling, William <PolingW at aetna.com> > Cc: r-help at r-project.org > Subject: [EXTERNAL] Re: [R] Help with Kmeans output and using broom to > tidy etc.. > > **** External Email - Use Caution **** > Can you create a reproducible example? > Your question involves objects that are unknown to us. (geo1, trnd1_tbl) > > On Tue, May 12, 2020 at 2:41 PM Poling, William via R-help <mailto: > r-help at r-project.org> wrote: > #RStudio Version Version 1.2.1335 need this one--> 1.2.5019 > sessionInfo() > # R version 4.0.0 Patched (2020-05-03 r78349) > #Platform: x86_64-w64-mingw32/x64 (64-bit) > #Running under: Windows 10 x64 (build 17763) > > Hello: > > I have data that I am trying to manipulate for Kmeans clustering. > > Original data looks like this > > str(geo1) > # 'data.frame': 2352 obs. of 5 variables: > # $ ID: Factor w/ 2352 levels "101040199600",..: 590 908 976 509 1674 690 > 1336 86 726 1702 ... > # $ state : Factor w/ 41 levels "AL","AR","AZ",..: 32 10 25 11 9 > 32 13 31 12 12 ... > # $ city : Factor w/ 1337 levels "ABBOTTSTOWN",..: 932 156 230 > 698 965 1330 515 727 1127 1304 ... > # $ latitude : num 40.4 31.2 40.8 42.1 26.8 ... > # $ longitude : num -79.9 -81.5 -74 -91.6 -82.1 ... > > I created a subset adding column prop_of_total > str(trnd1_tbl) > tibble [1,457 x 5] (S3: tbl_df/tbl/data.frame) > $ city : Factor w/ 1337 levels "ABBOTTSTOWN",..: 1 2 3 4 5 6 7 8 > 9 10 ... > $ state : Factor w/ 41 levels "AL","AR","AZ",..: 32 36 10 28 12 36 > 10 11 26 38 ... > $ Basecountsum : num [1:1457] 2352 2352 2352 2352 2352 ... > $ Basecount2 : num [1:1457] 1 1 1 1 1 2 1 1 2 1 ... > $ prop_of_total: num [1:1457] 0.000425 0.000425 0.000425 0.000425 > 0.000425 ... > > > Then I spread it > > trnd2_tbl <- trnd1_tbl %>% > dplyr::select(city, state, prop_of_total) %>% > spread(key = city, value = prop_of_total, fill = 0) #remove the NA's > with fill > > str(trnd2_tbl)#tibble [41 x 1,338] (S3: tbl_df/tbl/data.frame) > > Then I run a Kmeans > > kmeans_obj1 <- trnd2_tbl %>% > dplyr::select(- state) %>% > kmeans(centers = 20, nstart = 100) > > str(kmeans_obj1) > List of 9 > $ cluster : int [1:41] 11 11 9 11 11 4 11 11 16 2 ... > $ centers : num [1:20, 1:1337] 0 0 0 0 0 0 0 0 0 0 ... > ..- attr(*, "dimnames")=List of 2 > .. ..$ : chr [1:20] "1" "2" "3" "4" ... > .. ..$ : chr [1:1337] "ABBOTTSTOWN" "ABILENE" "ACWORTH" "ADAMS" ... > $ totss : num 0.00158 > $ withinss : num [1:20] 0 0 0 0 0 0 0 0 0 0 ... > $ tot.withinss: num 0.0000848 > $ betweenss : num 0.0015 > $ size : int [1:20] 1 1 1 1 1 1 1 1 1 1 ... > $ iter : int 3 > $ ifault : int 0 > - attr(*, "class")= chr "kmeans" > > Then I go and try to tidy: > > #Tidy, glance, augment > #Just makes it easier to use or view the obj's in the obj list > > broom::tidy(kmeans_obj1) %>% glimpse() > > broom::glance(kmeans_obj1) > ##A tibble: 1 x 4 > # totss tot.withinss betweenss iter > # <dbl> <dbl> <dbl> <int> > # 1 0.00158 0.0000848 0.00150 3 > > However, when I run this piece I get an error: > > broom::augment(kmeans_obj1, trnd2_tbl) %>% > dplyr::select(city, .cluster) > > #Error: Must subset columns with a valid subscript vector. > # The subscript has the wrong type `data.frame< > # u: double > # x: double > >`. > i It must be numeric or character. > > Here is the back trace: > > rlang::last_error() > > # Backtrace: > # 1. broom::augment(kmeans_obj1, trnd2_tbl) > # 9. dplyr::select(., city, .cluster) > # 11. tidyselect::vars_select(tbl_vars(.data), !!!enquos(...)) > # 12. tidyselect:::eval_select_impl(...) > # 20. tidyselect:::vars_select_eval(...) > # 21. tidyselect:::walk_data_tree(expr, data_mask, context_mask) > # 22. tidyselect:::eval_c(expr, data_mask, context_mask) > # 23. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init) > # 24. tidyselect:::walk_data_tree(new, data_mask, context_mask) > # 25. tidyselect:::as_indices_sel_impl(...) > # 26. tidyselect:::as_indices_impl(x, vars, strict = strict) > # 27. vctrs::vec_as_subscript(x, logical = "error") > > I am not sure what I am supposed to fix? > > Maybe someone has had similar error and can advise me please? > > Thank you. > > WHP > > > > > > > > Proprietary > > NOTICE TO RECIPIENT OF INFORMATION:\ This e-mail may con...{{dropped:16}} > > ______________________________________________ > mailto:R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=DwMFaQ&c=wluqKIiwffOpZ6k5sqMWMBOn0vyYnlulRJmmvOXCFpM&r=j7MrcIQm2xjHa8v-2mTpmTCtKvneM2ExlYvnUWbsByY&m=sMhCVDVDKajwJ9te2qVsWXQ2aq4kAe7150EICM51Pw4&s=eSV6ISkAsnmonaRvNdtmx4Lr9vumgXwMYF87DoRP86s&e> PLEASE do read the posting guide > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwMFaQ&c=wluqKIiwffOpZ6k5sqMWMBOn0vyYnlulRJmmvOXCFpM&r=j7MrcIQm2xjHa8v-2mTpmTCtKvneM2ExlYvnUWbsByY&m=sMhCVDVDKajwJ9te2qVsWXQ2aq4kAe7150EICM51Pw4&s=8wmXM73ofNcrn1i9gF-qxOzj7zRJZSPcaA5qg0vggG4&e> and provide commented, minimal, self-contained, reproducible code. > > Proprietary > > NOTICE TO RECIPIENT OF INFORMATION: > This e-mail may contain confidential or privileged information. If you > think you have received this e-mail in error, please advise the sender by > reply e-mail and then delete this e-mail immediately. > This e-mail may also contain protected health information (PHI) with > information about sensitive medical conditions, including, but not limited > to, treatment for substance use disorders, behavioral health, HIV/AIDS, or > pregnancy. This type of information may be protected by various federal > and/or state laws which prohibit any further disclosure without the express > written consent of the person to whom it pertains or as otherwise permitted > by law. Any unauthorized further disclosure may be considered a violation > of federal and/or state law. A general authorization for the release of > medical or other information may NOT be sufficient consent for release of > this type of information. > Thank you. Aetna >[[alternative HTML version deleted]]
Poling, William
2020-May-12 19:19 UTC
[R] Help with Kmeans output and using broom to tidy etc..
Yes, of course. Thank you for your patience. str(geo1a) 'data.frame': 25 obs. of 4 variables: $ state : Factor w/ 41 levels "AL","AR","AZ",..: 19 19 19 19 19 19 19 19 19 19 ... $ city : Factor w/ 1337 levels "ABBOTTSTOWN",..: 366 574 193 343 1223 1207 885 871 1054 556 ... $ latitude : num 44.6 44.6 47 44.5 44.5 ... $ longitude: num -69.7 -67.6 -67.8 -68.4 -69.6 ... dput(geo1a) structure(list(state = structure(c(19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L), .Label = c("AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "IA", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "NC", "NE", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "SC", "SD", "TN", "TX", "UT", "VA", "WA", "WI", "WV"), class = "factor"), city = structure(c(366L, 574L, 193L, 343L, 1223L, 1207L, 885L, 871L, 1054L, 556L, 1192L, 414L, 1097L, 749L, 872L, 1134L, 397L, 700L, 414L, 332L, 1256L, 156L, 156L, 158L, 375L), .Label = c("ABBOTTSTOWN", "ABILENE", "ACWORTH", "ADAMS", "ADDISON", "ADKINS", "ALBANY", "ALBIA", "ALBUQUERQUE", "ALEXANDRIA", "ALFRED", "ALIQUIPPA", "ALISO VIEJO", "ALLEN PARK", "ALLENTOWN", "ALPHA", "ALPHARETTA", "ALPINE", "ALTOONA", "AMARILLO", "AMBLER", "AMBRIDGE", "AMHERST", "AMITYVILLE", "ANAHIEM", "ANDERSON", "ANDOVER", "ANGIER", "ANGLETON", "ANKENY", "ANN ARBOR", "ANZA", "APEX", "APOLLO", "ARCADIA", "ARCHDALE", "ARDMORE", "ARGYLE", "ARKANSAS CITY", "ARLINGTON", "ARNOLD", "ARTHUR", "ASHEBORO", "ASHEVILLE", "ASHLAND", "ASHLAND CITY", "ASHTON", "ASTON", "ATHENS", "ATLANTA", "ATLANTIC BCH", "AUBORN", "AUGUSTA", "AURORA", "AUSTELL", "AUSTIN", "AVENTURA", "AVONDALE ESTATES", "BAKERSFIELD", "BALDWIN CITY", "BALDWIN PLACE", "BALLWIN", "BANGOR", "BARBOURSVILLE", "BARNEGAT", "BARTLETT", "BARTON", "BARTONVILLE", "BASSETT", "BATAVIA", "BATESBURG", "BATON ROUGE", "BAXTER SPRINGS", "BAY CITY", "BAYONNE", "BAYSIDE", "BAYTOWN", "BEAR", "BEAUMONT", "BEECH CREEK", "BEECHER CITY", "BELFAIR", "BELLE VERNON", "BELLEAIR", "BELLEVUE", "BELLMAWR", "BELLMORE", "BELLWOOD", "BELMAR", "BELMONT", "BELVIDERE", "BENNET", "BENTON", "BENTONVILLE", "BERLIN", "BESSEMER CITY", "BETHANY", "BETHEL", "BETHEL PARK", "BETHESDA", "BETHLEHEM", "BETTENDORF", "BIGLERVILLE", "BINGHAMTON", "BIRDSBORO", "BIWABIK", "BLACK MOUNTAIN", "BLACKSBURG", "BLAINE", "BLAIRSVILLE", "BLAKESLEE", "BLOOMFIELD", "BLUE BELL", "BLUE GRASS", "BLUE POINT", "BLUE SPRINGS", "BOCA RATON", "BODFISH", "BOILING SPRINGS", "BOLIVAR", "BON AQUA", "BONNER SPRINGS", "BONNEY LAKE", "BOONEVILLE", "BOSSIER CITY", "BOUNTIFUL", "BOWLING GREEN", "BOYERTOWN", "BOYNTON BEACH", "BRADENTON", "BRADENVILLE", "BRANDAMORE", "BRANDON", "BRANFORD", "BRANSON", "BRASELTON", "BREEZEWOOD", "BRENTON", "BRENTWOOD", "BREWSTER", "BRICK", "BRIDGEPORT", "BRIDGETON", "BRIGHAM CITY", "BROADDUS", "BROCKPORT", "BROGUE", "BROKEN ARROW", "BRONX", "BROOKFIELD", "BROOKHAVEN", "BROOKLYN", "BROWNS MILLS", "BROWNSBURG", "BROWNSVILLE", "BRUNSWICK", "BRYAN", "BUCKSPORT", "BUDD LAKE", "BUFFALO", "BULVERDE", "BUNKERVILLE", "BURBANK", "BURFORD", "BURIEN", "BURLINGTON", "BURR RIDGE", "BURTON", "BUSKIRK", "BUTLER", "BUXTON", "BYRON", "CALERA", "CAMBRIDGE", "CAMP HILL", "CAMPBELL", "CANAAN", "CANAL WINCHESTER", "CANASTOTA", "CANTON", "CARDIFF BY THE SEA", "CARL JUNCTION", "CARLISLE", "CARLTON", "CAROL STREAM", "CARROLLTON", "CARSON CITY", "CARTERSVILLE", "CARTHAGE", "CARY", "CASEYVILLE", "CASSVILLE", "CASWELL", "CATO", "CEDAR RAPIDS", "CEDARBURG", "CEDARVILLE", "CENTER POINT", "CENTERTON", "CENTRAL ISLIP", "CENTRAL POINT", "CHAGRIN FALLS", "CHALFONT", "CHAPEL HILL", "CHAPIN", "CHARDON", "CHARITON", "CHARLESTON", "CHARLOTTE", "CHEROKEE", "CHERRY HILL", "CHERRY VALLEY", "CHESHIRE", "CHEST SPRINGS", "CHESTER", "CHESTERTON", "CHICAGO", "CHILLICOTHE", "CHOCTAW", "CICERO", "CINCINNATI", "CLAY", "CLEARWATER", "CLEARWATER BEACH", "CLEMMONS", "CLENDENIN", "CLEVELAND", "CLEVELAND HTS", "CLEVES", "CLIFFSIDE PARK", "CLIFTON", "CLIFTON PARK", "CLIFTON SPGS", "CLINTON", "COACHELLA", "COAL TOWNSHIP", "COATESVILLE", "COLLEGE STATION", "COLLINSVILLE", "COLONIA", "COLUMBIA", "COLUMBUS", "COMMERCE", "CONCORD", "CONCORD TOWNSHIP", "CONNELLSVILLE", "CONROE", "CONWAY", "CONYERS", "COOKEVILLE", "COON RAPIDS", "CORAOPOLIS", "CORDOVA", "CORNELIUS", "CORNWALL", "CORONADO", "CORPUS CHRISTI", "CORRY", "COTTAGE HILLS", "COTTLEVILLE", "COTTONWOOD", "COVINGTON", "COWEN", "CRANBERRY TOWNSHIP", "CROWN POINT", "CUBA", "CUMBERLAND CENTER", "CUMBERLAND FORESIDE", "CUMMING", "CUYAHOGA FLS", "CYPRESS", "DALLAS", "DALLASTOWN", "DANBURY", "DANIA BCH", "DANVILLE", "DAVENPORT", "DAVIE", "DAVIS JUNCTION", "DAWSON", "DAYTON", "DE SOTO", "DECATUR", "DEFIANCE", "DEFOREST", "DELAVAN", "DELMAR", "DELRAY BEACH", "DEMOTTE", "DENISON", "DENVER", "DEPTFORD", "DERBY", "DERRY", "DES MOINES", "DETROIT", "DICKINSON", "DILLSBURG", "DITTMER", "DIXON", "DONNA", "DOTHAN", "DOUGLAS", "DOUGLASVILLE", "DOVER", "DOYLESTOWN", "DREXEL HILL", "DUBLIN", "DUCHESNE", "DULUTH", "DUNCAN", "DUNCANNON", "DUNCANSVILLE", "DUNEDIN", "DUNNSVILLE", "DURHAM", "DUTTON", "EAGLE GROVE", "EAST AURORA", "EAST CHICAGO", "EAST EARL", "EAST HANOVER", "EAST HARTFORD", "EAST HARTLAND", "EAST LEROY", "EAST LIVERPOOL", "EAST MEADOW", "EAST NORTHPORT", "EAST ORANGE", "EAST PEORIA", "EAST SAINT LOUIS", "EASTON", "EDGERTON", "EDISON", "EDMOND", "EGG HBR TWP", "EL DORADO", "EL PASO", "ELDRIDGE", "ELGIN", "ELIZABETHVILLE", "ELLISVILLE", "ELLSWORTH", "ELLWOOD CITY", "ELMHURST", "ELMWOOD PARK", "ELOY", "ELY", "EMERSON", "EMORY", "ENDICOTT", "ENGLEWOOD", "ENID", "ENNICE", "ENOLA", "ENUMCLAW", "EPHRATA", "ERIE", "ESTERO", "EUREKA SPRINGS", "EVANSVILLE", "EVERETT", "EXCELSIOR SPRINGS", "EXTON", "FAIRFAX", "FAIRFIELD", "FAIRHAVEN", "FAIRVIEW", "FAIRVIEW PARK", "FALMOUTH", "FAR HILLS", "FAR ROCKAWAY", "FARMINGDALE", "FARMINGTON", "FAYETTE", "FAYETTEVILLE", "FELTON", "FENTON", "FERGUSON", "FIELDALE", "FINDLAY", "FINGERVILLE", "FLEMINGTON", "FLINT", "FLORENCE", "FLORESVILLE", "FLORISSANT", "FLOVILLA", "FLOWER MOUND", "FLUSHING", "FOGELSVILLE", "FOLSOM", "FONTANELLE", "FOREST HILLS", "FOREST PARK", "FORT DODGE", "FORT FAIRFIELD", "FORT GAY", "FORT LAUDERDALE", "FORT LEE", "FORT MILL", "FORT MOHAVE", "FORT PAYNE", "FORT PIERCE", "FORT SMITH", "FORT WAYNE", "FORT WORTH", "FOSTORIA", "FOUNTAIN INN", "FRANKFORT", "FRANKLIN", "FREEDOM", "FREEHOLD", "FREEPORT", "FREMONT", "FULLERTON", "FULSHEAR", "FULTON", "GADSDEN", "GAFFNEY", "GAINESVILLE", "GALLOWAY", "GARDEN PRAIRIE", "GARDNERS", "GARNETT VALLEY", "GARY", "GASTON", "GASTONIA", "GENEVA", "GETTYSBURG", "GIBSONIA", "GILBERT", "GIRARD", "GLEN BURNIE", "GLEN CARBON", "GLEN COVE", "GLEN MILLS", "GLENSHAW", "GLENVIEW", "GLENWOOD", "GOLDEN CITY", "GOLIAD", "GOODSON", "GOODYEAR", "GORHAM", "GOSHEN", "GRANBURY", "GRANBY", "GRAND PRAIRIE", "GRAND RAPIDS", "GRANDVIEW", "GRANITE CITY", "GRANITE FALLS", "GRANTS PASS", "GRASS VALLEY", "GRAVETTE", "GRAYSVILLE", "GREEN LANE", "GREENBRIER", "GREENLAWN", "GREENSBORO", "GREENSBURG", "GREENUP", "GREENVILLE", "GREER", "GRIFFIN", "GRIFFITH", "GROTON", "GUADALUPE", "GUILFORD", "HADLEY", "HAGAN", "HALF WAY", "HALLANDALE BEACH", "HAMBLETON", "HAMBURG", "HAMDEN", "HAMILTON", "HAMMOND", "HAMMONTON", "HAMPSHIRE", "HAPEVILLE", "HARBORCREEK", "HARLAN", "HARRISBURG", "HARRISON", "HARRISONVILLE", "HARTWELL", "HASTINGS", "HATFIELD", "HAVERHILL", "HAWK POINT", "HAYESVILLE", "HELEN", "HENDERSON", "HENDERSONVILLE", "HENRICO", "HENRIETTA", "HERMITAGE", "HERNDON", "HERSHEY", "HIALEAH", "HIAWATHA", "HIBBING", "HICKORY", "HICKORY GROVE", "HIDDENITE", "HIGH HILL", "HIGH POINT", "HIGH RIDGE", "HIGHLAND", "HIGHLAND MILLS", "HINCKLEY", "HIRAM", "HOBART", "HOLBROOK", "HOLDEN", "HOLDENVILLE", "HOLLADAY", "HOLLIS", "HOLLY SPRINGS", "HOLLYWOOD", "HOLTWOOD", "HOMER", "HOMESTEAD", "HONEYVILLE", "HOPE MILLS", "HOT SPRINGS", "HOT SPRINGS NATIONAL PARK", "HOUSTON", "HUBBARD", "HUDSON", "HUFFMAN", "HULL", "HUMANSVILLE", "HUNTERSVILLE", "HUNTINGDON", "HUNTINGTON BEACH", "HUNTS POINT", "HURDLE MILLS", "HURRICANE", "HURST", "IMPERIAL", "INDEPENDENCE", "INDIAN SHORES", "INDIAN TRAIL", "INDIANA", "INDIANAPOLIS", "INDIANOLA", "INMAN", "IOWA CITY", "IRMO", "IRVINGTON", "IRWIN", "ISANTI", "ISLESBORO", "ISLIP", "ISSAQUAH", "ITHACA", "JACKSBORO", "JACKSON", "JACKSON HTS", "JACKSONVILLE", "JAMAICA", "JAMESTOWN", "JASPER", "JEANNETTE", "JEFFERSON", "JEFFERSON CITY", "JEWELL", "JOHNSTON", "JOHNSTOWN", "JONESBORO", "JONESPORT", "JONESTOWN", "JOPLIN", "JUPITER", "KANKAKEE", "KANNAPOLIS", "KANSAS CITY", "KATY", "KEARNEY", "KELLERTON", "KEMAH", "KENMORE", "KENNESAW", "KENT", "KINGMAN", "KINGS MOUNTAIN", "KINGSLAND", "KINGSTON", "KINGWOOD", "KIRKLAND", "KUTZTOWN", "LA QUINTA", "LA RUE", "LA VERNE", "LAFAYETTE", "LAKE BLUFF", "LAKE IN THE HILL", "LAKE ISABELLA", "LAKE PLACID", "LAKE SAINT LOUIS", "LAKE TAPPS", "LAKE VILLAGE", "LAKE WAUKOMIS", "LAKE WORTH", "LAKEBAY", "LAKELAND", "LAKEWOOD", "LAKEWOOD RCH", "LAMBERTVILLE", "LANCASTER", "LANDISVILLE", "LANSDALE", "LAREDO", "LARGO", "LAS VEGAS", "LATROBE", "LAUDERHILL", "LAWNDALE", "LAWRENCE", "LAWRENCEVILLE", "LE MARS", "LE ROY", "LEAGUE CITY", "LEAVENWORTH", "LEAWOOD", "LEBANON", "LECOMPTON", "LEECHBURG", "LEES SUMMIT", "LEESBURG", "LEESVILLE", "LEETONIA", "LENEXA", "LENOIR", "LEVITTOWN", "LEWES", "LEWISTOWN", "LEXINGTON", "LIBERTY TWP", "LILLINGTON", "LINCOLN", "LINDENHURST", "LINTON", "LISBON", "LITCHFIELD PK", "LITHIA", "LITITZ", "LITTLE EGG HARBOR TO", "LK FOREST PK", "LK PEEKSKILL", "LOCKHART", "LOCKWOOD", "LOGAN", "LOMA LINDA", "LONE JACK", "LONG BEACH", "LONG LANE", "LONGVIEW", "LORAIN", "LORTON", "LOS ANGELES", "LOUISBURG", "LOVES PARK", "LOWER BURRELL", "LOWRY CITY", "LUBBOCK", "LUGOFF", "LUMBERTON", "LYNBROOK", "LYNNWOOD", "MACHESNEY PARK", "MACON", "MAGNOLIA", "MAHOPAC", "MAHWAH", "MAINEVILLE", "MALVERN", "MALVERNE", "MANASSAS", "MANCHACA", "MANCHESTER", "MANCHESTER TOWNSHIP", "MANCHESTER TW", "MANHEIM", "MANITO", "MANLIUS", "MANNINGTON", "MANSFIELD", "MANSURA", "MAPLE PARK", "MARBLE FALLS", "MARCELLUS", "MARICOPA", "MARIETTA", "MARION", "MARKLEYSBURG", "MARS HILL", "MARSHALLTOWN", "MARSHFIELD", "MARSHVILLE", "MARTINSVILLE", "MARYSVILLE", "MASON CITY", "MASSEY", "MASSILLON", "MASURY", "MATAWAN", "MATEWAN", "MATTAPOISETT", "MATTHEWS", "MAYFIELD HTS", "MAYSEL", "MC CLELLAND", "MC DONALD", "MC KEES ROCKS", "MC SHERRYSTOWN", "MC VEYTOWN", "MCALESTER", "MCDONOUGH", "MCKEESPORT", "MCKINNEY", "MECHANICSBURG", "MECHANICSVILLE", "MEDFORD", "MEDIA", "MEDWAY", "MELVILLE", "MEMPHIS", "MERIDEN", "MERRIAM", "MERRICK", "MERRILL", "MERRILLVILLE", "MESA", "MESQUITE", "MIAMI", "MIAMI GARDENS", "MICHIGAN CITY", "MIDDLETOWN", "MIDLAND", "MIFFLINTOWN", "MILFORD", "MILL CREEK", "MILLBROOK", "MILLEDGEVILLE", "MILLINOCKET", "MILNER", "MILTON", "MILWAUKEE", "MINEOLA", "MINERAL SPGS", "MINERAL WELLS", "MINNEAPOLIS", "MISSION", "MISSION HILLS", "MISSION VIEJO", "MISSOURI CITY", "MISSOURI VALLEY", "MOLINE", "MONESSEN", "MONROE", "MONROE TOWNSHIP", "MONROEVILLE", "MONTCLAIR", "MONTEREY", "MONTICELLO", "MOORESVILLE", "MORGANTON", "MORGANTOWN", "MORRIS PLAINS", "MOUND", "MOUND CITY", "MOUNT HOPE", "MOUNT JOY", "MOUNT LAUREL", "MOUNT PLEASANT", "MOUNT POCONO", "MOUNT UNION", "MOUNT WOLF", "MOUNTVILLE", "MT HOLLY", "MT PLEASANT", "MULVANE", "MUNCIE", "MUNSTER", "MURFREESBORO", "MURRAY", "MURRELLS INLT", "MUSTANG", "MYERSTOWN", "MYSTIC", "N BRANFORD", "N FT MYERS", "NAPERVILLE", "NAPLES", "NAPOLEON", "NASHVILLE", "NATCHITOCHES", "NAUGATUCK", "NEOSHO", "NEPTUNE BEACH", "NESCONSET", "NETCONG", "NEW BLOOMFIELD", "NEW BRAUNFELS", "NEW BRITAIN", "NEW BRUNSWICK", "NEW CASTLE", "NEW CUMBERLAND", "NEW HAVEN", "NEW KENSINGTON", "NEW LONDON", "NEW ORLEANS", "NEW PRESTON", "NEW PROVIDENCE", "NEW ROCHELLE", "NEW TRIPOLI", "NEW ULM", "NEW WINDSOR", "NEW YORK", "NEWARK", "NEWBURGH HEIGHTS", "NEWINGTON", "NEWNAN", "NEWPORT", "NEWPORT BEACH", "NEWTON", "NEWTONVILLE", "NIAGARA FALLS", "NIXA", "NOANK", "NOKOMIS", "NORCROSS", "NORFOLK", "NORMAN", "NORMANDY PARK", "NORTH BABYLON", "NORTH HAVEN", "NORTH HUNTINGDON", "NORTH JACKSON", "NORTH LITTLE ROCK", "NORTH MIAMI", "NORTH PORT", "NORTH RICHLAND HILLS", "NORTH WALES", "NORTH WATERBORO", "NORTHFIELD", "NORTHRIDGE", "NORTON", "NORWALK", "NOTTINGHAM", "NUTLEY", "NYACK", "O FALLON", "OAK RIDGE", "OAKDALE", "OCALA", "OCEANSIDE", "OCILLA", "OLATHE", "OMAHA", "OMRO", "ONA", "ONALASKA", "OPA LOCKA", "ORADLL", "ORION", "ORONO", "ORRINGTON", "OSCEOLA", "OSKALOOSA", "OSSINING", "OSWEGO", "OTTAWA", "OVALO", "OVERLAND PARK", "OWASSO", "OWEGO", "OXFORD", "OYSTER BAY", "OZARK", "PALERMO", "PALM CITY", "PALM HARBOR", "PALMDALE", "PALMYRA", "PALOS HEIGHTS", "PANA", "PAOLA", "PARK RIDGE", "PARLIN", "PARMA", "PARRISH", "PARROTT", "PATASKALA", "PAULS VALLEY", "PAXTON", "PEA RIDGE", "PEARLAND", "PECULIAR", "PEEKSKILL", "PEKIN", "PELION", "PEMBROKE", "PEMBROKE PINES", "PENN YAN", "PENNELLVILLE", "PENNSBURG", "PENNSVILLE", "PEORIA", "PERRY", "PERRYOPOLIS", "PERRYSBURG", "PERRYVILLE", "PHARR", "PHILADELPHIA", "PHILIPPI", "PHOENIX", "PICKENS", "PICKERINGTON", "PIERSON", "PILOT MOUNTAIN", "PINE BLUFF", "PINE HILL", "PINEVILLE", "PINNELLAS PARK", "PISCATAWAY", "PITMAN", "PITTSBURGH", "PLACIDA", "PLAINFIELD", "PLANO", "PLANT CITY", "PLATTEKILL", "PLEASANT HILL", "PLEASANT HOPE", "PLYMOUTH", "POCONO LAKE", "POMFRET CENTER", "POMPANO BEACH", "POOLER", "PORT CARBON", "PORT CHARLOTTE", "PORT NORRIS", "PORT ORANGE", "PORT SAINT LUCIE", "PORT WASHINGTON", "PORTAGE", "PORTER", "PORTERSVILLE", "PORTLAND", "POTTSVILLE", "POUGHKEEPSIE", "POWDER SPRINGS", "POWELL", "PRAIRIE VILLAGE", "PRESCOTT", "PRESCOTT VALLEY", "PRINCETON", "PROSPECT", "PT PLEASANT", "PUNTA GORDA", "PURCHASE", "QUAKERTOWN", "QUEENS VLG", "QUINCY", "RALEIGH", "RANDLEMAN", "RANDOLPH", "RAYTOWN", "READING", "READLYN", "RED BANK", "RED HOUSE", "RED LION", "REEDERS", "REGO PARK", "REHOBOTH BCH", "REIDSVILLE", "RENO", "RENTON", "REPUBLIC", "RICH HILL", "RICHARDS", "RICHMOND", "RICHMOND HILL", "RIDGEWOOD", "RINCON", "RIO GRANDE CITY", "RIO RANCHO", "RIVERDALE", "RIVERHEAD", "RIVERSIDE", "ROANOKE", "ROCHELLE", "ROCHESTER", "ROCK HILL", "ROCKAWAY BCH", "ROCKFORD", "ROCKMART", "ROCKY HILL", "ROCKY MOUNT", "ROGERS", "ROGERSVILLE", "ROMULUS", "ROOSEVELT", "ROSAMOND", "ROSCOE", "ROSENBERG", "ROSENDALE", "ROSWELL", "ROTONDA WEST", "ROUGEMONT", "ROXBORO", "ROY", "RUNNELLS", "RURAL HALL", "RUSH VALLEY", "RUSKIN", "RUSTBURG", "RUTHER GLEN", "RUTHERFORDTON", "S DEERFIELD", "SACO", "SAGINAW", "SAINT AUGUSTINE", "SAINT CHARLES", "SAINT CLAIR", "SAINT CLAIRSVILLE", "SAINT LOUIS", "SAINT MARYS", "SAINT MATTHEWS", "SAINT PAULS", "SAINT PETERS", "SAINT PETERSBURG", "SALEM", "SALISBURY", "SALT LAKE CITY", "SALTSBURG", "SALUNGA", "SAMMAMISH", "SAN ANTONIO", "SAN BENITO", "SAN CLEMENTE", "SAN DIEGO", "SAN ELIZARIO", "SAN JUAN", "SANDUSKY", "SANDY", "SANFORD", "SANGERVILLE", "SANTA ANA", "SARASOTA", "SARATOGA SPRINGS", "SARCOXIE", "SAUGUS", "SAVANNAH", "SAYVILLE", "SCALY MOUNTAIN", "SCHAEFFERSTOWN", "SCHULENBURG", "SCOTT", "SCOTTSDALE", "SEAFORD", "SEALE", "SEATTLE", "SEDONA", "SEGUIN", "SELDEN", "SENECA", "SENOIA", "SEVEN VALLEYS", "SEYMOUR", "SHARON", "SHARPSBURG", "SHARPSVILLE", "SHAVANO PARK", "SHAWNEE", "SHELLSBURG", "SHELTON", "SHENANDOAH", "SHORELINE", "SHOREWOOD", "SHREVEPORT", "SICKLERVILLE", "SILER CITY", "SILOAM SPRINGS", "SIMON", "SIMPSONVILLE", "SIMSBURY", "SIOUX CITY", "SIOUX FALLS", "SKOKIE", "SKOWHEGAN", "SLATINGTON", "SLIDELL", "SMITHFIELD", "SN BERNRDNO", "SNELLVILLE", "SOCORRO", "SOMERS", "SOPHIA", "SOUTH AMBOY", "SOUTH BELOIT", "SOUTH BEND", "SOUTH DARTMOUTH", "SOUTH HOUSTON", "SOUTH PARK", "SOUTH PLAINFIELD", "SOUTH SIOUX CITY", "SOUTHAMPTON", "SOUTHBURY", "SOUTHGATE", "SPARKS", "SPARROW BUSH", "SPENCER", "SPRING", "SPRING BRANCH", "SPRING GROVE", "SPRING HILL", "SPRING HOPE", "SPRING VALLEY", "SPRINGDALE", "SPRINGFIELD", "SPRINGFIELD GARDENS", "SPRINGHILL", "SPRINGTOWN", "SPRNGFLD GDNS", "SPRUCE PINE", "ST PETERSBURG", "ST. GEORGE", "STAFFORD", "STAMFORD", "STANDISH", "STANLEY", "STANTON", "STATEN ISLAND", "STATESVILLE", "STERLING", "STILLMAN VALLEY", "STILWELL", "STOCKBRIDGE", "STOCKTON", "STONE MTN", "STRAFFORD", "STRATFORD", "STRONGSVILLE", "STROUDSBURG", "STRUTHERS", "SUFFIELD", "SUGAR HILL", "SUGAR LAND", "SULPHUR", "SUMMERVILLE", "SUMMIT", "SUN CITY", "SUNBURY", "SUWANEE", "SWANSEA", "SWANTON", "SWEENY", "SWISSVALE", "SYCAMORE", "SYLVANIA", "SYRACUSE", "TACOMA", "TAFTVILLE", "TAMPA", "TAPPAHANNOCK", "TAR HEEL", "TAUNTON", "TAYLORVILLE", "TECUMSEH", "THE WOODLANDS", "THEODOSIA", "THOMASTON", "THOMASVILLE", "TIERRA VERDE", "TIFTON", "TILLSON", "TILTON", "TINLEY PARK", "TOCCOA", "TOLEDO", "TOLLAND", "TOMBALL", "TOMS RIVER", "TOPEKA", "TOPSHAM", "TORRINGTON", "TOVEY", "TOWNSEND", "TRAVELERS RST", "TRENT", "TRINITY", "TROUTMAN", "TROY", "TRUMBULL", "TUCKER", "TULALIP", "TURNER", "TUSCUMBIA", "TYRONE", "UNION", "UNION CITY", "UNIVERSAL CTY", "UNIVERSITY HTS", "UPPR CHICHSTR", "URBANA", "URBANDALE", "UTICA", "VAIL", "VALE", "VALENCIA", "VALPARAISO", "VAN BUREN", "VAN METER", "VAN WERT", "VANDERGRIFT", "VASSALBORO", "VAUGHN", "VENICE", "VERNAL", "VERNON", "VERONA", "VICTOR", "VIDALIA", "VIENNA", "VILLA GROVE", "VILLA RIDGE", "VOLANT", "W HAMPTON BCH", "W TERRE HAUTE", "WADSWORTH", "WAHOO", "WAKE FOREST", "WALDEN", "WALLINGFORD", "WALLINGTON", "WALNUT COVE", "WANAQUE", "WARFORDSBURG", "WARMINSTER", "WARREN", "WARSAW", "WARTHEN", "WASHINGTON", "WASOLA", "WATAUGA", "WATERBURY", "WATERFORD", "WATERLOO", "WATERVILLE", "WATKINS GLEN", "WAXAHACHIE", "WAYCROSS", "WAYNESBORO", "WEBSTER", "WEIRTON", "WELLSBORO", "WELLSVILLE", "WENTZVILLE", "WESLACO", "WEST CHESTER", "WEST DEPTFORD", "WEST DES MOINES", "WEST HAVEN", "WEST HICKORY", "WEST LIBERTY", "WEST MIFFLIN", "WEST PALM BEACH", "WEST POINT", "WEST READING", "WEST SENECA", "WEST SUFFIELD", "WEST VALLEY CITY", "WESTERVILLE", "WESTHAMPTON", "WESTMINSTER", "WESTMORELAND CITY", "WESTPORT", "WESTVILLE", "WETHERSFIELD", "WHARTON", "WHEELING", "WHITE PLAINS", "WHITEHALL", "WHITESTONE", "WHITESTOWN", "WHITING", "WHITMAN", "WHITTIER", "WICHITA", "WILDWOOD", "WILLARD", "WILLIAMSBURG", "WILLIAMSPORT", "WILLOW GROVE", "WILLOWBROOK", "WILLOWICK", "WILMETTE", "WILMINGTON", "WILSON", "WILTON MANORS", "WIMBERLEY", "WINDCREST", "WINDER", "WINNEBAGO", "WINSIDE", "WINSTON", "WINSTON SALEM", "WINTERSET", "WINTHROP", "WOLCOTT", "WOODBRIDGE", "WOODBURY HEIGHTS", "WOODLAND PARK", "WOODLAWN", "WOODS CROSS", "WOODSIDE", "WOODSTOCK", "WORTHINGTON", "WYOMISSING", "YARMOUTH", "YOE", "YONKERS", "YORK", "YORKTOWN", "YORKTOWN HEIGHTS", "YOUNG HARRIS", "YOUNGSTOWN", "YPSILANTI", "ZELIENOPLE", "ZEPHYRHILLS"), class = "factor"), latitude = c(44.644849, 44.579346, 46.975293, 44.529164, 44.450953, 44.200589, 44.45142, 44.874264, 45.101378, 44.29015, 43.935997, 43.840888, 44.766867, 45.655006, 44.724172, 43.967257, 46.80911, 46.565795, 43.853017, 46.64143, 44.53621, 43.877711, 43.91719, 44.606652, 44.4638), longitude = c(-69.659477, -67.567428, -67.83023, -68.387175, -69.606293, -69.261228, -69.411145, -68.683265, -69.335795, -68.90812, -69.965652, -70.111596, -69.716441, -68.702608, -68.740265, -69.208272, -67.880793, -67.890059, -70.037259, -67.91203, -69.65913, -69.962967, -69.899049, -68.818915, -70.12047)), row.names = c(NA, -25L), class = "data.frame") str(trnd1_tbla) tibble [27 x 5] (S3: tbl_df/tbl/data.frame) $ city : Factor w/ 1337 levels "ABBOTTSTOWN",..: 50 130 152 209 217 242 269 272 358 530 ... $ state : Factor w/ 41 levels "AL","AR","AZ",..: 10 9 28 23 12 29 10 36 32 36 ... $ Basecountsum : num [1:27] 2352 2352 2352 2352 2352 ... $ Basecount2 : num [1:27] 12 8 30 8 17 11 8 8 12 12 ... $ prop_of_total: num [1:27] 0.0051 0.0034 0.01276 0.0034 0.00723 ... dput(trnd1_tbla) structure(list(city = structure(c(50L, 130L, 152L, 209L, 217L, 242L, 269L, 272L, 358L, 530L, 544L, 563L, 580L, 613L, 618L, 879L, 919L, 932L, 970L, 1002L, 1033L, 1045L, 1056L, 1127L, 1140L, 1296L, 1330L), .Label = c("ABBOTTSTOWN", "ABILENE", "ACWORTH", "ADAMS", "ADDISON", "ADKINS", "ALBANY", "ALBIA", "ALBUQUERQUE", "ALEXANDRIA", "ALFRED", "ALIQUIPPA", "ALISO VIEJO", "ALLEN PARK", "ALLENTOWN", "ALPHA", "ALPHARETTA", "ALPINE", "ALTOONA", "AMARILLO", "AMBLER", "AMBRIDGE", "AMHERST", "AMITYVILLE", "ANAHIEM", "ANDERSON", "ANDOVER", "ANGIER", "ANGLETON", "ANKENY", "ANN ARBOR", "ANZA", "APEX", "APOLLO", "ARCADIA", "ARCHDALE", "ARDMORE", "ARGYLE", "ARKANSAS CITY", "ARLINGTON", "ARNOLD", "ARTHUR", "ASHEBORO", "ASHEVILLE", "ASHLAND", "ASHLAND CITY", "ASHTON", "ASTON", "ATHENS", "ATLANTA", "ATLANTIC BCH", "AUBORN", "AUGUSTA", "AURORA", "AUSTELL", "AUSTIN", "AVENTURA", "AVONDALE ESTATES", "BAKERSFIELD", "BALDWIN CITY", "BALDWIN PLACE", "BALLWIN", "BANGOR", "BARBOURSVILLE", "BARNEGAT", "BARTLETT", "BARTON", "BARTONVILLE", "BASSETT", "BATAVIA", "BATESBURG", "BATON ROUGE", "BAXTER SPRINGS", "BAY CITY", "BAYONNE", "BAYSIDE", "BAYTOWN", "BEAR", "BEAUMONT", "BEECH CREEK", "BEECHER CITY", "BELFAIR", "BELLE VERNON", "BELLEAIR", "BELLEVUE", "BELLMAWR", "BELLMORE", "BELLWOOD", "BELMAR", "BELMONT", "BELVIDERE", "BENNET", "BENTON", "BENTONVILLE", "BERLIN", "BESSEMER CITY", "BETHANY", "BETHEL", "BETHEL PARK", "BETHESDA", "BETHLEHEM", "BETTENDORF", "BIGLERVILLE", "BINGHAMTON", "BIRDSBORO", "BIWABIK", "BLACK MOUNTAIN", "BLACKSBURG", "BLAINE", "BLAIRSVILLE", "BLAKESLEE", "BLOOMFIELD", "BLUE BELL", "BLUE GRASS", "BLUE POINT", "BLUE SPRINGS", "BOCA RATON", "BODFISH", "BOILING SPRINGS", "BOLIVAR", "BON AQUA", "BONNER SPRINGS", "BONNEY LAKE", "BOONEVILLE", "BOSSIER CITY", "BOUNTIFUL", "BOWLING GREEN", "BOYERTOWN", "BOYNTON BEACH", "BRADENTON", "BRADENVILLE", "BRANDAMORE", "BRANDON", "BRANFORD", "BRANSON", "BRASELTON", "BREEZEWOOD", "BRENTON", "BRENTWOOD", "BREWSTER", "BRICK", "BRIDGEPORT", "BRIDGETON", "BRIGHAM CITY", "BROADDUS", "BROCKPORT", "BROGUE", "BROKEN ARROW", "BRONX", "BROOKFIELD", "BROOKHAVEN", "BROOKLYN", "BROWNS MILLS", "BROWNSBURG", "BROWNSVILLE", "BRUNSWICK", "BRYAN", "BUCKSPORT", "BUDD LAKE", "BUFFALO", "BULVERDE", "BUNKERVILLE", "BURBANK", "BURFORD", "BURIEN", "BURLINGTON", "BURR RIDGE", "BURTON", "BUSKIRK", "BUTLER", "BUXTON", "BYRON", "CALERA", "CAMBRIDGE", "CAMP HILL", "CAMPBELL", "CANAAN", "CANAL WINCHESTER", "CANASTOTA", "CANTON", "CARDIFF BY THE SEA", "CARL JUNCTION", "CARLISLE", "CARLTON", "CAROL STREAM", "CARROLLTON", "CARSON CITY", "CARTERSVILLE", "CARTHAGE", "CARY", "CASEYVILLE", "CASSVILLE", "CASWELL", "CATO", "CEDAR RAPIDS", "CEDARBURG", "CEDARVILLE", "CENTER POINT", "CENTERTON", "CENTRAL ISLIP", "CENTRAL POINT", "CHAGRIN FALLS", "CHALFONT", "CHAPEL HILL", "CHAPIN", "CHARDON", "CHARITON", "CHARLESTON", "CHARLOTTE", "CHEROKEE", "CHERRY HILL", "CHERRY VALLEY", "CHESHIRE", "CHEST SPRINGS", "CHESTER", "CHESTERTON", "CHICAGO", "CHILLICOTHE", "CHOCTAW", "CICERO", "CINCINNATI", "CLAY", "CLEARWATER", "CLEARWATER BEACH", "CLEMMONS", "CLENDENIN", "CLEVELAND", "CLEVELAND HTS", "CLEVES", "CLIFFSIDE PARK", "CLIFTON", "CLIFTON PARK", "CLIFTON SPGS", "CLINTON", "COACHELLA", "COAL TOWNSHIP", "COATESVILLE", "COLLEGE STATION", "COLLINSVILLE", "COLONIA", "COLUMBIA", "COLUMBUS", "COMMERCE", "CONCORD", "CONCORD TOWNSHIP", "CONNELLSVILLE", "CONROE", "CONWAY", "CONYERS", "COOKEVILLE", "COON RAPIDS", "CORAOPOLIS", "CORDOVA", "CORNELIUS", "CORNWALL", "CORONADO", "CORPUS CHRISTI", "CORRY", "COTTAGE HILLS", "COTTLEVILLE", "COTTONWOOD", "COVINGTON", "COWEN", "CRANBERRY TOWNSHIP", "CROWN POINT", "CUBA", "CUMBERLAND CENTER", "CUMBERLAND FORESIDE", "CUMMING", "CUYAHOGA FLS", "CYPRESS", "DALLAS", "DALLASTOWN", "DANBURY", "DANIA BCH", "DANVILLE", "DAVENPORT", "DAVIE", "DAVIS JUNCTION", "DAWSON", "DAYTON", "DE SOTO", "DECATUR", "DEFIANCE", "DEFOREST", "DELAVAN", "DELMAR", "DELRAY BEACH", "DEMOTTE", "DENISON", "DENVER", "DEPTFORD", "DERBY", "DERRY", "DES MOINES", "DETROIT", "DICKINSON", "DILLSBURG", "DITTMER", "DIXON", "DONNA", "DOTHAN", "DOUGLAS", "DOUGLASVILLE", "DOVER", "DOYLESTOWN", "DREXEL HILL", "DUBLIN", "DUCHESNE", "DULUTH", "DUNCAN", "DUNCANNON", "DUNCANSVILLE", "DUNEDIN", "DUNNSVILLE", "DURHAM", "DUTTON", "EAGLE GROVE", "EAST AURORA", "EAST CHICAGO", "EAST EARL", "EAST HANOVER", "EAST HARTFORD", "EAST HARTLAND", "EAST LEROY", "EAST LIVERPOOL", "EAST MEADOW", "EAST NORTHPORT", "EAST ORANGE", "EAST PEORIA", "EAST SAINT LOUIS", "EASTON", "EDGERTON", "EDISON", "EDMOND", "EGG HBR TWP", "EL DORADO", "EL PASO", "ELDRIDGE", "ELGIN", "ELIZABETHVILLE", "ELLISVILLE", "ELLSWORTH", "ELLWOOD CITY", "ELMHURST", "ELMWOOD PARK", "ELOY", "ELY", "EMERSON", "EMORY", "ENDICOTT", "ENGLEWOOD", "ENID", "ENNICE", "ENOLA", "ENUMCLAW", "EPHRATA", "ERIE", "ESTERO", "EUREKA SPRINGS", "EVANSVILLE", "EVERETT", "EXCELSIOR SPRINGS", "EXTON", "FAIRFAX", "FAIRFIELD", "FAIRHAVEN", "FAIRVIEW", "FAIRVIEW PARK", "FALMOUTH", "FAR HILLS", "FAR ROCKAWAY", "FARMINGDALE", "FARMINGTON", "FAYETTE", "FAYETTEVILLE", "FELTON", "FENTON", "FERGUSON", "FIELDALE", "FINDLAY", "FINGERVILLE", "FLEMINGTON", "FLINT", "FLORENCE", "FLORESVILLE", "FLORISSANT", "FLOVILLA", "FLOWER MOUND", "FLUSHING", "FOGELSVILLE", "FOLSOM", "FONTANELLE", "FOREST HILLS", "FOREST PARK", "FORT DODGE", "FORT FAIRFIELD", "FORT GAY", "FORT LAUDERDALE", "FORT LEE", "FORT MILL", "FORT MOHAVE", "FORT PAYNE", "FORT PIERCE", "FORT SMITH", "FORT WAYNE", "FORT WORTH", "FOSTORIA", "FOUNTAIN INN", "FRANKFORT", "FRANKLIN", "FREEDOM", "FREEHOLD", "FREEPORT", "FREMONT", "FULLERTON", "FULSHEAR", "FULTON", "GADSDEN", "GAFFNEY", "GAINESVILLE", "GALLOWAY", "GARDEN PRAIRIE", "GARDNERS", "GARNETT VALLEY", "GARY", "GASTON", "GASTONIA", "GENEVA", "GETTYSBURG", "GIBSONIA", "GILBERT", "GIRARD", "GLEN BURNIE", "GLEN CARBON", "GLEN COVE", "GLEN MILLS", "GLENSHAW", "GLENVIEW", "GLENWOOD", "GOLDEN CITY", "GOLIAD", "GOODSON", "GOODYEAR", "GORHAM", "GOSHEN", "GRANBURY", "GRANBY", "GRAND PRAIRIE", "GRAND RAPIDS", "GRANDVIEW", "GRANITE CITY", "GRANITE FALLS", "GRANTS PASS", "GRASS VALLEY", "GRAVETTE", "GRAYSVILLE", "GREEN LANE", "GREENBRIER", "GREENLAWN", "GREENSBORO", "GREENSBURG", "GREENUP", "GREENVILLE", "GREER", "GRIFFIN", "GRIFFITH", "GROTON", "GUADALUPE", "GUILFORD", "HADLEY", "HAGAN", "HALF WAY", "HALLANDALE BEACH", "HAMBLETON", "HAMBURG", "HAMDEN", "HAMILTON", "HAMMOND", "HAMMONTON", "HAMPSHIRE", "HAPEVILLE", "HARBORCREEK", "HARLAN", "HARRISBURG", "HARRISON", "HARRISONVILLE", "HARTWELL", "HASTINGS", "HATFIELD", "HAVERHILL", "HAWK POINT", "HAYESVILLE", "HELEN", "HENDERSON", "HENDERSONVILLE", "HENRICO", "HENRIETTA", "HERMITAGE", "HERNDON", "HERSHEY", "HIALEAH", "HIAWATHA", "HIBBING", "HICKORY", "HICKORY GROVE", "HIDDENITE", "HIGH HILL", "HIGH POINT", "HIGH RIDGE", "HIGHLAND", "HIGHLAND MILLS", "HINCKLEY", "HIRAM", "HOBART", "HOLBROOK", "HOLDEN", "HOLDENVILLE", "HOLLADAY", "HOLLIS", "HOLLY SPRINGS", "HOLLYWOOD", "HOLTWOOD", "HOMER", "HOMESTEAD", "HONEYVILLE", "HOPE MILLS", "HOT SPRINGS", "HOT SPRINGS NATIONAL PARK", "HOUSTON", "HUBBARD", "HUDSON", "HUFFMAN", "HULL", "HUMANSVILLE", "HUNTERSVILLE", "HUNTINGDON", "HUNTINGTON BEACH", "HUNTS POINT", "HURDLE MILLS", "HURRICANE", "HURST", "IMPERIAL", "INDEPENDENCE", "INDIAN SHORES", "INDIAN TRAIL", "INDIANA", "INDIANAPOLIS", "INDIANOLA", "INMAN", "IOWA CITY", "IRMO", "IRVINGTON", "IRWIN", "ISANTI", "ISLESBORO", "ISLIP", "ISSAQUAH", "ITHACA", "JACKSBORO", "JACKSON", "JACKSON HTS", "JACKSONVILLE", "JAMAICA", "JAMESTOWN", "JASPER", "JEANNETTE", "JEFFERSON", "JEFFERSON CITY", "JEWELL", "JOHNSTON", "JOHNSTOWN", "JONESBORO", "JONESPORT", "JONESTOWN", "JOPLIN", "JUPITER", "KANKAKEE", "KANNAPOLIS", "KANSAS CITY", "KATY", "KEARNEY", "KELLERTON", "KEMAH", "KENMORE", "KENNESAW", "KENT", "KINGMAN", "KINGS MOUNTAIN", "KINGSLAND", "KINGSTON", "KINGWOOD", "KIRKLAND", "KUTZTOWN", "LA QUINTA", "LA RUE", "LA VERNE", "LAFAYETTE", "LAKE BLUFF", "LAKE IN THE HILL", "LAKE ISABELLA", "LAKE PLACID", "LAKE SAINT LOUIS", "LAKE TAPPS", "LAKE VILLAGE", "LAKE WAUKOMIS", "LAKE WORTH", "LAKEBAY", "LAKELAND", "LAKEWOOD", "LAKEWOOD RCH", "LAMBERTVILLE", "LANCASTER", "LANDISVILLE", "LANSDALE", "LAREDO", "LARGO", "LAS VEGAS", "LATROBE", "LAUDERHILL", "LAWNDALE", "LAWRENCE", "LAWRENCEVILLE", "LE MARS", "LE ROY", "LEAGUE CITY", "LEAVENWORTH", "LEAWOOD", "LEBANON", "LECOMPTON", "LEECHBURG", "LEES SUMMIT", "LEESBURG", "LEESVILLE", "LEETONIA", "LENEXA", "LENOIR", "LEVITTOWN", "LEWES", "LEWISTOWN", "LEXINGTON", "LIBERTY TWP", "LILLINGTON", "LINCOLN", "LINDENHURST", "LINTON", "LISBON", "LITCHFIELD PK", "LITHIA", "LITITZ", "LITTLE EGG HARBOR TO", "LK FOREST PK", "LK PEEKSKILL", "LOCKHART", "LOCKWOOD", "LOGAN", "LOMA LINDA", "LONE JACK", "LONG BEACH", "LONG LANE", "LONGVIEW", "LORAIN", "LORTON", "LOS ANGELES", "LOUISBURG", "LOVES PARK", "LOWER BURRELL", "LOWRY CITY", "LUBBOCK", "LUGOFF", "LUMBERTON", "LYNBROOK", "LYNNWOOD", "MACHESNEY PARK", "MACON", "MAGNOLIA", "MAHOPAC", "MAHWAH", "MAINEVILLE", "MALVERN", "MALVERNE", "MANASSAS", "MANCHACA", "MANCHESTER", "MANCHESTER TOWNSHIP", "MANCHESTER TW", "MANHEIM", "MANITO", "MANLIUS", "MANNINGTON", "MANSFIELD", "MANSURA", "MAPLE PARK", "MARBLE FALLS", "MARCELLUS", "MARICOPA", "MARIETTA", "MARION", "MARKLEYSBURG", "MARS HILL", "MARSHALLTOWN", "MARSHFIELD", "MARSHVILLE", "MARTINSVILLE", "MARYSVILLE", "MASON CITY", "MASSEY", "MASSILLON", "MASURY", "MATAWAN", "MATEWAN", "MATTAPOISETT", "MATTHEWS", "MAYFIELD HTS", "MAYSEL", "MC CLELLAND", "MC DONALD", "MC KEES ROCKS", "MC SHERRYSTOWN", "MC VEYTOWN", "MCALESTER", "MCDONOUGH", "MCKEESPORT", "MCKINNEY", "MECHANICSBURG", "MECHANICSVILLE", "MEDFORD", "MEDIA", "MEDWAY", "MELVILLE", "MEMPHIS", "MERIDEN", "MERRIAM", "MERRICK", "MERRILL", "MERRILLVILLE", "MESA", "MESQUITE", "MIAMI", "MIAMI GARDENS", "MICHIGAN CITY", "MIDDLETOWN", "MIDLAND", "MIFFLINTOWN", "MILFORD", "MILL CREEK", "MILLBROOK", "MILLEDGEVILLE", "MILLINOCKET", "MILNER", "MILTON", "MILWAUKEE", "MINEOLA", "MINERAL SPGS", "MINERAL WELLS", "MINNEAPOLIS", "MISSION", "MISSION HILLS", "MISSION VIEJO", "MISSOURI CITY", "MISSOURI VALLEY", "MOLINE", "MONESSEN", "MONROE", "MONROE TOWNSHIP", "MONROEVILLE", "MONTCLAIR", "MONTEREY", "MONTICELLO", "MOORESVILLE", "MORGANTON", "MORGANTOWN", "MORRIS PLAINS", "MOUND", "MOUND CITY", "MOUNT HOPE", "MOUNT JOY", "MOUNT LAUREL", "MOUNT PLEASANT", "MOUNT POCONO", "MOUNT UNION", "MOUNT WOLF", "MOUNTVILLE", "MT HOLLY", "MT PLEASANT", "MULVANE", "MUNCIE", "MUNSTER", "MURFREESBORO", "MURRAY", "MURRELLS INLT", "MUSTANG", "MYERSTOWN", "MYSTIC", "N BRANFORD", "N FT MYERS", "NAPERVILLE", "NAPLES", "NAPOLEON", "NASHVILLE", "NATCHITOCHES", "NAUGATUCK", "NEOSHO", "NEPTUNE BEACH", "NESCONSET", "NETCONG", "NEW BLOOMFIELD", "NEW BRAUNFELS", "NEW BRITAIN", "NEW BRUNSWICK", "NEW CASTLE", "NEW CUMBERLAND", "NEW HAVEN", "NEW KENSINGTON", "NEW LONDON", "NEW ORLEANS", "NEW PRESTON", "NEW PROVIDENCE", "NEW ROCHELLE", "NEW TRIPOLI", "NEW ULM", "NEW WINDSOR", "NEW YORK", "NEWARK", "NEWBURGH HEIGHTS", "NEWINGTON", "NEWNAN", "NEWPORT", "NEWPORT BEACH", "NEWTON", "NEWTONVILLE", "NIAGARA FALLS", "NIXA", "NOANK", "NOKOMIS", "NORCROSS", "NORFOLK", "NORMAN", "NORMANDY PARK", "NORTH BABYLON", "NORTH HAVEN", "NORTH HUNTINGDON", "NORTH JACKSON", "NORTH LITTLE ROCK", "NORTH MIAMI", "NORTH PORT", "NORTH RICHLAND HILLS", "NORTH WALES", "NORTH WATERBORO", "NORTHFIELD", "NORTHRIDGE", "NORTON", "NORWALK", "NOTTINGHAM", "NUTLEY", "NYACK", "O FALLON", "OAK RIDGE", "OAKDALE", "OCALA", "OCEANSIDE", "OCILLA", "OLATHE", "OMAHA", "OMRO", "ONA", "ONALASKA", "OPA LOCKA", "ORADLL", "ORION", "ORONO", "ORRINGTON", "OSCEOLA", "OSKALOOSA", "OSSINING", "OSWEGO", "OTTAWA", "OVALO", "OVERLAND PARK", "OWASSO", "OWEGO", "OXFORD", "OYSTER BAY", "OZARK", "PALERMO", "PALM CITY", "PALM HARBOR", "PALMDALE", "PALMYRA", "PALOS HEIGHTS", "PANA", "PAOLA", "PARK RIDGE", "PARLIN", "PARMA", "PARRISH", "PARROTT", "PATASKALA", "PAULS VALLEY", "PAXTON", "PEA RIDGE", "PEARLAND", "PECULIAR", "PEEKSKILL", "PEKIN", "PELION", "PEMBROKE", "PEMBROKE PINES", "PENN YAN", "PENNELLVILLE", "PENNSBURG", "PENNSVILLE", "PEORIA", "PERRY", "PERRYOPOLIS", "PERRYSBURG", "PERRYVILLE", "PHARR", "PHILADELPHIA", "PHILIPPI", "PHOENIX", "PICKENS", "PICKERINGTON", "PIERSON", "PILOT MOUNTAIN", "PINE BLUFF", "PINE HILL", "PINEVILLE", "PINNELLAS PARK", "PISCATAWAY", "PITMAN", "PITTSBURGH", "PLACIDA", "PLAINFIELD", "PLANO", "PLANT CITY", "PLATTEKILL", "PLEASANT HILL", "PLEASANT HOPE", "PLYMOUTH", "POCONO LAKE", "POMFRET CENTER", "POMPANO BEACH", "POOLER", "PORT CARBON", "PORT CHARLOTTE", "PORT NORRIS", "PORT ORANGE", "PORT SAINT LUCIE", "PORT WASHINGTON", "PORTAGE", "PORTER", "PORTERSVILLE", "PORTLAND", "POTTSVILLE", "POUGHKEEPSIE", "POWDER SPRINGS", "POWELL", "PRAIRIE VILLAGE", "PRESCOTT", "PRESCOTT VALLEY", "PRINCETON", "PROSPECT", "PT PLEASANT", "PUNTA GORDA", "PURCHASE", "QUAKERTOWN", "QUEENS VLG", "QUINCY", "RALEIGH", "RANDLEMAN", "RANDOLPH", "RAYTOWN", "READING", "READLYN", "RED BANK", "RED HOUSE", "RED LION", "REEDERS", "REGO PARK", "REHOBOTH BCH", "REIDSVILLE", "RENO", "RENTON", "REPUBLIC", "RICH HILL", "RICHARDS", "RICHMOND", "RICHMOND HILL", "RIDGEWOOD", "RINCON", "RIO GRANDE CITY", "RIO RANCHO", "RIVERDALE", "RIVERHEAD", "RIVERSIDE", "ROANOKE", "ROCHELLE", "ROCHESTER", "ROCK HILL", "ROCKAWAY BCH", "ROCKFORD", "ROCKMART", "ROCKY HILL", "ROCKY MOUNT", "ROGERS", "ROGERSVILLE", "ROMULUS", "ROOSEVELT", "ROSAMOND", "ROSCOE", "ROSENBERG", "ROSENDALE", "ROSWELL", "ROTONDA WEST", "ROUGEMONT", "ROXBORO", "ROY", "RUNNELLS", "RURAL HALL", "RUSH VALLEY", "RUSKIN", "RUSTBURG", "RUTHER GLEN", "RUTHERFORDTON", "S DEERFIELD", "SACO", "SAGINAW", "SAINT AUGUSTINE", "SAINT CHARLES", "SAINT CLAIR", "SAINT CLAIRSVILLE", "SAINT LOUIS", "SAINT MARYS", "SAINT MATTHEWS", "SAINT PAULS", "SAINT PETERS", "SAINT PETERSBURG", "SALEM", "SALISBURY", "SALT LAKE CITY", "SALTSBURG", "SALUNGA", "SAMMAMISH", "SAN ANTONIO", "SAN BENITO", "SAN CLEMENTE", "SAN DIEGO", "SAN ELIZARIO", "SAN JUAN", "SANDUSKY", "SANDY", "SANFORD", "SANGERVILLE", "SANTA ANA", "SARASOTA", "SARATOGA SPRINGS", "SARCOXIE", "SAUGUS", "SAVANNAH", "SAYVILLE", "SCALY MOUNTAIN", "SCHAEFFERSTOWN", "SCHULENBURG", "SCOTT", "SCOTTSDALE", "SEAFORD", "SEALE", "SEATTLE", "SEDONA", "SEGUIN", "SELDEN", "SENECA", "SENOIA", "SEVEN VALLEYS", "SEYMOUR", "SHARON", "SHARPSBURG", "SHARPSVILLE", "SHAVANO PARK", "SHAWNEE", "SHELLSBURG", "SHELTON", "SHENANDOAH", "SHORELINE", "SHOREWOOD", "SHREVEPORT", "SICKLERVILLE", "SILER CITY", "SILOAM SPRINGS", "SIMON", "SIMPSONVILLE", "SIMSBURY", "SIOUX CITY", "SIOUX FALLS", "SKOKIE", "SKOWHEGAN", "SLATINGTON", "SLIDELL", "SMITHFIELD", "SN BERNRDNO", "SNELLVILLE", "SOCORRO", "SOMERS", "SOPHIA", "SOUTH AMBOY", "SOUTH BELOIT", "SOUTH BEND", "SOUTH DARTMOUTH", "SOUTH HOUSTON", "SOUTH PARK", "SOUTH PLAINFIELD", "SOUTH SIOUX CITY", "SOUTHAMPTON", "SOUTHBURY", "SOUTHGATE", "SPARKS", "SPARROW BUSH", "SPENCER", "SPRING", "SPRING BRANCH", "SPRING GROVE", "SPRING HILL", "SPRING HOPE", "SPRING VALLEY", "SPRINGDALE", "SPRINGFIELD", "SPRINGFIELD GARDENS", "SPRINGHILL", "SPRINGTOWN", "SPRNGFLD GDNS", "SPRUCE PINE", "ST PETERSBURG", "ST. GEORGE", "STAFFORD", "STAMFORD", "STANDISH", "STANLEY", "STANTON", "STATEN ISLAND", "STATESVILLE", "STERLING", "STILLMAN VALLEY", "STILWELL", "STOCKBRIDGE", "STOCKTON", "STONE MTN", "STRAFFORD", "STRATFORD", "STRONGSVILLE", "STROUDSBURG", "STRUTHERS", "SUFFIELD", "SUGAR HILL", "SUGAR LAND", "SULPHUR", "SUMMERVILLE", "SUMMIT", "SUN CITY", "SUNBURY", "SUWANEE", "SWANSEA", "SWANTON", "SWEENY", "SWISSVALE", "SYCAMORE", "SYLVANIA", "SYRACUSE", "TACOMA", "TAFTVILLE", "TAMPA", "TAPPAHANNOCK", "TAR HEEL", "TAUNTON", "TAYLORVILLE", "TECUMSEH", "THE WOODLANDS", "THEODOSIA", "THOMASTON", "THOMASVILLE", "TIERRA VERDE", "TIFTON", "TILLSON", "TILTON", "TINLEY PARK", "TOCCOA", "TOLEDO", "TOLLAND", "TOMBALL", "TOMS RIVER", "TOPEKA", "TOPSHAM", "TORRINGTON", "TOVEY", "TOWNSEND", "TRAVELERS RST", "TRENT", "TRINITY", "TROUTMAN", "TROY", "TRUMBULL", "TUCKER", "TULALIP", "TURNER", "TUSCUMBIA", "TYRONE", "UNION", "UNION CITY", "UNIVERSAL CTY", "UNIVERSITY HTS", "UPPR CHICHSTR", "URBANA", "URBANDALE", "UTICA", "VAIL", "VALE", "VALENCIA", "VALPARAISO", "VAN BUREN", "VAN METER", "VAN WERT", "VANDERGRIFT", "VASSALBORO", "VAUGHN", "VENICE", "VERNAL", "VERNON", "VERONA", "VICTOR", "VIDALIA", "VIENNA", "VILLA GROVE", "VILLA RIDGE", "VOLANT", "W HAMPTON BCH", "W TERRE HAUTE", "WADSWORTH", "WAHOO", "WAKE FOREST", "WALDEN", "WALLINGFORD", "WALLINGTON", "WALNUT COVE", "WANAQUE", "WARFORDSBURG", "WARMINSTER", "WARREN", "WARSAW", "WARTHEN", "WASHINGTON", "WASOLA", "WATAUGA", "WATERBURY", "WATERFORD", "WATERLOO", "WATERVILLE", "WATKINS GLEN", "WAXAHACHIE", "WAYCROSS", "WAYNESBORO", "WEBSTER", "WEIRTON", "WELLSBORO", "WELLSVILLE", "WENTZVILLE", "WESLACO", "WEST CHESTER", "WEST DEPTFORD", "WEST DES MOINES", "WEST HAVEN", "WEST HICKORY", "WEST LIBERTY", "WEST MIFFLIN", "WEST PALM BEACH", "WEST POINT", "WEST READING", "WEST SENECA", "WEST SUFFIELD", "WEST VALLEY CITY", "WESTERVILLE", "WESTHAMPTON", "WESTMINSTER", "WESTMORELAND CITY", "WESTPORT", "WESTVILLE", "WETHERSFIELD", "WHARTON", "WHEELING", "WHITE PLAINS", "WHITEHALL", "WHITESTONE", "WHITESTOWN", "WHITING", "WHITMAN", "WHITTIER", "WICHITA", "WILDWOOD", "WILLARD", "WILLIAMSBURG", "WILLIAMSPORT", "WILLOW GROVE", "WILLOWBROOK", "WILLOWICK", "WILMETTE", "WILMINGTON", "WILSON", "WILTON MANORS", "WIMBERLEY", "WINDCREST", "WINDER", "WINNEBAGO", "WINSIDE", "WINSTON", "WINSTON SALEM", "WINTERSET", "WINTHROP", "WOLCOTT", "WOODBRIDGE", "WOODBURY HEIGHTS", "WOODLAND PARK", "WOODLAWN", "WOODS CROSS", "WOODSIDE", "WOODSTOCK", "WORTHINGTON", "WYOMISSING", "YARMOUTH", "YOE", "YONKERS", "YORK", "YORKTOWN", "YORKTOWN HEIGHTS", "YOUNG HARRIS", "YOUNGSTOWN", "YPSILANTI", "ZELIENOPLE", "ZEPHYRHILLS"), class = "factor"), state = structure(c(10L, 9L, 28L, 23L, 12L, 29L, 10L, 36L, 32L, 36L, 22L, 9L, 22L, 32L, 27L, 14L, 32L, 32L, 23L, 12L, 22L, 36L, 9L, 22L, 28L, 14L, 32L), .Label = c("AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "IA", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "NC", "NE", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "SC", "SD", "TN", "TX", "UT", "VA", "WA", "WI", "WV"), class = "factor"), Basecountsum = c(2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352, 2352 ), Basecount2 = c(12, 8, 30, 8, 17, 11, 8, 8, 12, 12, 8, 9, 11, 9, 14, 8, 8, 23, 10, 12, 14, 20, 8, 8, 21, 9, 11), prop_of_total = c(0.00510204081632653, 0.00340136054421769, 0.0127551020408163, 0.00340136054421769, 0.00722789115646259, 0.00467687074829932, 0.00340136054421769, 0.00340136054421769, 0.00510204081632653, 0.00510204081632653, 0.00340136054421769, 0.0038265306122449, 0.00467687074829932, 0.0038265306122449, 0.00595238095238095, 0.00340136054421769, 0.00340136054421769, 0.00977891156462585, 0.00425170068027211, 0.00510204081632653, 0.00595238095238095, 0.00850340136054422, 0.00340136054421769, 0.00340136054421769, 0.00892857142857143, 0.0038265306122449, 0.00467687074829932)), class = c("tbl_df", "tbl", "data.frame" ), row.names = c(NA, -27L)) William H. Poling Ph.D., MPH | Senior Data Scientist, Medicare Stars, CVS Health p 813-777-5030 From: Eric Berger <ericjberger at gmail.com> Sent: Tuesday, May 12, 2020 2:07 PM To: Poling, William <PolingW at aetna.com> Cc: r-help at r-project.org Subject: [EXTERNAL] Re: Re: [R] Help with Kmeans output and using broom to tidy etc.. **** External Email - Use Caution **** Please use dput() On Tue, May 12, 2020 at 7:11 PM Poling, William <PolingW at aetna.com<mailto:PolingW at aetna.com>> wrote: Hello Eric, thank you so much for your consideration. Here are snippets of data that I hope will be helpful WHP geo1a <- geo1[, c(2:5)] <-- eliminating ID which is not useful for my purposes anyway #This is for R-Help use geo1a <- geo1a %>% top_n(25) state city latitude longitude 1 ME FAIRFIELD 44.64485 -69.65948 2 ME JONESPORT 44.57935 -67.56743 3 ME CASWELL 46.97529 -67.83023 4 ME ELLSWORTH 44.52916 -68.38717 5 ME VASSALBORO 44.45095 -69.60629 6 ME UNION 44.20059 -69.26123 7 ME PALERMO 44.45142 -69.41115 8 ME ORONO 44.87426 -68.68327 9 ME SANGERVILLE 45.10138 -69.33580 10 ME ISLESBORO 44.29015 -68.90812 11 ME TOPSHAM 43.93600 -69.96565 12 ME FREEPORT 43.84089 -70.11160 13 ME SKOWHEGAN 44.76687 -69.71644 14 ME MILLINOCKET 45.65501 -68.70261 15 ME ORRINGTON 44.72417 -68.74026 16 ME ST. GEORGE 43.96726 -69.20827 17 ME FORT FAIRFIELD 46.80911 -67.88079 18 ME MARS HILL 46.56580 -67.89006 19 ME FREEPORT 43.85302 -70.03726 20 ME EASTON 46.64143 -67.91203 21 ME WATERVILLE 44.53621 -69.65913 22 ME BRUNSWICK 43.87771 -69.96297 23 ME BRUNSWICK 43.91719 -69.89905 24 ME BUCKSPORT 44.60665 -68.81892 25 ME FAYETTE 44.46380 -70.12047 trnd1_tbla <- trnd1_tbl %>% top_n(25) print(trnd1_tbla) head(trnd1_tbla,n=25) A tibble: 25 x 5 city state Basecountsum Basecount2 prop_of_total <fct> <fct> <dbl> <dbl> <dbl> 1 ATLANTA GA 2352 12 0.00510 2 BRADENTON FL 2352 8 0.00340 3 BROOKLYN NY 2352 30 0.0128 4 CHARLOTTE NC 2352 8 0.00340 5 CHICAGO IL 2352 17 0.00723 6 COLUMBUS OH 2352 11 0.00468 7 CUMMING GA 2352 8 0.00340 8 DALLAS TX 2352 8 0.00340 9 ERIE PA 2352 12 0.00510 10 HOUSTON TX 2352 12 0.00510 # ... with 15 more rows WHP From: Eric Berger <ericjberger at gmail.com<mailto:ericjberger at gmail.com>> Sent: Tuesday, May 12, 2020 8:39 AM To: Poling, William <PolingW at aetna.com<mailto:PolingW at aetna.com>> Cc: r-help at r-project.org<mailto:r-help at r-project.org> Subject: [EXTERNAL] Re: [R] Help with Kmeans output and using broom to tidy etc.. **** External Email - Use Caution **** Can you create a reproducible example? Your question involves objects that are unknown to us. (geo1, trnd1_tbl) On Tue, May 12, 2020 at 2:41 PM Poling, William via R-help <mailto:r-help at r-project.org<mailto:r-help at r-project.org>> wrote: #RStudio Version Version 1.2.1335 need this one--> 1.2.5019 sessionInfo() # R version 4.0.0 Patched (2020-05-03 r78349) #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows 10 x64 (build 17763) Hello: I have data that I am trying to manipulate for Kmeans clustering. Original data looks like this str(geo1) # 'data.frame': 2352 obs. of 5 variables: # $ ID: Factor w/ 2352 levels "101040199600",..: 590 908 976 509 1674 690 1336 86 726 1702 ... # $ state : Factor w/ 41 levels "AL","AR","AZ",..: 32 10 25 11 9 32 13 31 12 12 ... # $ city : Factor w/ 1337 levels "ABBOTTSTOWN",..: 932 156 230 698 965 1330 515 727 1127 1304 ... # $ latitude : num 40.4 31.2 40.8 42.1 26.8 ... # $ longitude : num -79.9 -81.5 -74 -91.6 -82.1 ... I created a subset adding column prop_of_total str(trnd1_tbl) tibble [1,457 x 5] (S3: tbl_df/tbl/data.frame) $ city : Factor w/ 1337 levels "ABBOTTSTOWN",..: 1 2 3 4 5 6 7 8 9 10 ... $ state : Factor w/ 41 levels "AL","AR","AZ",..: 32 36 10 28 12 36 10 11 26 38 ... $ Basecountsum : num [1:1457] 2352 2352 2352 2352 2352 ... $ Basecount2 : num [1:1457] 1 1 1 1 1 2 1 1 2 1 ... $ prop_of_total: num [1:1457] 0.000425 0.000425 0.000425 0.000425 0.000425 ... Then I spread it trnd2_tbl <- trnd1_tbl %>% dplyr::select(city, state, prop_of_total) %>% spread(key = city, value = prop_of_total, fill = 0) #remove the NA's with fill str(trnd2_tbl)#tibble [41 x 1,338] (S3: tbl_df/tbl/data.frame) Then I run a Kmeans kmeans_obj1 <- trnd2_tbl %>% dplyr::select(- state) %>% kmeans(centers = 20, nstart = 100) str(kmeans_obj1) List of 9 $ cluster : int [1:41] 11 11 9 11 11 4 11 11 16 2 ... $ centers : num [1:20, 1:1337] 0 0 0 0 0 0 0 0 0 0 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : chr [1:20] "1" "2" "3" "4" ... .. ..$ : chr [1:1337] "ABBOTTSTOWN" "ABILENE" "ACWORTH" "ADAMS" ... $ totss : num 0.00158 $ withinss : num [1:20] 0 0 0 0 0 0 0 0 0 0 ... $ tot.withinss: num 0.0000848 $ betweenss : num 0.0015 $ size : int [1:20] 1 1 1 1 1 1 1 1 1 1 ... $ iter : int 3 $ ifault : int 0 - attr(*, "class")= chr "kmeans" Then I go and try to tidy: #Tidy, glance, augment #Just makes it easier to use or view the obj's in the obj list broom::tidy(kmeans_obj1) %>% glimpse() broom::glance(kmeans_obj1) ##A tibble: 1 x 4 # totss tot.withinss betweenss iter # <dbl> <dbl> <dbl> <int> # 1 0.00158 0.0000848 0.00150 3 However, when I run this piece I get an error: broom::augment(kmeans_obj1, trnd2_tbl) %>% dplyr::select(city, .cluster) #Error: Must subset columns with a valid subscript vector. # The subscript has the wrong type `data.frame< # u: double # x: double>`.i It must be numeric or character. Here is the back trace: rlang::last_error() # Backtrace: # 1. broom::augment(kmeans_obj1, trnd2_tbl) # 9. dplyr::select(., city, .cluster) # 11. tidyselect::vars_select(tbl_vars(.data), !!!enquos(...)) # 12. tidyselect:::eval_select_impl(...) # 20. tidyselect:::vars_select_eval(...) # 21. tidyselect:::walk_data_tree(expr, data_mask, context_mask) # 22. tidyselect:::eval_c(expr, data_mask, context_mask) # 23. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init) # 24. tidyselect:::walk_data_tree(new, data_mask, context_mask) # 25. tidyselect:::as_indices_sel_impl(...) # 26. tidyselect:::as_indices_impl(x, vars, strict = strict) # 27. vctrs::vec_as_subscript(x, logical = "error") I am not sure what I am supposed to fix? Maybe someone has had similar error and can advise me please? Thank you. WHP Proprietary NOTICE TO RECIPIENT OF INFORMATION:\ This e-mail may con...{{dropped:16}} ______________________________________________ mailto:R-help at r-project.org<mailto:R-help at r-project.org> mailing list -- To UNSUBSCRIBE and more, see https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=DwMFaQ&c=wluqKIiwffOpZ6k5sqMWMBOn0vyYnlulRJmmvOXCFpM&r=j7MrcIQm2xjHa8v-2mTpmTCtKvneM2ExlYvnUWbsByY&m=sMhCVDVDKajwJ9te2qVsWXQ2aq4kAe7150EICM51Pw4&s=eSV6ISkAsnmonaRvNdtmx4Lr9vumgXwMYF87DoRP86s&ePLEASE do read the posting guide https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwMFaQ&c=wluqKIiwffOpZ6k5sqMWMBOn0vyYnlulRJmmvOXCFpM&r=j7MrcIQm2xjHa8v-2mTpmTCtKvneM2ExlYvnUWbsByY&m=sMhCVDVDKajwJ9te2qVsWXQ2aq4kAe7150EICM51Pw4&s=8wmXM73ofNcrn1i9gF-qxOzj7zRJZSPcaA5qg0vggG4&eand provide commented, minimal, self-contained, reproducible code. Proprietary NOTICE TO RECIPIENT OF INFORMATION: This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. This e-mail may also contain protected health information (PHI) with information about sensitive medical conditions, including, but not limited to, treatment for substance use disorders, behavioral health, HIV/AIDS, or pregnancy. This type of information may be protected by various federal and/or state laws which prohibit any further disclosure without the express written consent of the person to whom it pertains or as otherwise permitted by law. Any unauthorized further disclosure may be considered a violation of federal and/or state law. A general authorization for the release of medical or other information may NOT be sufficient consent for release of this type of information. Thank you. Aetna Proprietary NOTICE TO RECIPIENT OF INFORMATION: This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. This e-mail may also contain protected health information (PHI) with information about sensitive medical conditions, including, but not limited to, treatment for substance use disorders, behavioral health, HIV/AIDS, or pregnancy. This type of information may be protected by various federal and/or state laws which prohibit any further disclosure without the express written consent of the person to whom it pertains or as otherwise permitted by law. Any unauthorized further disclosure may be considered a violation of federal and/or state law. A general authorization for the release of medical or other information may NOT be sufficient consent for release of this type of information. Thank you. Aetna [[alternative HTML version deleted]]