add_geodata: Add latitude and longitude information to a data frame

Description Usage Arguments Details Value Note Author(s) Examples

Description

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.

Usage

1

Arguments

x

A data frame in SEC's format

Details

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.

Value

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

Note

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.

Author(s)

Nick Lukianoff

Examples

1

NickSEC/SECAddresses documentation built on May 7, 2019, 6:07 p.m.