Skip to content

Commit

Permalink
add shapefile to dictionary: plantations and NCRA_Marine_region
Browse files Browse the repository at this point in the history
  • Loading branch information
Gen Tolhurst committed Aug 22, 2024
1 parent fd72856 commit e79c94d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions acs_area_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
This method has used guidance from
[https://github.com/aus-ref-clim-data-nci/shapefiles/blob/master/python_tutorial.ipynb]"""

import xarray as xr
import geopandas as gpd
import regionmask
Expand All @@ -17,27 +16,34 @@
"aus_states_territories",
"australia",
"broadacre_regions",
"NCRA_Marine_region",
"ncra_regions",
"NCRA_regions_coastal_waters_GDA94",
"nrm_regions", ]
"nrm_regions",
"plantations"]


name_dict = {"aus_local_gov":"LGA_NAME22",
"aus_states_territories":"STE_NAME21",
"australia": "AUS_NAME21",
"broadacre_regions": "name",
"NCRA_Marine_region":"Label",
"ncra_regions": "regionname",
"NCRA_regions_coastal_waters_GDA94": "regionname",
"nrm_regions":"SubClusNm",
"plantations":"CodeName",
}


abbr_dict = {"aus_local_gov":"LGA_CODE22",
"aus_states_territories":"ABBREV",
"australia": "AUS_CODE21",
"broadacre_regions": "aagis",
"NCRA_Marine_region":"RegionID",
"ncra_regions": "short_name",
"NCRA_regions_coastal_waters_GDA94": "NCRA",
"nrm_regions": "SubClusAb",
"plantations":"REGCODE",
}

def get_regions(shapefiles):
Expand Down Expand Up @@ -67,7 +73,6 @@ def get_regions(shapefiles):
return regionmask.from_geopandas(gdf, names="NAME", abbrevs="abbrevs", name= "-".join(shapefiles), overlap=True)



# read in the shapefile with regions you will use Australia and NCRA regions
# from acs_plotting_maps import regions_dict
# regions = get_regions(["ncra_regions", "australia"])
Expand Down

0 comments on commit e79c94d

Please sign in to comment.