-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
32 - [feat] Continue Connecting NYISO and NYSERDA, and add Key Development Milestones #39
Conversation
…le geocoding api to retrieve latitude and longitude
…o' of https://github.com/calblueprint/ace-ny into 16-feat-connecting-nyiso-and-nyserda-to-database
…-feat-connecting-nyiso-and-nyserda-to-database
…ditional filtered fields, created database.py
…trieve senate/congressional districts
…nnection queue number
…string if there exists a suitable mapping
16-feat-connecting-nyiso-and-nyserda-to-database
…s, standardize renewable technology labels, map abbreviated energy tech from NYISO to readable string
… and renewable_energy_map
…-continue-connecting-nyiso-and-nyserda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good Deena. Just make the 2 changes I commented on! thanks
renewable_energy_set = {'Hydroelectric', 'Land Based Wind', 'Offshore Wind', 'Solar', 'Geothermal', 'Energy Storage', 'Pumped Storage'} | ||
|
||
renewable_energy_map = { | ||
'H': 'Hydroelectric', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add 'W': 'Land-Based Wind'
"renewable_technology", None | ||
), | ||
"developer": item.get("developer_name", None), | ||
"proposed_cod": item.get("year_of_delivery_start_date", None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't get proposed COD from year_of_delivery_start_date. Only NYISO has the proposed COD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itsliterallymonique would you like me to remove the inclusion of the proposed_cod
date from the NYSERDA small-scale solar projects as well? currently, we're using the "interconnection_date" field for the small-scale solar projects as an estimate for the proposed COD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deenasun hmmm. Let's keep that for now in the small-scale solar database. I will check with our POC if we can use interconnection_date for proposed_cod. I am not too sure if they are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! (done but pushed changes to the branch 26-feat-parse-nyiso-link-from-html)
What's new in this PR
Description
Updated
api/webscraper/database.py
:create_update_object
helper function to make sure we only update fields that are currently empty rather than overriding all fields when updatingNote:
nyiso_to_database()
is for all the projects in the "Interconnection Queue" and "Cluster Projects" sheets of the NYISO xlsx.nyiso_in_service_to_database()
is for the projects in the "In Service" sheet, which has a different flow for correctly updating the "Start of operations" milestone.Updated
api/webscraper/nyiso_scraper.py
:query_nyiso_excel
gets the entire xlsx spreadsheet from NYISOfilter_nyiso_iq_sheet
,filter_nyiso_cluster_sheet
, andfilter_nyiso_in_service_sheet
are used to filter the individual sheets from the xlsx fileNone
)Updated
api/webscraper/nyserda_scraper.py
:permit_process
year_of_delivery_start_date
for updating the key development milestones laterNote: NYSERDA's API limits us to only fetching 50,000 rows at once. So we have to make repeated API calls to get all the rows from the small solar projects database.
Updated
api/utils/scraper_utils.py
:update_kdm
is a helper function for updatingkey_development_milestone
elements inside thekey_development_milestone
arrayclean_df_data
removes/replaces any invalid cells from the NYISO spreadsheet dataframe objectsstandardize_label
is used for fixing renewable energy technology labels that have hyphens in-between words (should fix the "Land-based Wind" discrepancy)turn_timestamp_to_string
is a function that turns pd.timestamp objects into a string representation for serialization (timestamp objects are not JSON serializable)Created
api/webscraper/database_constants.py
:renewable_energy_set
contains the set of all renewable energy types we're collectingrenewable_energy_map
is for mapping abbreviated NYISO renewable energy technologies to readable stringsinitial_kdm_dict
is used as the default key development milestone jsonScreenshots
How to review
In the root directory, run this command to download all the necessary python dependencies:
Next steps
Relevant links
Online sources
Related PRs
Also included fixes from this issue:
CC: @itsliterallymonique