Closed shingtgen closed 4 years ago
Whenever the user specifies both product and a table name / list of estimates, getcensus ignores the product type and figures it out based on the latter. Intended to cope with instances where the table/estimates do not come from the product. The "Program will derive product from 'estimates' and ignore 'product'" message is factually correct but it's unclear what the user is supposed to do with the information. What if we rephrased it to be more casual; something like: "Tip: If you're passing a table name or list of estimates to getcensus, there's no need to use the product option. The program will figure out the product you need." @vmsaenz thoughts? Re: The link to the API call. I had closed #1 thinking I'd fixed it...darn. I'll reopen.
Hi Claire,
Thinking about this further, I find the purpose of the product option a bit confusing, and I think the help info is contributing to this (it seems contradictory in places... although it's also entirely possible I'm misunderstanding something). I've pasted snippets of the help below, with my comments in italics.
Under description:
Under options:
product(string) Two-letter acronym representing product type of table. For example, Table B19013 is a detailed table. This program will figure out the relevant product type for the table or estimate ID you pass. It is only necessary to pass a product when you pass a search term to getcensus catalog so that the program searches the correct dictionary (each product type has its own dictionary). [Does "search term" mean keyword? I'm not quite sure what this is saying, particularly given the examples below.]
table(string) Returns all estimate IDs and labels associated with a single table (e.g., B19013). If table is not a detailed table, pass the relevant product type (see "product" above). [This makes it sound like you should always use the product option when you want something other then a detailed table, and yet, it's apparently unnecessary to use product when you use the specific table ID.]
Under examples:
getcensus catalog, clear // loads full dictionary for detailed tables (click to run)
Thanks for your great work on this!
Excellent thoughts. We should rework the help file.
Hi,
I ran into some issues with the product option; I tried: . getcensus catalog, product(CT) table(C17024) clear
And got: Program will derive product from 'table' and ignore 'product' Searched for table C17024
Also tried: . getcensus catalog, product(DT) table(C17024) clear
And got: Program will derive product from 'table' and ignore 'product' Searched for table C17024
I then skipped the catalog search and tried: getcensus C17024_001 C17024_002 C17024_003 C17024_004 C17024_005 C17024_006 C17024_011 C17024_012 C17024_013 C17 024_014 C17024_015 C17024_020 C17024_021 C17024_022 C17024_023 C17024_024, years(2018) data(1) product ("CT") clear
And got the following: *Program will derive product from 'estimates' and ignore 'product' {browse "https://api.census.gov/data/2018/acs/acs1?get=C17024_001E,C17024_001M,C17024_002E,C17024_002M,C17024_003E,C17024_003M,C17024_004E,C17024_004M,C17024_005E,C17024_005M,C17024_006E,C17024_006M,C17024_011E,C17024_011M,C17024_012E,C17024_012M,C17024_013E,C17024_013M,C17024_014E,C17024_014M,C17024_015E,C17024_015M,C17024_020E,C17024_020M,C17024_021E,C17024_021M,C17024_022E,C17024_022M,C17024_023E,C17024_023M,C17024_024E,C17024_024M,NAME&for=state:&key=[key]": Link to data} (35 vars, 52 obs) For a discussion of how to interpret negative margins of error, see here.**
This did load the data correctly but did not provide the actual link to the data.