edgi-govdata-archiving / ECHO-COVID19

Jupyter Notebook for tracking the effects of EPA's non-enforcement policy
https://colab.research.google.com/github/edgi-govdata-archiving/ECHO-COVID19/blob/main/ECHO-COVID19.ipynb
GNU General Public License v3.0
1 stars 1 forks source link

More efficient database queries #31

Closed shansen5 closed 4 years ago

shansen5 commented 4 years ago

Some long-running database queries on the same tables are repeated in different cells of the notebook. Do the query once and save the dataframe for re-use instead.

ericnost commented 4 years ago

Yes, in particular: there are repeated calls to ECHO_EXPORTER for background info on NPDES and CAA facilities. I recommend one call to EE for NPDES and then reuse that dataframe, and one call to EE for CAA facilities and then reuse that dataframe.