ipumspy.api.UsaExtract

class ipumspy.api.UsaExtract(samples, variables, description='My IPUMS USA extract', data_format='fixed_width', **kwargs)[source]

Defining an IPUMS USA extract.

Parameters
  • samples (List[str]) – list of IPUMS USA sample IDs

  • variables (List[str]) – list of IPUMS USA variable names

  • description (str) – short description of your extract

  • data_format (str) – fixed_width and csv supported

Attributes

collection

Name of an IPUMS data collection

extract_id

The extract id associated with this extract, assigned by the IpumsApiClient

extract_info

The API response recieved by the IpumsApiClient

Methods

__init__

Defining an IPUMS USA extract.

build

Convert the object into a dictionary to be passed to the IPUMS API as a JSON string

from_api_response

rtype

UsaExtract