As of v0.6.0, ipumsr only supports IPUMS API version 2. If you have stored
an extract definition made using version beta or version 1 of the IPUMS
API, you will not be able to load it using define_extract_from_json()
. The
API version for the request should be stored in the saved JSON file. (If
there is no "api_version"
or "version"
field in the JSON file, the
request was likely made under version beta or version 1.)
If the extract definition was originally made under your user account and
you know its corresponding extract number, use get_extract_info()
to obtain
a definition compliant with IPUMS API version 2. You can then save this
definition to JSON with save_extract_as_json()
.
Otherwise, you will need to update the JSON file to be compliant with
IPUMS API version 2. In general, this should only require renaming
all JSON fields written in snake_case
to camelCase
. For instance,
"data_tables"
would become "dataTables"
, "data_format"
would become
"dataFormat"
, and so on. You will also need to change the "api_version"
field to "version"
and set it equal to 2
. If you are unable to create
a valid extract by modifying the file, you may have to recreate the
definition manually using the define_extract_micro()
or
define_extract_nhgis()
.
See the IPUMS developer documentation for more details on
API versioning and
breaking changes
introduced in version 2.