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

Feature/smart cities lulc #20

Merged
merged 68 commits into from
Jun 26, 2024
Merged

Feature/smart cities lulc #20

merged 68 commits into from
Jun 26, 2024

Conversation

weiqi-tori
Copy link
Member

@weiqi-tori weiqi-tori commented Dec 7, 2023

Description: Add python version of layer for https://github.com/wri/cities-heat/blob/main/LULC_grid_V2.R
JIRA ticket is https://gfw.atlassian.net/browse/CIF-124
Test by running pytest layers.py::test_smart_surface_lulc

@weiqi-tori weiqi-tori requested review from chrowe and S-AI-F December 7, 2023 14:30
@weiqi-tori weiqi-tori changed the base branch from main to feature/use_xee_everywhere December 8, 2023 03:23
@chrowe chrowe changed the base branch from feature/use_xee_everywhere to main December 19, 2023 14:00
@S-AI-F
Copy link
Member

S-AI-F commented Dec 19, 2023

To Test:

  • layer: OpenStreetMap, NaturalAreas
  • indicators: urban_open_space(zones), natural_areas(zones)

city_metrix/layers/smart_cities_lulc.py Outdated Show resolved Hide resolved
# ESA reclass and upsample
esa_world_cover = EsaWorldCover().get_data(bbox)

reclass_map = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you define this in a couple places, could you define it all in one layer?


clf.fit(buildings_sample[['ULU', 'ANBH', 'Area_m']], buildings_sample['Slope_encoded'])

# plt.figure(figsize=(20, 10))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

city_metrix/layers/building_classifier.py Outdated Show resolved Hide resolved
city_metrix/layers/building_classifier.py Outdated Show resolved Hide resolved
city_metrix/layers/building_classifier.py Outdated Show resolved Hide resolved
city_metrix/layers/smart_cities_lulc.py Outdated Show resolved Hide resolved
city_metrix/layers/smart_cities_lulc.py Outdated Show resolved Hide resolved
city_metrix/layers/smart_cities_lulc.py Outdated Show resolved Hide resolved
city_metrix/metrics.py Outdated Show resolved Hide resolved
@weiqi-tori weiqi-tori changed the base branch from main to feature/natural_areas_osm_ulu January 4, 2024 16:15
@weiqi-tori weiqi-tori changed the base branch from main to feature/open_buildings May 28, 2024 07:50
Base automatically changed from feature/open_buildings to main May 29, 2024 01:38
@weiqi-tori weiqi-tori changed the base branch from main to feature/write_layers May 29, 2024 14:13
@weiqi-tori weiqi-tori changed the base branch from feature/write_layers to main May 29, 2024 14:14
Copy link
Member

@jterry64 jterry64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the most part, just had questions about those two files

@@ -0,0 +1,303 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You typically don't want to check in large data files like this, it will blow up the size of the git history. Could this be stored in S3 and downloaded?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only 184 KB so not very large. I like having it here since it is the basis for the model. If we start needing to use more training data in the future, we should find a better solution probably.

@@ -0,0 +1,197 @@
import xarray as xr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file just a duplicate of the .py file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the .py file.

@chrowe
Copy link
Contributor

chrowe commented Jun 26, 2024

Create models folder and move building_classifier files into it.

@chrowe chrowe merged commit 30735bd into main Jun 26, 2024
1 check failed
@chrowe chrowe deleted the feature/smart_cities_lulc branch June 26, 2024 14:32
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.

4 participants