In [13]:
import pandas as pd
import os

In [14]:
os.chdir('/Users/WhoaaaItsDavid/Desktop/Data Library Projects/Age Friendly Communities/')

In [15]:
alwp_df = pd.read_csv('ALWP RCFEs.csv')
alwp_df['Zipcode'] = alwp_df['Zipcode'].astype(str)
alwp_df = alwp_df[alwp_df['Facility Name'] != 'Howard House (TBI)***'] # Filter out Howard House (TBI)*** per client guidance

# Display
alwp_df


Out[15]:
Facility Name Capacity Address City County Zipcode Telephone
0 Anne’s Place II 6 2690 Mary Lane Place Escondido San Diego 92025 (760) 522-1989
1 Country Club Guest Home 10 25533 Rua Michelle Escondido San Diego 92026 (760) 747-0957
2 Fredericka Manor 560 183 Third Ave. Chula Vista San Diego 91910 (619) 422-2686
3 Golden Living Inc. 113 3223 Duke St. San Diego San Diego 92110 (619) 222-1109
4 Habilitative Home Residential 4 11775 Walnut Rd. Lakeside San Diego 92040 (619) 270-4484
5 Harbor View Chateau 30 2360 Albatross St. San Diego San Diego 92101 (619) 233-8382
7 Jacob Health Care Center 40 4075 54th St. San Diego San Diego 92105 (619) 582-5168
8 Oceanside Rest Home 6 4451 San Joaquin St. Oceanside San Diego 92057 (760) 529-5532
9 Oceanside Rest Home #2 6 15 Shasta Court Oceanside San Diego 92057 (760) 529-5532
10 Oceanside Rest Home #3 6 4459 San Joaquin St. Oceanside San Diego 92057 (760) 529-5532
11 Oak Hill Residential Care I I3 612 Tranquility Glen Escondido San Diego 92027 (760) 743-8843
12 Oak Hill Residential Care II 14 622 Tranquility Glen Escondido San Diego 92027 (760) 743-8843
13 Oak Hill Residential Care III 14 632 Tranquility Glen Escondido San Diego 92027 (760) 743-8843
14 Oak Hill Residential Care IV 14 642 Tranquility Glen Escondido San Diego 92027 (760) 743-8843
15 Oak Hill Residential Care V 14 652 Tranquility Glen Escondido San Diego 92027 (760) 743-8843
16 Oak Hill Residential Care VI 15 662 Tranquility Glen Escondido San Diego 92027 (760) 743-8843
17 Oak Hill Residential Care VII 15 1353 Oak Hill Dr. Escondido San Diego 92027 (760) 743-8843
18 Pacific Breeze Home Care 6 137 Playa Del Rey Ave. Oceanside San Diego 92058 (760) 822-0807
19 Pacifica Senior Living 143 1351 E. Washington Ave. Escondido San Diego 92027 (760) 741-3055
20 Rancho Pacific Home Care 6 4416 San Joaquin St. Oceanside San Diego 92057 (760) 822-0807
21 Right Choice Senior Living I 6 6354 Cascade St. San Diego San Diego 92122 (858) 641-0131
22 Right Choice Senior Living II 6 4949 Mt. Longs San Diego San Diego 92117 (619) 246-2003
23 San Joaquin Assisted Living 6 4478 San Joaquin St. Oceanside San Diego 92057 (760) 754-2774
24 Santa Martha Residential I 6 6325 Dennison St. San Diego San Diego 92122 (858) 586-6431
25 Santa Martha Residential II 6 3739 Millikin Ave. San Diego San Diego 92122 (858) 586-6431
26 Santa Martha Residential III 6 7108 Werner Ave. San Diego San Diego 92122 (858) 586-6431
27 Sapphire Pacific I 6 262 Silver Creek Glen Escondido San Diego 92029 (714) 322-1910
28 Sapphire Pacific II 6 839 La Tierra Dr. San Marcos San Diego 92078 (714) 322-1910
29 Tenenbaum Villa 8 3463 Circulo Adorno Carlsbad San Diego 92009 (760) 942-5048
30 Tessie Board and Care 6 7229 Zest St. San Diego San Diego 92139 (619) 773-7410
31 The Manse * 48 2354 Watson Way Vista San Diego 92081 (760) 727-1221
32 Vibrant Living 6 5723 Bounty St. San Diego San Diego 92120 (619) 971-8431
33 Woodland Garden I 6 1717 Katy Place Escondido San Diego 92026 (760) 735-8414
34 Woodland Garden II 6 1709 Katy Place Escondido San Diego 92026 (760) 735-8414

In [16]:
# Create a list of unique zipcodes within San Diego County that participate in ALWP
alwp_unique_zips = list(alwp_df['Zipcode'].unique())

# Create an empty dictionary using the list of unique zipcodes
count_ALWP = {}
for unique_zipcode in alwp_unique_zips:
    count_ALWP[unique_zipcode] = 0
    
# Find the number of RCFEs in each zipcode that participate in ALWP: count_ALWP
for unique_zipcode in alwp_unique_zips:
    for all_zipcode in alwp_df['Zipcode']:
        if unique_zipcode == all_zipcode:
            count_ALWP[unique_zipcode] += 1

In [17]:
# Answer the question: How many of the RCFEs in a given community participate in the Assisted Living Waiver Program (ALWP)?
print('There are,', len(count_ALWP), 'unique zipcodes with RCFEs that participate in the ALWP.')
count = 1
for zipcode in sorted(count_ALWP.keys()):
    print(str(count) + ')', 'Zipcode', zipcode, 'contains', count_ALWP[zipcode], 'RCFE(s).')
    count += 1


There are, 18 unique zipcodes with RCFEs that participate in the ALWP.
1) Zipcode 91910 contains 1 RCFE(s).
2) Zipcode 92009 contains 1 RCFE(s).
3) Zipcode 92025 contains 1 RCFE(s).
4) Zipcode 92026 contains 3 RCFE(s).
5) Zipcode 92027 contains 8 RCFE(s).
6) Zipcode 92029 contains 1 RCFE(s).
7) Zipcode 92040 contains 1 RCFE(s).
8) Zipcode 92057 contains 5 RCFE(s).
9) Zipcode 92058 contains 1 RCFE(s).
10) Zipcode 92078 contains 1 RCFE(s).
11) Zipcode 92081 contains 1 RCFE(s).
12) Zipcode 92101 contains 1 RCFE(s).
13) Zipcode 92105 contains 1 RCFE(s).
14) Zipcode 92110 contains 1 RCFE(s).
15) Zipcode 92117 contains 1 RCFE(s).
16) Zipcode 92120 contains 1 RCFE(s).
17) Zipcode 92122 contains 4 RCFE(s).
18) Zipcode 92139 contains 1 RCFE(s).

In [ ]: