Skip to content

Commit

Permalink
Merge pull request #8 from BetaNYC/Erik-Brown01-patch-1
Browse files Browse the repository at this point in the history
Erik brown01 patch 1
  • Loading branch information
Erik-Brown01 authored Jan 25, 2024
2 parents f0fd127 + 853067e commit cb8a47c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
Binary file modified public/airtable.pkl
Binary file not shown.
24 changes: 21 additions & 3 deletions public/nongeocoded_members.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
,Website,Name,Legislation,Address,Membership Status,lat,lon,Phone
0,https://antievictionmap.com/?category=New+York+City,Anti-Eviction Mapping Project,['Statewide Right to Counsel'],,['Endorser'],,,
1,http://civilrighttocounsel.org/about,National Coalition for a Civil Right to Counsel,['Statewide Right to Counsel'],,['Endorser'],,,
,Website,Name,Legislation,Address,Membership Status,lat,lon,Phone,Senate_District,Assembly_District,County,Zip_Code
0,,NY Council of Housing Development Fund Companies,['Winter Eviction Moratorium'],"New York, NY",['Endorser'],,,,,,,
1,https://www.facebook.com/profile.php?id=100064544210388,Solidarity Committee of the Capital District,"['Clean Hands', 'Statewide Right to Counsel', 'Defend Right to Counsel', 'Winter Eviction Moratorium']","Albany, New York",['Campaign Member'],,,,,,,
2,https://capitaldistrictdsa.org/,Capital District Democratic Socialists of America,"['Clean Hands', 'Statewide Right to Counsel', 'Defend Right to Counsel', 'Winter Eviction Moratorium']",P.O. Box 3821 · Albany NY 12203,['Campaign Member'],,,,,,,
3,https://www.instagram.com/astoriatenantunion/?hl=en,Astoria Tenants Union,"['Clean Hands', 'Statewide Right to Counsel', 'Defend Right to Counsel', 'Winter Eviction Moratorium']","Astoria, New York",['Campaign Member'],,,,,,,
4,"https://utalbany.org/housing-for-all/#:~:text=Housing%20for%20All%20is%20a,in%20the%20City%20of%20Albany.",Housing for All Albany,['Statewide Right to Counsel'],"Albany, NY",['Endorser'],,,,,,,
5,https://antievictionmap.com/?category=New+York+City,Anti-Eviction Mapping Project,['Statewide Right to Counsel'],,['Endorser'],,,,,,,
6,https://www.syracusetenantsunion.com/about,Syracuse Tenant Union,"['Clean Hands', 'Statewide Right to Counsel', 'Defend Right to Counsel', 'Winter Eviction Moratorium']","Syracuse, New York",['Campaign Member'],,,315-308-0130,,,,
7,https://www.instagram.com/rtcwestchester/?hl=en,Westchester Right to Counsel Coalition,['Statewide Right to Counsel'],"Westchester, NY",['Endorser'],,,,,,,
8,https://www.ridgewoodtenantsunion.org/,Ridgewood Tenants Union,"['Clean Hands', 'Statewide Right to Counsel', 'Defend Right to Counsel', 'Winter Eviction Moratorium']","Ridgewood, Queens, NY",['Coalition Member'],,,732-835-2344,,,,
9,https://www.vocal-ny.org/chapter/syracuse/,VOCAL-NY - Syracuse,['Statewide Right to Counsel'],"Syracuse, NY, USA",['Endorser'],,,718-802-9540,,,,
10,https://longislandactivists.org/,Long Island Activists,"['Clean Hands', 'Statewide Right to Counsel', 'Defend Right to Counsel', 'Winter Eviction Moratorium']","Long Island, NY",['Campaign Member'],,,,,,,
11,https://buffalo-dsa.org/,Buffalo Democratic Socialists of America,['Statewide Right to Counsel'],"Buffalo, NY",['Endorser'],,,,,,,
12,https://mcah.squarespace.com/,Mamaroneck Coalition for Affordable Housing,"['Winter Eviction Moratorium', 'Statewide Right to Counsel']","Mamaroneck, NY",['Endorser'],,,,,,,
13,https://www.lhvdsa.org/,Lower Hudson Valley Democratic Socialists of America,['Statewide Right to Counsel'],"Yonkers, NY",['Endorser'],,,,,,,
14,https://housingjusticeforall.org/,Housing Justice for All,['Statewide Right to Counsel'],"New York, NY",['Endorser'],,,,,,,
15,https://nylscoalition.org/,New York Legal Services Coalition,['Statewide Right to Counsel'],"New York, NY",['Endorser'],,,315-572-0373 ,,,,
16,https://www.vocal-ny.org/chapter/buffalo/,VOCAL-NY - Buffalo,['Statewide Right to Counsel'],"Buffalo, NY, USA",['Endorser'],,,718-802-9540,,,,
17,http://civilrighttocounsel.org/about,National Coalition for a Civil Right to Counsel,['Statewide Right to Counsel'],,['Endorser'],,,,,,,
18,https://syracusedsa.org/contact/,Syracuse Democratic Socialists of America,['Winter Eviction Moratorium'],"Syracuse, NY",['Endorser'],,,,,,,
19,https://housingcourtanswers.org/,Housing Court Answers,"['Clean Hands', 'Statewide Right to Counsel', 'Defend Right to Counsel', 'Winter Eviction Moratorium']","New York, New York",['Coalition Member'],,,212-962-4795,,,,
4 changes: 2 additions & 2 deletions scripts/members_geocoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def generate_members_info(AIRTABLE_API_KEY, AIRTABLE_APP_KEY, AIRTABLE_TBL_KEY,

if not cached_data.empty:
# If the address is in the cache, use the cached latitude and longitude
if cached_data.iloc[0]['lat'] != np.nan:
if not np.isnan(cached_data.iloc[0]['lat']):
member['lat'] = cached_data.iloc[0]['lat']
member['lon'] = cached_data.iloc[0]['lon'] # Assuming 'long' is the column name
member['Senate_District'] = cached_data.iloc[0]['Senate_District']
Expand All @@ -212,7 +212,7 @@ def generate_members_info(AIRTABLE_API_KEY, AIRTABLE_APP_KEY, AIRTABLE_TBL_KEY,
member['Assembly_District'] = None
member['County'] = None
member['Zip_Code'] = None
nongeocoded_members = pd.concat([nongeocoded_members,pd.Dataframe([member])], ignore_index=True)
nongeocoded_members = pd.concat([nongeocoded_members,pd.DataFrame([member])], ignore_index=True)
print(f"Could not geocode address (cached)")

else:
Expand Down

0 comments on commit cb8a47c

Please sign in to comment.