Geomapping Public Comments

Of the 3919 files sent by the DEC, we were able to map the origin of 2611 comments (66%). An anonymized dataframe as been provided, "anon_w_locations.csv".

This csv contains:

  • the suject line of the email comment sent ("subject")
  • the date submitted ("month", "day", "year")
  • city ("city)
  • state ("region1")
  • zipcode ("postal_code")
  • latitude ("lat")
  • longitude ("lng")
  • stance (0 = "anti-renewal", 1 = "pro-renewal")

17 of the 38 pro-renewal comments have been mapped, one being Greenidge itself. 2594 of the 3872 anti-renewal comments have been mapped. There have been 14 identified from out of state, 3 of which are pro-renewal and 11 being anti-renewal.

In [1]:
import folium
import pandas as pd

df = pd.read_csv("anon_w_locations.csv", index_col=0)
df = df.dropna()
df.head()
Out[1]:
subject month day year city region1 postal_code lat lng stance
0 Please Deny Title 5 Permit 11.0 15.0 21.0 Peekskill New York 10566 41.282600 -73.924101 0
1 Luc - Greenidge Generating Station 11.0 19.0 21.0 Ithaca NY 14850 42.435835 -76.481422 0
2 Jean - Deny Greenidge's Title V Air Permit 10.0 9.0 21.0 Mineola NY 11501-1365 40.748224 -73.651264 0
3 hua - Deny Greenidge's Title V Air Permit 10.0 5.0 21.0 Albany NY 12208-1010 42.641204 -73.834502 0
4 Grennidge Power Plant 10.0 22.0 21.0 Penn Yan NY 14527 42.716076 -77.066421 1
In [2]:
print("\n")
print("Red dot - anti-renewal,   Green dot - pro-renewal")

m = folium.Map(location=df[["lat", "lng"]].mean().to_list(), zoom_start=2)

markers_colors = ['red', 'green']

for lat, lng, city, suject, stance in zip(df['lat'], df['lng'], df['city'], df['subject'], df['stance']):
    if stance == 0:
        stance_string = "anti-renewal"
    else:
        stance_string = "pro-renewal"
    folium.vector_layers.CircleMarker(
            [lat, lng],
            radius=2,
            color = markers_colors[stance],
            tooltip = str(city)+ ', '+stance_string,
            fill=True,
            fill_opacity=0.6).add_to(m)


m

Red dot - anti-renewal,   Green dot - pro-renewal
Out[2]:
Make this Notebook Trusted to load map: File -> Trust Notebook