You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cumulative_interval() has a new argument fill_missing_ids. When TRUE
(the default), ids that reach no opportunity are kept with accessibility 0,
as in cumulative_cutoff().
Major changes
Accessibility functions now treat NA opportunity, demand and supply
values, and travel_matrix ids missing from land_use_data, as 0.
Previously, they could make results NA.
Integer opportunity, demand, supply and population columns are now
converted to doubles, so sums no longer overflow. As a result, cumulative_cutoff() and gravity() (with decay_binary()) return doubles
instead of integers when opportunities are integers.
concentration_index(type = "corrected") now uses the bounds of the whole
accessibility distribution, not of each group_by group, to calculate the
correction factor.
cumulative_interval() no longer truncates results to integers (e.g. a
median of 26.5).
constrained_accessibility(constraint = "doubly") now always returns
origin-destination flows and ignores active and detailed_results.
Previously, detailed_results = FALSE returned the demand and supply
marginals instead (#67).
Bug fixes
balancing_cost(): numeric ids were used as positions to look up
population, returning NA or wrong costs; origins balanced only when
opportunities exceeded (instead of matched) population; and costs above the
last multiple of cost_increment were NA. cost_increment must now be
greater than 0.
concentration_index(): tied incomes now share the same fractional rank,
so results no longer depend on row order. With type = "corrected", the
index is now 0, instead of NaN, when everyone has the same accessibility.
concentration_index(), gini_index() and theil_t() no longer return NA due to integer overflow with large opportunity and population counts.
constrained_accessibility():
constraint = "doubly" aligned impedances and totals by row position
instead of by id; pairs missing from travel_matrix are now unreachable.
constraint = "doubly" no longer adds a constant to the balancing
factors, which distorted results with very small weights, and now warns
when balancing stops before reaching error_threshold.
constraint = "doubly" now returns the same class as travel_matrix.
constraint = "total" or "singly" no longer errors when fill_missing_ids = TRUE and group_by leave combinations missing.
constraint = "total" no longer adds an index to the user's land_use_data.
constraint = "total", "singly" and "doubly" now treat each group_by combination and each decay value as an independent system.
Previously, "total" split the regional total across groups, "doubly"
balanced all groups as a single system, and all three blended several
decay values into one result. Detailed results now keep the group_by
and decay_function_arg columns (#66, @soukhova).
cost_to_closest() no longer returns Inf due to integer overflow with
large opportunity counts.
cumulative_cutoff(): cutoffs with floating point noise (e.g. from seq(0, 0.5, by = 0.1)) could be zeroed when filling missing ids. Travel
cost columns with non-syntactic names now work.
cumulative_interval(): cutoffs with floating point noise (e.g. from interval_increment = 0.1) were left out of the summary.
decay_stepped() no longer warns for each NA travel cost.
palma_ratio(): income cutoffs depended on the scale of population (NA
with population shares), and with several group_by columns the output
included NA rows for absent combinations. The output is no longer keyed.
spatial_availability(): a destination no one could reach made all
results NaN. Its opportunities are now left unallocated.
theil_t(): observations with no access are now included and contribute 0
(0 * log(0) = 0), instead of being excluded or making the index NaN. group_by levels where no one has access are kept with NA.
Minor changes
Errors and warnings now use {cli}. {cli} and {rlang} are new
dependencies.
Accessibility, inequality and poverty functions now raise an error if land_use_data or sociodemographic_data have duplicated ids.
Accessibility functions:
raise an error on negative travel costs and a clear error when the id
types of travel_matrix and land_use_data are incompatible.
match land use data by id with match(), making them about 1.2 to 3.3
times faster with half the memory. A travel_matrix column named like
the opportunity column is now replaced.
no longer return keyed data.tables when filling missing ids.
Several functions are faster on large travel matrices. Results may differ
from previous versions by floating point rounding only.
balancing_cost(), cumulative_cutoff() and cumulative_interval() are
about 4 to 20 times faster, because opportunities are summed once per travel
cost instead of once per cutoff.
constrained_accessibility() checks that demand and supply are single
strings. With constraint = "doubly", it is about 2 to 4 times faster and
uses much less memory.
cost_to_closest() is about 1.3 to 2.3 times faster.
cumulative_interval() always sorts rows by interval, id and group_by.
decay_exponential(), decay_logistic(), decay_power() and decay_stepped() are about 2 to 200 times faster.
decay_linear() requires cutoff greater than 0.
decay_logistic() and decay_stepped() raise an error on duplicated
parameter combinations.
fgt_poverty() raises an error on invalid poverty_line or poor_below_threshold, and warns when poor_below_threshold = FALSE and accessibility_data has Inf values (e.g. from cost_to_closest()).
floating_catchment_area() and gravity() are faster with several decay
values (about 4 times with three).
spatial_availability() is about 2 times faster.
Notes
Updated URLs after the repository moved from ipeaGIT to ipea.