Process city file

Share:

Description

This function takes the dataframe read in from the file specified with citycsv in gen_hw_set and renames the columns for latitude and longitude lat and lon, based on the user's selections in lat_lon_colnames for gen_hw_set. If there are extra columns besides those and the city column, this function removes them.

Usage

1
process_cities_file(cities, lat_lon_colnames)

Arguments

cities

Dataframe with study cities and their latitudes and longitudes.The dataframe must have a column named city with a unique identifier for each city in the study, as well as columns for latitude and longitude. Other columns may be included in the dataset, but will not be passed through to later code.

lat_lon_colnames

A character vector of length two with the column names in the citycsv dataframe for latitude (first vector element) and longitude (second vector element)

Value

A processed version of the latitude and longitude dataframe.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.