edgi-govdata-archiving / ECHO-Sunrise

An Environmental Enforcement Watch partnership with Sunrise Boston hubs
https://colab.research.google.com/github/edgi-govdata-archiving/ECHO-Sunrise/blob/main/ECHO-Sunrise.ipynb
GNU General Public License v3.0
1 stars 2 forks source link

adds GHG ranking and mapping #3

Closed ericnost closed 4 years ago

ericnost commented 4 years ago

I am having trouble getting this to work on Colab. I think it has something to do with the utilities.py I created to host the mapping functions. Things seem to work fine on my local host, but not on Colab. I get the following error on the first map in Colab:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-14-9879baf438af> in <module>()
      1 #help(FastMarkerCluster)
----> 2 mapper_marker(echo_data)

/content/ECHO-Sunrise/utilities.py in mapper_marker(df)
     10     # Create the Marker Cluster array
     11     kwargs={"disableClusteringAtZoom": 10, "showCoverageOnHover": False}
---> 12     mc = FastMarkerCluster("", **kwargs)
     13 
     14     # Add a clickable marker for each facility

TypeError: __init__() got an unexpected keyword argument 'disableClusteringAtZoom'

I'm also curious for feedback on how to load all ECHO facilities for an overview. There are like 30,000 in Mass, and we are loading all columns, so it's a lot of data. Can we cut columns? We just need name, registry id, lat, long, and the flags right?

ericnost commented 4 years ago

P.S. Currently the notebook only works for Greenhouse Gas Emissions data

ericnost commented 4 years ago

Even when I run it locally, it takes a while to run cell 5 (get the program-specific data, in this case on Greenhouse Gas Emissions), and I'm curious why that might be.

ericnost commented 4 years ago

FWIW, here are expected outputs: https://github.com/edgi-govdata-archiving/ECHO-Sunrise/blob/first-draft/ECHO-Sunrise.pdf

ericnost commented 4 years ago

I temporarily disabled some of the map options, so it should run without the error I described above https://github.com/edgi-govdata-archiving/ECHO-Sunrise/pull/3#issuecomment-647642985