Skip to content

Commit

Permalink
add income distr analysis based on shp file
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Apr 5, 2024
1 parent aad019f commit c18f775
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import java.text.DecimalFormatSymbols;
import java.util.*;

/**
* analysis for determining the income distribution of agebs for a given road pricing area.
*/
public class IncomeDistributionAnalysis implements MATSimAppCommand {

@CommandLine.Option(names = "--income-shp", description = "Path to shp file with income information", required = true)
Expand Down Expand Up @@ -54,14 +57,10 @@ public Integer call() throws Exception {

double inflationFactor = 1.6173;

// apply factor to calc 2017 income values for 2005 income values
// for (Map.Entry<String, DoubleRange> entry : incomeGroups.entrySet()) {
// incomeGroups.replace(entry.getKey(), new DoubleRange(entry.getValue().getMinimumDouble() * inflationFactor, entry.getValue().getMaximumDouble() * inflationFactor));
// }

// avg hh size 3.6 according to ENIGH 2018, see class PrepareIncome
int avgHHSize = 4;

// apply factor to calc 2017 income values for 2005 income values
incomeGroups.forEach((key, value) -> incomeGroups.replace(key, new DoubleRange(value.getMinimumDouble() * inflationFactor / avgHHSize, value.getMaximumDouble() * inflationFactor / 4)));
incomeGroups.put("#N/A", new DoubleRange(0, 999999999));

Expand Down

0 comments on commit c18f775

Please sign in to comment.