add_geodata: Add latitude and longitude information to a data frame

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/add_geodata.R


Accepts a data frame of 10K or 10Q address data. Geographical information is added based on the business zip code field 'zipba'. The data is taken from the parsed EDGAR list that the SEC provides.





A data frame in SEC's format


3 extra columns are added to the original data frame. The latitude and longitude information is obtained from a zipcode data file that is loaded internally. Any line that doesn't have a valid business zip code will get NA for its latitude and longitude.

The last column, 'companies', is a count of all of the rows in the data frame that contain the same business zip code. This gives an idea of how popular an area is, and can be used as an argument to a plot command to indicate the size of a plot point.


A data frame of the original columns, plus 3 extra columns: Lat Latitude of the business zip code Long Longitude of the business zip code companies Count of companies in the same zip code


You may want to run with routine with warning suppressed, since bad zip codes will generate NA values, and print an error message to the screen.


Nick Lukianoff



NickSEC/SECAddresses documentation built on May 9, 2017, 2:14 p.m.