GithubHelp home page GithubHelp logo

jenniferpeebles / finding_people_born_in_a_foreign_country_in_census_data Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 23 KB

An R script for finding statistics about foreign-born people from a certain country in Census (American Community Survey) data using the Census API and tidycensus

finding_people_born_in_a_foreign_country_in_census_data's Introduction

Finding people born in a given foreign country in Census data

An R script for finding statistics about foreign-born people from a certain country in Census (American Community Survey) data using the Census API and tidycensus

This script uses the R programming language to find the numbers and percentages of the populations of the U.S., your state, your county, your MSA and/or your city who were born in a certain foreign country.

About the data

All data in this summary is from the 2019 5-year averages of the American Community Survey done by the U.S. Census Bureau.

To use this script, you will need a free API key from the Census. You can request one at this link.

ACS data is usually released about a year behind. ACS data for 2019 was released in calendar year 2020. Specifically, the 5-year ACS data is usually released in December, and the 5-year ACS data for 2019 was released in December 2020.

The 5-year average data averages each metric over the previous five years to provide a less herky-jerky result than would be provided with annual data releases. Why do we use the 5-year average data? The Census Bureau only publishes 1-year data for the largest cities and counties in America. For everybody else, we have to use the 5-year data -- or nothing.

ACS data is an estimate. The confidence interval is 90%. The Census Bureau publishes margins of error for each metric presented here. Always remember, the smaller the sample the estimate is taken from, the wider the margin of error.

Much of the data in this summary specifically comes from ACS table B05006, which you can read more about at here, "Place of Birth for the Foreign-Born Population in the United States." (If you are in Puerto Rico, you can check out table B05006PR_001, which is "Place of Birth for the Foreign-Born Population in Puerto Rico.")

About this script

This script will retrieve data from the Census Bureau's online data repositories using the Census's Application Programming Interface (API) and the tidycensus package of the R programming language written by Kyle Walker.

The script uses a number of R packages including the tidyverse family of packages created by Hadley Wickham et al. Thank you to the brilliant people behind these packages who wrote all the code and keep it maintained.

The summary the script produces, or can produce, uses the knitr package and R Markdown. The text in this README file, in the script and in the knitted summary has not been copy edited, so please forgive all typos and style errors.

Like most of the code you'll find here on GitHub, this is a work in progress. As a relative newcomer to R, I'm sure there are more elegant ways to do many things I do here. All suggestions are welcome.

finding_people_born_in_a_foreign_country_in_census_data's People

Contributors

jenniferpeebles avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.