chekos / RIPA-2018-datasette

Publishing datasette of CA's RIPA 2018 data
http://ripa-2018.datasettes.cimarron.io/
GNU General Public License v3.0
0 stars 0 forks source link

Query suggestion #19

Open chekos opened 4 years ago

chekos commented 4 years ago

Findings regarding RIPA Stop Data Bullet 4

In description add table with Code Race/Ethnicity
1 Asian
2 Black/African American
3 Hispanic/Latino
4 Middle Eastern/South Asian
5 Native American
6 Pacific Islander
7 White
8 Multiracial

query

-- Individuals perceived to be Hispanic (39.8%), White (33.2%), or Black (15.2%) comprised the majority of stopped individuals. 
-- 1 Asian, 2 Black/African American, 3 Hispanic/Latino, 4 Middle Eastern/South Asian, 5 Native American, 6 Pacific Islander, 7 White, 8 Multiracial
SELECT
  RAE_FULL,
  COUNT(*) as N,
  PRINTF("%.4f", COUNT(*) * 1.0 / (SELECT COUNT(*) FROM race_ethnicity)) as share
FROM
  race_ethnicity as rae
GROUP BY 
  RAE_FULL