Skip to content
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

filter on asset_type == combiner #6

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

williamhobbs
Copy link

I added a filter in the second to last code block to only grab combiners. There are no asset_type = inverter in the sample geojson file, but I talked about the option to add them, so I think it makes sense to filter on asset_type, just in case someone builds off of the demo.

changed this:

data_centroids = pd.DataFrame(data_utm.centroid.get_coordinates().values, index=data_utm.asset_name, columns=['E', 'N'])
data_centroids.head()

to this:

data_boundaries = data_utm.loc[data_utm['asset_type']=='combiner']
data_centroids = pd.DataFrame(
    data_boundaries.centroid.get_coordinates().values,
    index=data_utm.asset_name, columns=['E', 'N']
    )
data_centroids.head()

@jranalli
Copy link
Owner

Good addition, I will merge this later today.

@jranalli jranalli merged commit f37fd7f into jranalli:dev May 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants