<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://acsdatacommunity.prb.org/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/discussion-forum/f/forum/706/working-with-census-api-and-acs-5-year-data</link><description> &amp;#39;ve just started working with Census APIs, and so far I&amp;#39;m loving what this can do to improve my work flow when working with American Community Survey Data. 
 For most of the data work I&amp;#39;m doing, my primary geographic level is the county subdivision.</description><dc:language>en-US</dc:language><generator>Telligent Community 11</generator><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1763?ContentTypeID=1</link><pubDate>Sun, 11 Apr 2021 15:28:23 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:6ee3f1a8-151a-48b9-be22-9eb21dcda246</guid><dc:creator>Nick C</dc:creator><description>&lt;p&gt;Yep, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1762?ContentTypeID=1</link><pubDate>Sun, 11 Apr 2021 15:16:39 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:489f4020-6d0e-4545-8862-89b20a005b69</guid><dc:creator>Matt Herman</dc:creator><description>&lt;p&gt;Does this work?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://join.slack.com/t/uscensusbureau/shared_invite/zt-optzh7xs-ApNgf5Yqbo_u2ANXQv67cQ"&gt;https://join.slack.com/t/uscensusbureau/shared_invite/zt-optzh7xs-ApNgf5Yqbo_u2ANXQv67cQ&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not sure why the links keep expiring!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1760?ContentTypeID=1</link><pubDate>Sat, 10 Apr 2021 20:40:55 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:6e3ed998-18da-4788-931b-f91ba6b33fbe</guid><dc:creator>Nick C</dc:creator><description>&lt;p&gt;Hi Matt, I am also trying to join the Slack but none of the links in this thread work.&amp;nbsp; They all require me to have a @census.gov email address.&amp;nbsp; I was wondering if you could send a new invite link so I could join.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1739?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 15:59:21 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:cd540443-1b55-4229-9411-7da61eff3b5d</guid><dc:creator>Douglas Hall</dc:creator><description>&lt;p&gt;Thanks, btw, Matt. There were some issues getting into the Slack group, but I&amp;#39;m there now. I appreciate all the resources and support I can get! Cheers, Doug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1718?ContentTypeID=1</link><pubDate>Tue, 16 Mar 2021 15:25:47 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:88e1fc93-2972-4c7f-8093-d1a61141622c</guid><dc:creator>Matt Herman</dc:creator><description>&lt;p&gt;Interesting about the speed difference between tidycensus and censusapi. I wonder if that is in the parsing of the API response -- if I have some time, I&amp;#39;ll check it out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As to wildcards for all block groups, we got an &lt;a href="https://github.com/walkerke/tidycensus/issues/316"&gt;issue tracking tha&lt;/a&gt;t and hope to implement it at some point soon!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1716?ContentTypeID=1</link><pubDate>Sun, 14 Mar 2021 21:35:16 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:b1dac479-d48e-4613-985d-a964f446b259</guid><dc:creator>Dom Brassey</dc:creator><description>&lt;p&gt;That worked &amp;ndash; thank you so much, Matt!&lt;/p&gt;
&lt;div style="display:none;" id="highlighter--hover-tools"&gt;
&lt;div id="highlighter--hover-tools--container"&gt;
&lt;div class="highlighter--icon highlighter--icon-copy" title="Copy"&gt;&lt;/div&gt;
&lt;div class="highlighter--separator"&gt;&lt;/div&gt;
&lt;div class="highlighter--icon highlighter--icon-change-color" title="Change Color"&gt;&lt;/div&gt;
&lt;div class="highlighter--separator"&gt;&lt;/div&gt;
&lt;div class="highlighter--icon highlighter--icon-delete" title="Delete"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1715?ContentTypeID=1</link><pubDate>Sat, 13 Mar 2021 20:19:10 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:00c67fee-9146-489e-8905-d516a3e3d10a</guid><dc:creator>Matt Herman</dc:creator><description>&lt;p&gt;Interesting! Looks like those links are dead. Can you try this link:&amp;nbsp;&lt;a href="https://join.slack.com/t/uscensusbureau/shared_invite/zt-mypta05e-LR87zxmoSNJb~0YABKlafQ"&gt;https://join.slack.com/t/uscensusbureau/shared_invite/zt-mypta05e-LR87zxmoSNJb~0YABKlafQ&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That is an invite link I was able to create from Slack.&lt;/p&gt;
&lt;p&gt;Either way I&amp;rsquo;ll let Logan at Census know the link on the developer page isn&amp;rsquo;t working.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1714?ContentTypeID=1</link><pubDate>Sat, 13 Mar 2021 01:00:55 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:cca31203-eb30-4910-94cc-af0dd475e112</guid><dc:creator>Dom Brassey</dc:creator><description>&lt;p&gt;Hi Matt! Do you think you could ping the admin to have them change the settings? I&amp;#39;m trying to join the Slack workspace but it does require a&amp;nbsp;&lt;span&gt;@census.gov email address:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Don&amp;rsquo;t have an @census.gov email address?&lt;br /&gt;Contact the workspace administrator at U.S. Census Bureau for an invitation.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying these entry points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://uscensusbureau.slack.com/signup#/"&gt;https://uscensusbureau.slack.com/signup#/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.census.gov/data/developers.html"&gt;https://www.census.gov/data/developers.html&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="display:none;" id="highlighter--hover-tools"&gt;
&lt;div id="highlighter--hover-tools--container"&gt;
&lt;div class="highlighter--icon highlighter--icon-copy" title="Copy"&gt;&lt;/div&gt;
&lt;div class="highlighter--separator"&gt;&lt;/div&gt;
&lt;div class="highlighter--icon highlighter--icon-change-color" title="Change Color"&gt;&lt;/div&gt;
&lt;div class="highlighter--separator"&gt;&lt;/div&gt;
&lt;div class="highlighter--icon highlighter--icon-delete" title="Delete"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1712?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 19:12:35 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:92581619-0422-459e-b2e2-84a7937d939f</guid><dc:creator>Matt Schroeder</dc:creator><description>&lt;p&gt;tidycensus has lots more to recommend it--more output options, getting spatial data in the same query, etc. And if you want block group data, which needs to be queried county-by-county, tidycensus will&amp;nbsp;do this in one query and combine the results.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There&amp;#39;s also the &lt;a href="https://cran.r-project.org/web/packages/censusapi/vignettes/getting-started.html"&gt;censusapi package&lt;/a&gt;, which allows access to a wider variety of datasets but is more stripped-down in that you need to format arguments exactly as the API&amp;nbsp;requires--for example, using FIPS codes directly instead of having tidycensus translate state/county abbreviations/names for you). The advantage is that censusapi tends to be around 25%-50% faster in my experience, though I haven&amp;#39;t done any formal benchmarking. In absolute terms, this doesn&amp;#39;t matter much--only 1-3 seconds per query--but that can&amp;nbsp;still result in substantial time savings if you need data for several tables and/or geographic levels.&lt;/p&gt;
&lt;p&gt;I know this isn&amp;#39;t an R forum, but since you expressed interest: working with the Census Bureau API really helped me learn more R, especially in writing functions and understanding the many capabilities of the &lt;a href="https://purrr.tidyverse.org/"&gt;purrr package&lt;/a&gt;. In addition to map_dfr(), which Matt H used above to append data for multiple geographic levels, map_dfc() will join data for multiple tables (but to be on the safe side, you&amp;#39;ll want to make sure whatever function you&amp;#39;re using will sort the data that map_dfc() combines, because&amp;nbsp;you can&amp;#39;t specify a join-by variable).&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;
&lt;p&gt;~~~ Edit 15 minutes later: I just realized that &lt;a href="https://github.com/hrecht/censusapi/issues/71#issuecomment-724331614"&gt;it&amp;#39;s now possible to put wildcard characters&lt;/a&gt;&amp;nbsp;in the query, which (for example) will let you get block groups for an entire state at once rather than county-by-county. This seems to magnify the time savings of censusapi over tidycensus. It doesn&amp;#39;t solve the initial problem of combining data from multiple geographic levels, but it seemed worth mentioning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1711?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 18:23:28 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:bd44f62d-9e3b-46a0-a5b6-93f60090e12e</guid><dc:creator>Matt Herman</dc:creator><description>&lt;p&gt;You should be able to join the Census slack with any email address -- it&amp;#39;s for API users and there are some Census staff that answer questions. If that link isn&amp;#39;t working, try the link at the top of this page:&amp;nbsp;&lt;a href="https://www.census.gov/data/developers.html"&gt;https://www.census.gov/data/developers.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Good luck on your R journey! If you haven&amp;#39;t already found it, R for Data Science is my favorite resource for learning R: &lt;a href="https://r4ds.had.co.nz/"&gt;https://r4ds.had.co.nz/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1710?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 18:13:29 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:30d69925-fdbb-47ce-b088-c95859beeb7e</guid><dc:creator>Douglas Hall</dc:creator><description>&lt;p&gt;Thanks, Matt. I&amp;#39;m definitely a newbie with R but will bookmark your reply so I can use this format when I get to that point of the learning curve! (As for the Census Bureau Slack channel, I&amp;#39;m definitely interested, but have to figure out how to navigate the process without a Census Bureau email address). Cheers, Doug.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working With Census API and ACS 5-year data</title><link>https://acsdatacommunity.prb.org/thread/1709?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 17:59:57 GMT</pubDate><guid isPermaLink="false">3e86467a-1916-4e54-a922-55a4945229ec:d1f92b10-8e68-46ae-ba7a-083ddd04313f</guid><dc:creator>Matt Herman</dc:creator><description>&lt;p&gt;&lt;span&gt;As far as I know, you can only request a single geography in each API call. But the structure of the calls and the data returned are consistent, so you could write a for loop or use other functions to iterate through each geography you want and create the API calls. You don&amp;#39;t mention how you are accessing the API, but if you are an R user, I highly recommend&amp;nbsp;the &lt;a href="https://walker-data.com/tidycensus/"&gt;tidycensus&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;a href="https://walker-data.com/tidycensus/"&gt;package&lt;/a&gt;, which wraps the API in a pretty easy interface and pulls the data directly into.&lt;/p&gt;
&lt;p&gt;Here for example is one way to get data for county subdivision, county, and state using R and tidycensus:&lt;/p&gt;
&lt;p&gt;geos &amp;lt;- c(&amp;quot;state&amp;quot;, &amp;quot;county&amp;quot;, &amp;quot;county subdivision&amp;quot;)&lt;/p&gt;
&lt;p&gt;purrr::map_dfr(&lt;br /&gt; geos,&lt;br /&gt; ~ tidycensus::get_acs(&lt;br /&gt; geography = .x,&lt;br /&gt; state = &amp;quot;MA&amp;quot;,&lt;br /&gt; variables = &amp;quot;B01003_001&amp;quot;,&lt;br /&gt; survey = &amp;quot;acs5&amp;quot;,&lt;br /&gt; year = 2019&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;There also is a &lt;a href="https://uscensusbureau.slack.com/home"&gt;Cenus Slack channel&lt;/a&gt;&amp;nbsp;which is a good place to ask questions about using Census APIs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>