tidycensus | Load US Census boundary and attribute data as 'tidyverse' and 'sf'-ready data frames in R | Data Visualization library

 by   walkerke R Version: 1.0 License: Non-SPDX

kandi X-RAY | tidycensus Summary

kandi X-RAY | tidycensus Summary

tidycensus is a R library typically used in Analytics, Data Visualization applications. tidycensus has no bugs, it has no vulnerabilities and it has low support. However tidycensus has a Non-SPDX License. You can download it from GitHub.

tidycensus is an R package that allows users to interface with the US Census Bureau's decennial Census and five-year American Community APIs and return tidyverse-ready data frames, optionally with simple feature geometry included. Install from CRAN with the following command:. To learn more about the package, please visit the package documentation at Note: This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              tidycensus has a low active ecosystem.
              It has 568 star(s) with 79 fork(s). There are 22 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 10 open issues and 409 have been closed. On average issues are closed in 34 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of tidycensus is 1.0

            kandi-Quality Quality

              tidycensus has 0 bugs and 0 code smells.

            kandi-Security Security

              tidycensus has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              tidycensus code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              tidycensus has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              tidycensus releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 10421 lines of code, 0 functions and 165 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tidycensus
            Get all kandi verified functions for this library.

            tidycensus Key Features

            No Key Features are available at this moment for tidycensus.

            tidycensus Examples and Code Snippets

            No Code Snippets are available at this moment for tidycensus.

            Community Discussions

            QUESTION

            knitr::include_graphics() doesn't render figure with `bookdown`
            Asked 2022-Mar-28 at 17:25

            I'm trying to write up a report and simply want to include a .jpeg image in my write up. However, whenever i knit together my document, I get the following error:

            ...

            ANSWER

            Answered 2022-Mar-28 at 17:25

            I had the same issue and it seems you will need to pass the absolute path. See this .

            Instead of using here maybe try using normalizePath in include_graphics.

            So omit your call here(), which may not be propagating across chunks (I don't know, because I can't see your chunks), and do:

            Source https://stackoverflow.com/questions/68643668

            QUESTION

            Trouble installing package "sf" in R (Big Sur)
            Asked 2022-Mar-23 at 00:59

            I tried to install the sf package because it is a dependency for tidycensus, which is the package I'd like to use. I am using a Mac with Big Sur. Per the Github for r-spatial, I tried following the installation instructions here but no dice. My sessionInfo():

            ...

            ANSWER

            Answered 2022-Mar-23 at 00:59

            The solution, thanks to @IRTFM, was to download the binary from CRAN, then use R CMD INSTALL. Then I could install tigris and tidycensus via install.packages()

            Source https://stackoverflow.com/questions/71564871

            QUESTION

            Capturing the range indicated by the use of "to" in a column - tidycensus (U.S. Census API)
            Asked 2022-Feb-15 at 03:06

            How might I capture all the years of age in a column with values like "20 to 24 years" for one group and "22 to 24 years" for another group? This will enable me to confirm I have all the working age (18-64) variable names captured in a tidycensus (R package) U.S. Census API query.

            Goal

            What I want is, for ages 20-24 in this example, a data frame that extracts the ages from label entries like "22 to 24 years":

            ...

            ANSWER

            Answered 2022-Feb-04 at 21:55

            I tend to do this in two steps. The first step specifies some characteristic in a metadata file. The second step applies the metadata to the problem.

            It looks like you'll need to approximate some, because the levels don't cleanly fit your boundaries. For example, "15 to 19 years old" straddles 18.

            (To keep things simpler, I'm assuming you'll never want to keep the "20 to 24 years" level, but exclude the "20 to 24 years old" level.

            Source https://stackoverflow.com/questions/70976047

            QUESTION

            Resolving this error: "cannot transform sfc object with missing crs"
            Asked 2022-Feb-04 at 17:21

            I am attempting to outline a specific grouping of census tracts over entire US states.

            This is the code I am attempting to run:

            ...

            ANSWER

            Answered 2022-Feb-04 at 17:21

            Your arlington.test object seems to be in EPSG:4269; you attempted to override it to WGS 84 via sf::st_set_crs(4326). Are you certain you did not mean sf::st_transform(4326)?

            The set crs is best reserved for cases you are certain the CRS is malformed / incorrect (it can happen when the *.prj gets lost from your *.shp shapefile). This is not a typical use case for {tidycensus} data.

            To change projection from one known CRS to another sf::st_transform() works the best.

            Source https://stackoverflow.com/questions/70989790

            QUESTION

            Census data extraction for time series
            Asked 2021-Nov-10 at 15:52

            I am trying to download the average population for AZ counties using tidycensus, using the code below. How can I download population data for a time series period from 2000-2019 (interpolating for years that do not have decennial census or acs data)

            ...

            ANSWER

            Answered 2021-Nov-10 at 15:52

            You can use the tidycensus function, get_estimates() to get population estimates by county for each year beginning in 2010.

            Source https://stackoverflow.com/questions/69814369

            QUESTION

            Base R split() function causing "error in unique.default(x, nmax = nmax)
            Asked 2021-Sep-03 at 02:30

            I am working with tidycensus and segregation to do an analysis.

            To create my data, I am running this:

            ...

            ANSWER

            Answered 2021-Sep-03 at 02:30

            Based on the code showed, the split is a base R function which can extract the column with $ or [[ or use with. As 'Inglewood' is not showed in the dput data, we use "Roseville"

            Source https://stackoverflow.com/questions/69038796

            QUESTION

            How do I accurately aggregate subgroup margin of error values using tidycensus and tidyverse?
            Asked 2021-Jun-04 at 11:28

            I am trying to calculate the population under 20 by race for each county in MN using the American Community Survey in R. Using Tidycensus I am aware this can be done using the B01001H variables for each race and age group in R. However I would need to aggregate all the variables for those under 20 for each racial group. According to this webpage (https://www.census.gov/content/dam/Census/library/publications/2018/acs/acs_general_handbook_2018_ch08.pdf) while aggregating the estimates is merely the sum of each of the subgroup values, aggregating the margin of error requires I calculate this formula:

            ...

            ANSWER

            Answered 2021-Jun-01 at 03:36

            Instead of summarise and join you can use mutate to add new columns in the data directly.

            Source https://stackoverflow.com/questions/67780891

            QUESTION

            Troubleshooting why ggplot() isn't plotting datase
            Asked 2021-Feb-07 at 00:54

            I have been working with some tidycensus data for an assignment and have gotten to the point where trying to generate a smooth line graph isn't plotting my dataset.

            My current code is:

            ...

            ANSWER

            Answered 2021-Feb-07 at 00:54

            So I figured out what I was doing wrong! Apparently, my dataset listed for the graph generation was one that was calculating averages for other problems on the assignment. It consisted of single averaged observations.

            So the fix to this was to go back to my originally cleaned dataset and change the parameters to reflect the old variables before averages were taken.

            Source https://stackoverflow.com/questions/66082740

            QUESTION

            How do I create a dummy variable that depends on values in multiple columns?
            Asked 2020-Nov-28 at 14:29

            I am trying to create a treatment dummy for the states whose 1970 legal1820 is different from their legal1820 in 1979. So I need the proper syntax for somethihng like this treat = ifelse((legal1820 when (year == 1970)) != (legal1820 when (year == 1979)) , 1,0)

            this is the data I am using

            ...

            ANSWER

            Answered 2020-Nov-28 at 14:29

            Is this what you are looking for?

            Source https://stackoverflow.com/questions/65050542

            QUESTION

            How to shade shapes
            Asked 2020-Sep-26 at 12:32

            Is it possible to use ggrough (https://xvrdm.github.io/ggrough/index.html) to shade shapes created by geom_sf (preferred) or potentially geom_polygon? See this question for a prior question that gives the look of the plot I have in mind and the accompanying answer by Z.Lin that modifies the package to make it compatible with the current version of ggplot2: Unable to replicate this ggplot2 plot.

            Here is a MWE of a map created using geom_sf that I would like to shade (each individual county) using ggrough:

            ...

            ANSWER

            Answered 2020-Sep-26 at 12:32
            library(magrittr)
            library(ggplot2)
            library(ggrough)
            

            Source https://stackoverflow.com/questions/64031046

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install tidycensus

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/walkerke/tidycensus.git

          • CLI

            gh repo clone walkerke/tidycensus

          • sshUrl

            git@github.com:walkerke/tidycensus.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link