Skip to content

Commit

Permalink
rescale population ?
Browse files Browse the repository at this point in the history
@valenca13 which math should we do regarding the absolute values of sum(population) in each cell?
  • Loading branch information
temospena committed Feb 25, 2024
1 parent 32f7a62 commit 60321fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/population.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ population_grid =
join = st_intersects) %>%
st_drop_geometry() %>%
group_by(ID) %>%
summarise(population = sum(N_INDIVIDUOS))
summarise(population = sum(N_INDIVIDUOS)) |>
mutate(population = scales::rescale(population)) #?

# table(population_grid$population > 0.5)
# FALSE TRUE
# 1044 25

population_grid_geo = GRID |> left_join(population_grid)
mapview::mapview(population_grid_geo, zcol="population") + mapview::mapview(CENSUScity)
Expand Down

0 comments on commit 60321fd

Please sign in to comment.