A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pdil/usmap/issues/33 below:

usmap_transform improvements · Issue #33 · pdil/usmap · GitHub

Improve data input flexibility

Currently the data frame that is passed to usmap_transform must have longitude in the first column and latitude in the second column. It might be more natural to allow columns in any order that have the names lon/long/longitude and lat/latitude.

There can also be two optional parameters to specify the longitude/latitude column names.

For example:
If a data.frame contains columns "x" and "y" instead,
usmap_transform(data, longitude_name = "x", latitude_name = "y")

Improve data output

Currently the output data frame contains 4 columns: the two input columns followed by the two output columns. The output columns have the same name as the input columns but with a .1 appended to the end. This does not allow for intuitive use of the function as someone would have to inspect and notice the differences manually.

It might be better include an optional parameter that allows replacement of the input columns (i.e. input data frame has 2 columns named "lon" and "lat", and the output data frame has the same 2 columns, with data transformed). If all 4 columns are to be included in the output, a better convention might be to append _tf or prefix transformed_, etc. (TBD)

Other Fixes

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4