accessibility 1.6.0
CRAN release: 2026-10-30
New features
-
cumulative_interval()has a new argumentfill_missing_ids. WhenTRUE(the default), ids that reach no opportunity are kept with accessibility 0, as incumulative_cutoff().
Major changes
- Accessibility functions now treat
NAopportunity, demand and supply values, andtravel_matrixids missing fromland_use_data, as 0. Previously, they could make resultsNA. - Integer opportunity, demand, supply and population columns are now converted to doubles, so sums no longer overflow. As a result,
cumulative_cutoff()andgravity()(withdecay_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 eachgroup_bygroup, 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 ignoresactiveanddetailed_results. Previously,detailed_results = FALSEreturned the demand and supply marginals instead (#67).
Bug fixes
-
balancing_cost(): numeric ids were used as positions to look up population, returningNAor wrong costs; origins balanced only when opportunities exceeded (instead of matched) population; and costs above the last multiple ofcost_incrementwereNA.cost_incrementmust now be greater than 0. -
concentration_index(): tied incomes now share the same fractional rank, so results no longer depend on row order. Withtype = "corrected", the index is now 0, instead ofNaN, when everyone has the same accessibility. -
concentration_index(),gini_index()andtheil_t()no longer returnNAdue 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 fromtravel_matrixare 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 reachingerror_threshold. -
constraint = "doubly"now returns the same class astravel_matrix. -
constraint = "total"or"singly"no longer errors whenfill_missing_ids = TRUEandgroup_byleave combinations missing. -
constraint = "total"no longer adds an index to the user’sland_use_data. -
constraint = "total","singly"and"doubly"now treat eachgroup_bycombination 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 thegroup_byanddecay_function_argcolumns (#66, @soukhova).
-
-
cost_to_closest()no longer returnsInfdue to integer overflow with large opportunity counts. -
cumulative_cutoff(): cutoffs with floating point noise (e.g. fromseq(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. frominterval_increment = 0.1) were left out of the summary. -
decay_stepped()no longer warns for eachNAtravel cost. -
palma_ratio(): income cutoffs depended on the scale of population (NAwith population shares), and with severalgroup_bycolumns the output includedNArows for absent combinations. The output is no longer keyed. -
spatial_availability(): a destination no one could reach made all resultsNaN. 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 indexNaN.group_bylevels where no one has access are kept withNA.
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_dataorsociodemographic_datahave duplicated ids. - Accessibility functions:
- raise an error on negative travel costs and a clear error when the id types of
travel_matrixandland_use_dataare incompatible. - match land use data by id with
match(), making them about 1.2 to 3.3 times faster with half the memory. Atravel_matrixcolumn named like the opportunity column is now replaced. - no longer return keyed data.tables when filling missing ids.
- raise an error on negative travel costs and a clear error when the id types of
- Several functions are faster on large travel matrices. Results may differ from previous versions by floating point rounding only.
-
balancing_cost(),cumulative_cutoff()andcumulative_interval()are about 4 to 20 times faster, because opportunities are summed once per travel cost instead of once per cutoff. -
constrained_accessibility()checks thatdemandandsupplyare single strings. Withconstraint = "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 andgroup_by. -
decay_exponential(),decay_logistic(),decay_power()anddecay_stepped()are about 2 to 200 times faster. -
decay_linear()requirescutoffgreater than 0. -
decay_logistic()anddecay_stepped()raise an error on duplicated parameter combinations. -
fgt_poverty()raises an error on invalidpoverty_lineorpoor_below_threshold, and warns whenpoor_below_threshold = FALSEandaccessibility_datahasInfvalues (e.g. fromcost_to_closest()). -
floating_catchment_area()andgravity()are faster with several decay values (about 4 times with three). -
spatial_availability()is about 2 times faster.
accessibility 1.5.0
CRAN release: 2026-05-12
New features
- New function
constrained_accessibility(), which implements the family of constrained accessibility measures proposed in Soukhov et al. (2025).
Minor changes
- The function
fgt_poverty()has a new argumentpoor_below_threshold. When set toTRUE(default) the observations below the poverty line are considered to be poor. This is the correct approach for primal accessibility measures (e.g. cumulative accessibility). IfFALSE, then observations above the poverty line are considered to be poor. This is the correct approach for dual accessibility measures (e.g. travel time to the closest facility). When set toFALSE, FGT 1 and 2 do not have an upper bound. Closes #63
accessibility 1.4.0
CRAN release: 2024-03-06
Bug fixes
- Fixed a bug in which land use data passed to accessibility functions as a
tibblecould lead to an error.
New features
- New function
decay_logistic().
accessibility 1.3.0
CRAN release: 2023-10-20
New features
- New parameter
detailed_resultstospatial_availability(), used to specify whether results should be aggregated by origin-destination pair or by origin. When aggregating by origin-destination pair, the output also includes the demand, impedance and combined balancing factors used to calculate spatial availability.
accessibility 1.2.0
CRAN release: 2023-09-21
New features
- New inequality functions
concentration_index()andtheil_t().
accessibility 1.1.0
CRAN release: 2023-06-22
New features
- The package now includes functions to estimate accessibility inequalities (
palma_ratio()andgini_index()) and poverty (fgt_poverty()). - New accessibility functions
spatial_availability()andbalancing_cost(). - New vignette “Calculating accessibility inequality and poverty”.
-
cost_to_closest()parameternnow accepts a numeric vector, instead of being restricted to a single number. -
cumulative_cutoff()parameterscutoffandtravel_costnow accepts a numeric and a character vector, respectively, instead of being restricted to a single number/string. -
cumulative_interval()parameterintervalnow accepts a list of numeric vectors, instead of being restricted to a single vector. - The decay functions can now take numeric vectors as input, instead of being restricted to a single number (in the case of
decay_stepped(), bothstepsandweightscan take alistofnumericvectors as input, instead of being restricted to a singlenumericvector each).
accessibility 1.0.1
CRAN release: 2022-10-06
Bug fixes
- Fixed a bug in which
cost_to_closest()would returnNAvalues when filling missing ids (which should be filled withInf, since they cannot reach any opportunities). This was also responsible for the warning reported in #27, which was also fixed.
accessibility 1.0.0
CRAN release: 2022-07-22
The package has been through tremendous changes. Basically, there’s not a single part of it that remained untouched: documentation, vignettes, function names, parameter names, extra functionality, performance improvements, etc. While it is impossible to highlight everything that has been done, we’ll try to summarize some of the key points in the following topics.
Breaking changes
- Accessibility functions previously worked with a single input dataset:
data. Now they require two input datasets:travel_matrixandland_use_data. - Function names were changed:
-
time_to_closest()->cost_to_closest() -
cumulative_time_cutoff()->cumulative_cutoff() -
cumulative_time_interval()->cumulative_interval() -
gravity_access()->gravity()
-
- Parameter names were changed:
-
opportunity_col->opportunity -
travel_cost_col->travel_cost -
by_col->active - In
cost_to_closest():n_opportunities->n - In
cumulative_interval():stat->summary_function - In
floating_catchment_area():population_col->demand - In
floating_catchment_area():fca_metric->method
-
- Parameter required values were changed:
-
activenow takes alogical, instead of a string (whichby_colpreviously took). - In
cumulative_interval():summary_functionnow takes afunction, instead of a string (whichstatpreviously took).
-
New features
- New function
decay_stepped(). - New parameter
interval_incrementtocumulative_interval(), used to specify how many travel cost units separate the cutoffs used to calculate the accessibility estimates which will be used to calculate the summary estimate within the specified interval. - All accessibility functions gained a
group_byparameter, that allows accessibility estimates to be grouped by one or more columns present intravel_matrix. - All accessibility functions (but
cumulative_interval()) gained afill_missing_idsparameter, that includes in the results origins whose accessibility would be 0 but, due to some commonly overlooked implementation details, are usually left out from the output.cumulative_interval()doesn’t have this parameter because its result will always include all origins, otherwise the summary measure wouldn’t be calculated properly.
