Questions tagged [demographics]

41 questions
0
votes
0 answers

I need to collect demographic data based on location

I need to collect demographic data based on location. Is google provide this?, or any one know api provide this data? anyone give me api to pull data from it? and if not found that how to get this data from any other sources
0
votes
0 answers

Selecting a random sample base with demographic divisions in HiveQL - Beeline

I'm using beeline hive here, and for the records I'm not a pro in SQL, but I make my way through. So, my task is create a sample database for an A/B study, (and so far so good) but the issue started when I've asked to sample based on demographic…
vsobz
  • 1
0
votes
1 answer

User_properties column is coming back as null in bigquery after export from GA4

I have a problem with a specific column in GA4-Bigquery. The User_properties column is coming in as null and I would like to get the demographic information including age and gender in bigquery. Doing some preliminary research, I've already verified…
0
votes
0 answers

Retrieve US population by zipcode

I am trying to use Census Bureau API to retrieve the United States population by zipcode. I have a valid key and followed this link but I wasn't able to retrieve population result, it kept fails with 404. Could anyone please help me to draft correct…
coffee_cat
  • 10
  • 1
0
votes
1 answer

Graphing Multiple Column Averages from Different dfs Representing Different Years

Below is a sample of the data: df_1 <- data.frame(total = c(0.9, 0.4, 0.2), white = c(0.6, 0.2, 0.1), black = c(0.3, 0.2, 0.1), immigrant = c(0.7, 0.3, 0.9)) df_2 <- data.frame(total = c(0.8, 0.7, 0.6), white = c(0.4, 0.3, 0.2), black = c(0.4, 0.4,…
Kimberly
  • 5
  • 2
0
votes
1 answer

Recoding race variables into multiracial category by group

I have been trying to learn the best way to recode variables in a column based on the condition of a name being associated with more than one race. I have been working with a dataframe like this: df <- data.frame('Name' = c("Jon", "Jon", "Bobby",…
snailwhale
  • 17
  • 5
0
votes
1 answer

Generate a multivariable table output for use in Excel from R

I have a data frame that looks like this: > head(hhinc_all) # A tibble: 6 × 6 # Groups: county, incgrp, hhsize, hhworker [6] county incgrp hhsize hhworker na.rm n 1…
themuse
  • 3
  • 1
0
votes
0 answers

Generate a three-way contingency table and output to Excel in R

I have the following dataframe: hhinc_all <-pumas %>% filter(hholder == 1) %>% group_by(county,incgrp, hhsize, hhworker) %>% dplyr::count(hhworker, wt = WGTP, na.rm = TRUE) The output: > head(hhinc_all) # A tibble: 6 × 6 # Groups: county,…
themuse
  • 3
  • 1
0
votes
1 answer

Creating a new column in a dataframe based on the answer choices in the other columns

I'm a bit confused on how to populate my new column based on character combinations I have from each of my other columns. Here is my original dataframe: df <- data.frame('Hispanic'=c("N", "Y", "N", "N"), 'Black'=c("Y", "N", "N", "Null"),…
snailwhale
  • 17
  • 5
0
votes
1 answer

Unexpected dply() output. Not grouping as desired

I am an R novice, using to attempt to analyze some demographic data for a plant species. My dataframe consists of: TagKey (unique identifier), Year (observation year), TagEstablished (year the plant was first found), and StageClass (0=dead,…
Emily Y
  • 5
  • 4
0
votes
1 answer

Finding a data source for demographics by zip code

does anyone know specific data sources that would provide demographics such as age or income by zip code? I was able to find specific regions like NYC or other locations but not all in one source. I checked the census data as well but was not…
data_queen
  • 35
  • 1
  • 5
0
votes
1 answer

Translating Stata code to R (creating flags and new variables) using ACS PUMS data

I have the following Stata code that I am needing to translate over to R (this code uses the 2019 5-year ACS PUMS file): /*Create a flag to identify workers in the household*/ gen worker=(wkl=="1") replace worker=. if wkl=="" /*Generate a variable…
0
votes
2 answers

error applying an age distribution from csv file

I just discovered an error in my model where I create a population with a household-size distribution and dependent age distribution. My problem is that my procedure doesn't seem to assign the probabilities for each outcome correctly when deciding…
Johanna
  • 11
  • 4
0
votes
0 answers

assign partial values to a set of features in a dataset covering the total value without decimals and remainders in python

I'm working with pandas in an statistical project and I have population dataset that I should assign from blocks to single plots, the question is if there is any method that I can apply to fill a certain set of plots with values without decimals…
Rodrigo Vargas
  • 273
  • 3
  • 17
0
votes
1 answer

How can I add the populations of males and females together to remove gender as a variable in a demographics table. In R Studio

This is my first time posting a question, so may not have the correct info to start, apologies in advance. Am new to R. Prefer to use dplyr or tidyverse because those are the packages we've used so far. I did search for a similar question, but most…
stevo_q
  • 3
  • 1