Why search all of geonames if you know the state(s) of interest? This uses a database connection rather than relying on reading the entire 2.3M rows of geonames from file.
1 | gndb_search_state(con, text, states)
|
con |
A db connection from DBI or a tbl object; the tbl is preferred |
text |
Text to be searched for geonames; should be 'clean,' i.e., no eol characters, multi-spaces replaced with singles, etc. |
state |
Two-letter state abbreviation, e.g., VA for Virginia |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.