Description Usage Arguments Details Examples
geocodr
This function batch geocodes csv files with the help of the ggmap package,
which uses the Google Maps API
1 2 |
in_csv |
A character object. The name of the input CSV file with a column of addresses. If the full path is not given, the function assumes the file is in cwd |
api_key |
A character object. The API key provided by Google Maps API. Geocoding will not work without it. |
address_col |
A character object containing the name of the address column in the input file. |
out_file |
A character object. The desired name of the output CSV file. If the full path is not given, the function puts the file in cwd. |
bg_map |
A character object. The background map that will be pulled from Google Maps to plot the geocoded points. Defaults to 'Canada'. |
components |
Logical. If TRUE, the postal code will be included as a separate variable in
the output file. Defaults to |
The function takes as input a csv file, one column of which contains addresses. The
addresses are geocoded, with lat and long appended as separate columns in the dataframe. Postal
code can also be added separately if the user specifies components = TRUE
. The resulting
dataframe is written to an output csv file beside the input file.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.