-2

I keep receiving this error message when attempting to use functions such as get_county_demographics or get_acs_data:

Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : 'data' must be of a vector type, was 'NULL'

Has anyone else encountered this?

MLavoie
  • 9,671
  • 41
  • 36
  • 56
  • You should provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data that shows how you are calling the function. – MrFlick Sep 23 '16 at 22:01

1 Answers1

0

Thank you for using choroplethr.

This error normally indicates that you have not set a Census API key. So the internal calls to get data from the Census API are returning NULL, and not real data.

Try the following:

  1. Get a Census API key by going here
  2. Type the following:

library(acs); api.key.install('<your census api key>');

Then try to run you code again.

Ari
  • 1,819
  • 14
  • 22