Created
May 5, 2022 21:36
-
-
Save ivopbernardo/2192ac015ee85afb28a3a2ec4af4b122 to your computer and use it in GitHub Desktop.
GeoData DareData Blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read data directly from the portuguese gov website. | |
parishes_url = "zip+https://dados.gov.pt/s/resources/freguesias-de-portugal/20181112-195834/cont-aad-caop2017.zip" | |
parishes = gpd.read_file(parishes_url) | |
# Left Join the house data to the parishes data, if house is `within` parish. | |
house_data_gdf = gpd.sjoin(house_data_gdf, parishes, how="left", op="within") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment