CenterOnBudget / getcensus

Load American Community Survey data from the U.S. Census Bureau API into Stata
https://centeronbudget.github.io/getcensus/
MIT License
14 stars 3 forks source link

Issues with "product" option #14

Closed shingtgen closed 4 years ago

shingtgen commented 4 years ago

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.

c-zippel commented 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.

shingtgen commented 4 years ago

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:

Under examples:

Thanks for your great work on this!

c-zippel commented 4 years ago

Excellent thoughts. We should rework the help file.