Skip to content

Commit

Permalink
update land use based allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
geocaruso committed May 30, 2023
1 parent ea24fa1 commit a55b5ce
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions R/map.lux.grid.pop.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ merged2many$Pop2021EU_sh_of_LAU2<-merged_agg$Pop2021EU/merged_agg$SumPop2021EU

Grid1km_LAU2_Pop2021EU<-merged2many[match(Grid1km_LAU2_popEU$CELLCODE,merged2many$CELLCODE),]


#Mapping correspondance shares
pfi_sh<-ggplot.themap(Grid1km_LAU2_Pop2021EU,
"Pop2021EU_sh_of_LAU2",n=7, style="fisher")
pfi_sh


#save
sf::st_write(Grid1km_LAU2_Pop2021EU,"data/Grid1km_LAU2_Pop2021EU.gpkg", delete_dsn=TRUE)
write.csv(sf::st_drop_geometry(Grid1km_LAU2_Pop2021EU),"data/Grid1km_LAU2_Pop2021EU.csv")

#print

17 changes: 17 additions & 0 deletions R/map.lux.grid.urban.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#map.lux.grid.urban.R

#Add urban surfaces to grid and compute share of each cell in each
# previously assigned communes (usign total surface) based on urban surface
#Urban surface is built from Urban Atlas soil sealing percentage categories

#urban atlas 2012 downloaded from https://land.copernicus.eu/local/urban-atlas/urban-atlas-2012?tab=download
#urban atlas 2018 downloaded from https://land.copernicus.eu/local/urban-atlas/urban-atlas-2018?tab=download
#And unzipped in data folder

UA12<-sf::st_read("data/EXT/LU001L1_LUXEMBOURG_UA2012_revised_v021.gpkg")
UA18<-sf::st_read("data/EXT/LU001L1_LUXEMBOURG_UA2018_v013.gpkg")
artifcode <-c("11100", "11210", "11220", "11230", "11240")
artif12<- UA12[UA12$code_2012 %in% artifcode,]
artif18<-UA18[UA18$code_2018 %in% artifcode,]
sf::st_crs(artif12)<- sf::st_crs(grid_estat_lu)
sf::st_crs(artif18)<- sf::st_crs(grid_estat_lu)
Binary file modified data/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
EXT/
Binary file added data/EXT/.DS_Store
Binary file not shown.

0 comments on commit a55b5ce

Please sign in to comment.