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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.