Closed AmandaDoyle closed 3 years ago
SELECT program_type,
CASE
WHEN program_type ~* 'Senior|NORC' THEN 'SENIOR SERVICES'
WHEN program_type ~* 'Day Care|Child Care' THEN 'DAY CARE'
WHEN program_type ~* 'Disabilities' THEN 'PROGRAMS FOR PEOPLE WITH DISABILITIES'
WHEN program_type ~* 'Storage' THEN 'STORAGE'
WHEN program_type ~* 'Youth|Vocation|Jobs|Literacy|Lab' THEN 'YOUTH CENTERS, LITERACY PROGRAMS, AND JOB TRAINING SERVICES'
WHEN program_type ~* 'School' THEN 'PUBLIC K-12 SCHOOLS'
WHEN program_type ~* 'NYPD' THEN 'POLICE SERVICES'
WHEN program_type ~* 'Food Pantry' THEN 'SOUP KITCHENS AND FOOD PANTRIES'
WHEN program_type ~* 'Mental|Counseling' THEN 'MENTAL HEALTH'
WHEN program_type ~* 'Clinic' THEN 'HOSPITALS AND CLINICS'
WHEN program_type ~* 'ESL|Literacy' THEN 'ADULT AND IMMIGRANT LITERACY'
WHEN program_type ~* 'Training' THEN 'TRAINING AND TESTING'
WHEN program_type ~* 'Library' THEN 'PUBLIC LIBRARIES'
WHEN program_type ~* 'CCTV' THEN 'TELECOMMUNICATIONS'
WHEN program_type ~* 'Office|Staff|Contractor|ORRR' THEN 'CITY GOVERNMENT OFFICES'
WHEN program_type ~* 'Urban Family Center|Shelter' THEN 'NON-RESIDENTIAL HOUSING AND HOMELESS SERVICES'
-- New subgroups
WHEN program_type ~* 'Head Start' THEN 'HEAD START' -- facgroup should be DAY CARE AND PRE-KINDERGARTEN and facdomain should be EDUCATION, CHILD WELFARE, AND YOUTH
WHEN program_type ~* 'Child welfare|Family' THEN 'FAMILY SERVICES' -- facgroup should be CHILD SERVICES AND WELFARE and facdomain should be EDUCATION, CHILD WELFARE, AND YOUTH
-- Default
ELSE 'COMMUNITY CENTER'
END as facsubgrp
FROM nycha_communitycenters;
@AmandaDoyle Here is a first pass at new criteria
@mgraber I reviewed the potential criteria above. It looks good. Here's my feedback to fine tune it.
Keep the logic for assigning factype as is.
Questions for discussion:
@AmandaDoyle What is the distinction between job-related programs that in 'Workforce Development' and those in 'YOUTH CENTERS, LITERACY PROGRAMS, AND JOB TRAINING SERVICES'?
@AmandaDoyle What is the distinction between job-related programs that in 'Workforce Development' and those in 'YOUTH CENTERS, LITERACY PROGRAMS, AND JOB TRAINING SERVICES'?
I'm not clear on the distinction myself. This is something we can workshop together tomorrow
Right now everything is classified as a community center and that's probably not right. The current logic is here.
Subset of data as it appears in FacDB can be selected with the following query
SELECT * FROM facilities WHERE datasource = 'nycha_communitycenters';
Looking at theprogram_type
some of these facilities are better classified as another subgroup. Before implementing anything we need to make a proposal of how to change the classification