From 1cf1e85a4f40b007517d022ab25ff132d201ccd4 Mon Sep 17 00:00:00 2001 From: schlenther Date: Mon, 9 Sep 2024 17:09:48 +0200 Subject: [PATCH 1/5] fix bug: join by id --- .../org/matsim/dashboard/AverageKelheimNoiseDashboard.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java b/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java index 333dc57..370d9f1 100644 --- a/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java +++ b/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java @@ -63,12 +63,11 @@ public void configure(Header header, Layout layout) { viz.zoom = data.context().mapZoomLevel; viz.minValue = minDb; viz.maxValue = maxDb; - viz.setShape(new CreateAverageDashboards().copyVizNetwork(dirs, ".avro")); + viz.setShape(new CreateAverageDashboards().copyVizNetwork(dirs, ".avro"), "id"); viz.addDataset(NOISE, postProcess(data, "mean_emission_per_day.csv")); viz.display.lineColor.dataset = NOISE; viz.display.lineColor.columnName = "value"; viz.display.lineColor.join = "Link Id"; - viz.display.lineColor.fixedColors = new String[]{DARK_BLUE, LIGHT_BLUE, ORANGE, RED}; viz.display.lineColor.setColorRamp(ColorScheme.Oranges, 8, false, "35, 45, 55, 65, 75, 85, 95"); viz.display.lineWidth.dataset = NOISE; viz.display.lineWidth.columnName = "value"; From b7567710938214e5fa75fa81bed99923d15426c0 Mon Sep 17 00:00:00 2001 From: schlenther Date: Mon, 9 Sep 2024 17:10:15 +0200 Subject: [PATCH 2/5] improve plot readability --- .../VIA-data/KEXI-plot-time-series-VIA.R | 116 ++++++++++-------- 1 file changed, 65 insertions(+), 51 deletions(-) diff --git a/src/main/R/drtDemandAnalysis/VIA-data/KEXI-plot-time-series-VIA.R b/src/main/R/drtDemandAnalysis/VIA-data/KEXI-plot-time-series-VIA.R index e8c0d9d..b321a6f 100644 --- a/src/main/R/drtDemandAnalysis/VIA-data/KEXI-plot-time-series-VIA.R +++ b/src/main/R/drtDemandAnalysis/VIA-data/KEXI-plot-time-series-VIA.R @@ -11,15 +11,15 @@ library(hrbrthemes) # set working directory #setwd("C:/Users/Simon/Documents/shared-svn/projects/KelRide/data/KEXI/") -setwd("D:/Module/vsp/shared-svn/") +setwd("D:/shared-svn/projects/KelRide/data/KEXI/") # read data -VIAdata2021 <- read.csv2("Via_data_2022-02-08/Data_request_TUB_for_Kelheim-Actual_Data-VIA_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") -VIAdata2022_1 <- read.csv2("Via_data_2022-10-10/Data_request_TUB_for_Kelheim-Actual_Data-VIA_Feb_to_Oct_2022_edited_cleaned.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") -VIAdata2022_2 <- read.csv2("Via_data_2023-01-17/Data_request_TUB_for_Kelheim-Actual_Data-Oct-Dec_2022-Data_TUB_for_Kelheim-Actual_Data-Oct_to_Dec_22_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") -VIAdata2023_1 <- read.csv2("Via_data_2023-04-19/Data_request_TUB_for_Kelheim-Actual_Data-Jan-Mar_2023-Kelheim-Actual_Data-Jan-Mar_2023_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") -VIAdata2023_2 <- read.csv2("Via_data_2023-07-10/Data_request_TUB_for_Kelheim-Actual_Data-Apr-Jul_2023-Kelheim-Actual_Data-Apr-Jul_23_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") -VIAdata2023_3 <- read.csv2("Via_data_2023-10-24/Data_request_TUB_for_Kelheim-Actual_Data-Jul-Oct_2023-Kelheim-Actual_Data-Jul-Oct_23_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") +VIAdata2021 <- read.csv2("VIA_data/zz__previous-data-samples/Via_data_2022-02-08/Data_request_TUB_for_Kelheim-Actual_Data-VIA_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") +VIAdata2022_1 <- read.csv2("VIA_data/zz__previous-data-samples/Via_data_2022-10-10/Data_request_TUB_for_Kelheim-Actual_Data-VIA_Feb_to_Oct_2022_edited_cleaned.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") +VIAdata2022_2 <- read.csv2("VIA_data/zz__previous-data-samples/Via_data_2023-01-17/Data_request_TUB_for_Kelheim-Actual_Data-Oct-Dec_2022-Data_TUB_for_Kelheim-Actual_Data-Oct_to_Dec_22_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") +VIAdata2023_1 <- read.csv2("VIA_data/zz__previous-data-samples/Via_data_2023-04-19/Data_request_TUB_for_Kelheim-Actual_Data-Jan-Mar_2023-Kelheim-Actual_Data-Jan-Mar_2023_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") +VIAdata2023_2 <- read.csv2("VIA_data/zz__previous-data-samples/Via_data_2023-07-10/Data_request_TUB_for_Kelheim-Actual_Data-Apr-Jul_2023-Kelheim-Actual_Data-Apr-Jul_23_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") +VIAdata2023_3 <- read.csv2("VIA_data/zz__previous-data-samples/Via_data_2023-10-24/Data_request_TUB_for_Kelheim-Actual_Data-Jul-Oct_2023-Kelheim-Actual_Data-Jul-Oct_23_edited.csv", stringsAsFactors = FALSE, header = TRUE, encoding = "UTF-8", na.strings="") VIAdataAll <- union(VIAdata2021, VIAdata2022_1) @@ -76,17 +76,19 @@ for(dataset in datasets) { p <- ggplot(data=reqProTag) + geom_line(mapping=aes(x=date, y=n), col="#69b3a2") + geom_area(mapping=aes(x=date, y=n), fill="#69b3a2", alpha=0.5) + - labs(x="Tag",y="Requests", title="Zeitverlauf der Anfragen pro Tag (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=4), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) + + labs(x="Tag",y="Requests", title="Zeitverlauf der Anfragen pro Tag") + + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18, angle=90), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold")) + scale_x_date(breaks = "3 month") - + plotFile = paste0("plots/",names[i],"/KEXI_requests_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p ############ @@ -99,14 +101,16 @@ for(dataset in datasets) { p <- ggplot(data=reqProWochentag) + geom_bar(mapping=aes(x=weekday, y=avg), stat="identity") + labs(x="Wochentag",y="Durchschn. Anzahl Requests", title="Durchschn. Anzahl Requests pro Wochentag (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=4), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold")) plotFile = paste0("plots/",names[i],"/KEXI_requests_weekdays_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p @@ -121,14 +125,16 @@ for(dataset in datasets) { geom_line(mapping=aes(x=interval * 5/60, y=n), col="#69b3a2") + geom_area(mapping=aes(x=interval * 5/60, y=n), fill="#69b3a2", alpha=0.5) + labs(x="Stunde", y="Anzahl Requests pro Intervall", title="Requests pro 5 Minuten-Intervall (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=4), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) - + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold")) + plotFile = paste0("plots/",names[i],"/KEXI_requests_daily_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p @@ -149,15 +155,17 @@ for(dataset in datasets) { p <- ggplot(data=ridesProTag) + geom_line(mapping=aes(x=date, y=n), col="#69b3a2") + geom_area(mapping=aes(x=date, y=n), fill="#69b3a2", alpha=0.5) + - labs(x="Tag", y="Fahrten", title="Zeitverlauf der Fahrten pro Tag (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=2), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) + + labs(x="Tag", y="Fahrten", title="Zeitverlauf der KEXI-Fahrten (konv.) pro Tag") + + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18, angle = 90), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold"))+ scale_x_date(breaks = "3 month") plotFile = paste0("plots/",names[i],"/KEXI_rides_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p @@ -191,15 +199,16 @@ for(dataset in datasets) { #plot avg nr of requests per weekday p <- ggplot(data=ridesProWochentag) + geom_bar(mapping=aes(x=weekday, y=avg), stat="identity") + - labs(x="Tag", y="Durchschn. Anzahl Fahrten", title="Durchschn. Anzahl Fahrten pro Wochentag (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=4), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) - + labs(x="Tag", y="Durchschn. Anzahl Fahrten", title="Durchschn. Anzahl Fahrten pro Wochentag") + + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold")) plotFile = paste0("plots/",names[i],"/KEXI_rides_weekdays_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p ################ @@ -213,16 +222,18 @@ for(dataset in datasets) { p <- ggplot(data=saturdays) + geom_line(mapping=aes(x=date, y=n), col="#69b3a2") + geom_area(mapping=aes(x=date, y=n), fill="#69b3a2", alpha=0.5) + - labs(x="Tag",y="Fahrten", title="Zeitverlauf der Fahrten pro Samstag (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=2), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) + + labs(x="Tag",y="Fahrten", title="Zeitverlauf der Fahrten pro Samstag") + + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18, angle = 90), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold")) + scale_x_date(breaks = "3 month") plotFile = paste0("plots/",names[i],"/KEXI_rides_saturdays_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p ############## @@ -254,15 +265,17 @@ for(dataset in datasets) { p <- ggplot(data=ridesPerInterval) + geom_line(mapping=aes(x=interval*5/60, y=n), col="#69b3a2") + geom_area(mapping=aes(x=interval*5/60, y=n), fill="#69b3a2", alpha=0.5) + - labs(x="Stunde",y="Anzahl Fahrten", title="Fahrten pro 5-Minuten-Intervall (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=4), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) + labs(x="Stunde",y="Anzahl Fahrten", title="Fahrten pro 5-Minuten-Intervall") + + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold")) plotFile = paste0("plots/",names[i],"/KEXI_rides_daily_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p @@ -277,15 +290,16 @@ for(dataset in datasets) { p <- ggplot(data=saturdays_day) + geom_line(mapping=aes(x=interval*5/60, y=n), col="#69b3a2") + geom_area(mapping=aes(x=interval*5/60, y=n), fill="#69b3a2", alpha=0.5) + - labs(x="Stunde",y="Anzahl Fahrten", title="SA: Fahrten pro 5-Minuten-Intervall (VIA)") + - theme(plot.title = element_text(hjust=0.5, size=3.5, face="bold"), axis.text.x = element_text(size=4), - axis.title.x = element_text(size=4, face="bold"), axis.text.y = element_text(size=4), - axis.title.y = element_text(size=4, face="bold")) - + labs(x="Stunde",y="Anzahl Fahrten", title="SA: Fahrten pro 5-Minuten-Intervall") + + theme(plot.title = element_text(hjust=0.5, size=28, face="bold"), + axis.text.x = element_text(size=18), + axis.title.x = element_text(size=22, face="bold"), + axis.text.y = element_text(size=18), + axis.title.y = element_text(size=22, face="bold")) plotFile = paste0("plots/",names[i],"/KEXI_rides_saturdays_daily_VIA.png") paste0("printing plot to ", plotFile) - ggsave(plotFile, limitsize = FALSE) + ggsave(plotFile, limitsize = FALSE, dpi = 600, width = 32, height = 18, units = "cm") p ################################################################# @@ -314,8 +328,8 @@ for(dataset in datasets) { labs(x="Stunde",y="Anzahl pro Intervall") + scale_color_manual(values = c("darkgreen" , "darkred", "steelblue")) - - + p + requests_timeDiffs <- dataset %>% select(Request.Creation.Time, Requested.Time) %>% mutate(diff = seconds(Requested.Time - Request.Creation.Time)) %>% From d87d926831b5893231d1800c3feb3a12b300622a Mon Sep 17 00:00:00 2001 From: schlenther Date: Wed, 11 Sep 2024 12:25:00 +0200 Subject: [PATCH 3/5] improve/bug fix dashboards --- .../EmissionsPostProcessingAverageAnalysis.java | 10 ++++++++-- .../analysis/postAnalysis/NoiseAverageAnalysis.java | 8 ++++++-- .../dashboard/AverageKelheimEmissionsDashboard.java | 2 ++ .../matsim/dashboard/AverageKelheimNoiseDashboard.java | 4 ++++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/matsim/analysis/postAnalysis/EmissionsPostProcessingAverageAnalysis.java b/src/main/java/org/matsim/analysis/postAnalysis/EmissionsPostProcessingAverageAnalysis.java index ce66b34..2ed4a58 100644 --- a/src/main/java/org/matsim/analysis/postAnalysis/EmissionsPostProcessingAverageAnalysis.java +++ b/src/main/java/org/matsim/analysis/postAnalysis/EmissionsPostProcessingAverageAnalysis.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.text.NumberFormat; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; @@ -168,12 +169,16 @@ public Integer call() throws Exception { // grid per hour means calcGridMeans(gridPerHourStats, meanGridPerHour); + NumberFormat nf = NumberFormat.getInstance(Locale.US); + nf.setMaximumFractionDigits(4); + nf.setGroupingUsed(false); + // write total mean stats try (CSVPrinter printer = new CSVPrinter(Files.newBufferedWriter(output.getPath("mean_emissions_total.csv")), CSVFormat.DEFAULT)) { printer.printRecord(POLLUTANT, "kg"); for (Map.Entry e : meanTotal.entrySet()) { - printer.printRecord("mean-" + e.getKey(), e.getValue()); + printer.printRecord("" + e.getKey() + " (mean)", nf.format(e.getValue())); } } @@ -221,7 +226,8 @@ private void getGridData(Table gridTable, Map, List, Double> values) throws IOException { try (CSVPrinter printer = new CSVPrinter(Files.newBufferedWriter(output.getPath(fileName)), CSVFormat.DEFAULT)) { - printer.printRecord("# EPSG:25832"); + //set the projection in the YAML instead, as this is put out with a quote atm... + //printer.printRecord("# EPSG:25832"); printer.printRecord("time", "x", "y", VALUE); for (Map.Entry, Double> e : values.entrySet()) { diff --git a/src/main/java/org/matsim/analysis/postAnalysis/NoiseAverageAnalysis.java b/src/main/java/org/matsim/analysis/postAnalysis/NoiseAverageAnalysis.java index 5c853dc..14da560 100644 --- a/src/main/java/org/matsim/analysis/postAnalysis/NoiseAverageAnalysis.java +++ b/src/main/java/org/matsim/analysis/postAnalysis/NoiseAverageAnalysis.java @@ -32,6 +32,8 @@ import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.util.*; import java.util.concurrent.atomic.AtomicReference; @@ -140,19 +142,21 @@ public Integer call() throws Exception { XYTData damagesPerDayMean = calcAvroMeans(damagesPerDay, "damages_receiverPoint"); XYTData damagesPerHourMean = calcAvroMeans(damagesPerHour, "damages_receiverPoint"); + DecimalFormat df = new DecimalFormat("#.###", DecimalFormatSymbols.getInstance(Locale.US)); + // write emission mean stats try (CSVPrinter printer = new CSVPrinter(Files.newBufferedWriter(output.getPath("mean_emission_per_day.csv")), CSVFormat.DEFAULT)) { printer.printRecord(LINK_ID, VALUE); for (Map.Entry e : meanEmissionsPerDay.entrySet()) { - printer.printRecord(e.getKey(), e.getValue()); + printer.printRecord(e.getKey(), df.format(e.getValue())); } } // write total mean stats try (CSVPrinter printer = new CSVPrinter(Files.newBufferedWriter(output.getPath("mean_noise_stats.csv")), CSVFormat.DEFAULT)) { for (Map.Entry e : meanTotalStatsPerDay.entrySet()) { - printer.printRecord(e.getKey(), e.getValue()); + printer.printRecord(e.getKey(), df.format(e.getValue())); } } diff --git a/src/main/java/org/matsim/dashboard/AverageKelheimEmissionsDashboard.java b/src/main/java/org/matsim/dashboard/AverageKelheimEmissionsDashboard.java index ba6201d..5cef300 100644 --- a/src/main/java/org/matsim/dashboard/AverageKelheimEmissionsDashboard.java +++ b/src/main/java/org/matsim/dashboard/AverageKelheimEmissionsDashboard.java @@ -104,12 +104,14 @@ public void configure(Header header, Layout layout) { layout.row("second").el(GridMap.class, (viz, data) -> { viz.title = "CO₂ Emissions"; viz.description = "per day. Be aware that CO2 values are provided in the simulation sample size!"; + viz.projection = "EPSG:25832"; viz.height = 12.0; viz.file = postProcess(data, "mean_emissions_grid_per_day.xyt.csv"); }); layout.row("third") .el(GridMap.class, (viz, data) -> { viz.title = "CO₂ Emissions"; + viz.projection = "EPSG:25832"; viz.description = "per hour. Be aware that CO2 values are provided in the simulation sample size!"; viz.height = 12.; viz.file = postProcess(data, "mean_emissions_grid_per_hour.csv"); diff --git a/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java b/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java index 370d9f1..3a24899 100644 --- a/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java +++ b/src/main/java/org/matsim/dashboard/AverageKelheimNoiseDashboard.java @@ -82,6 +82,7 @@ public void configure(Header header, Layout layout) { viz.cellSize = 250; viz.opacity = 0.2; viz.maxHeight = 20; + viz.projection = "EPSG:25832"; viz.center = data.context().getCenter(); viz.zoom = data.context().mapZoomLevel; viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{DARK_BLUE, LIGHT_BLUE, YELLOW, SAND, ORANGE, RED}); @@ -94,6 +95,7 @@ public void configure(Header header, Layout layout) { viz.cellSize = 250; viz.opacity = 0.1; viz.maxHeight = 40; + viz.projection = "EPSG:25832"; viz.center = data.context().getCenter(); viz.zoom = data.context().mapZoomLevel; viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{DARK_BLUE, LIGHT_BLUE, YELLOW, SAND, ORANGE, RED}); @@ -109,6 +111,7 @@ public void configure(Header header, Layout layout) { viz.maxHeight = 40; viz.center = data.context().getCenter(); viz.zoom = data.context().mapZoomLevel; + viz.projection = "EPSG:25832"; viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{DARK_BLUE, LIGHT_BLUE, YELLOW, SAND, ORANGE, RED}); viz.file = postProcess(data, "mean_damages_receiverPoint_per_day.avro"); }) @@ -119,6 +122,7 @@ public void configure(Header header, Layout layout) { viz.cellSize = 250; viz.opacity = 0.2; viz.maxHeight = 40; + viz.projection = "EPSG:25832"; viz.center = data.context().getCenter(); viz.zoom = data.context().mapZoomLevel; viz.setColorRamp(new double[]{30, 40, 50, 60, 70}, new String[]{DARK_BLUE, LIGHT_BLUE, YELLOW, SAND, ORANGE, RED}); From 55d68b8de022ac4b673af24415b073d6ec3e195a Mon Sep 17 00:00:00 2001 From: schlenther Date: Wed, 11 Sep 2024 12:25:23 +0200 Subject: [PATCH 4/5] minor --- src/main/R/drtAnalysis/plotRunSummaries.R | 2 +- src/main/R/drtAnalysis/readValuesFromRunSummaries.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/R/drtAnalysis/plotRunSummaries.R b/src/main/R/drtAnalysis/plotRunSummaries.R index 485050d..cf2f502 100644 --- a/src/main/R/drtAnalysis/plotRunSummaries.R +++ b/src/main/R/drtAnalysis/plotRunSummaries.R @@ -4,7 +4,7 @@ library(tidyr) mainDir <- "E:/matsim-kelheim/v3.1.1/output-KEXI-2.45-AV--0.0/" -transposed_result <- read.csv(paste(mainDir, "results-deutsch.csv", sep=""), check.names = FALSE, sep =";") +transposed_result <- read.csv(paste(mainDir, "results-deutsch.csv", sep=""), check.names = FALSE, sep =",") #names(transposed_result) <- make.names(names(transposed_result), unique = TRUE, allow_ = FALSE) # Betriebszeiten umschreiben diff --git a/src/main/R/drtAnalysis/readValuesFromRunSummaries.R b/src/main/R/drtAnalysis/readValuesFromRunSummaries.R index 348f80a..eb278b6 100644 --- a/src/main/R/drtAnalysis/readValuesFromRunSummaries.R +++ b/src/main/R/drtAnalysis/readValuesFromRunSummaries.R @@ -28,7 +28,7 @@ read_stats <- function(folder_path, file_name) { csv_path <- file.path(folder_path, "analysis/drt-drt-av", file_name) if (file.exists(csv_path)) { - df <- read_csv(csv_path) + df <- read_csv(csv_path, show_col_types = FALSE) mean_values <- df %>% select(parameter, mean) return(mean_values) } else { From b4c1713b0cffa670163cf2cd03c207719aaf2662 Mon Sep 17 00:00:00 2001 From: schlenther Date: Thu, 12 Sep 2024 13:28:24 +0200 Subject: [PATCH 5/5] update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 20c3a91..0be0af9 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ This scenario contains a 25pct sample of Kelheim and its surrounding area; road The **MATSim program code** in this repository is distributed under the terms of the [GNU General Public License as published by the Free Software Foundation (version 2)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html). The MATSim program code are files that reside in the `src` directory hierarchy and typically end with `*.java`. -The **MATSim input files, output files, analysis data and visualizations** are licensed under a Creative Commons Attribution 4.0 International License. -Creative Commons License
MATSim input files are those that are used as input to run MATSim. They often, but not always, have a header pointing to matsim.org. They typically reside in the `scenarios` directory hierarchy. MATSim output files, analysis data, and visualizations are files generated by MATSim runs, or by postprocessing. They typically reside in a directory hierarchy starting with `output`. +The **MATSim input files, output files, analysis data and visualizations** are licensed under a Creative Commons Attribution 4.0 International License. +Creative Commons License
MATSim input files are those that are used as input to run MATSim. They often, but not always, have a header pointing to matsim.org. They typically reside in the `input` directory hierarchy. MATSim output files, analysis data, and visualizations are files generated by MATSim runs, or by postprocessing. They typically reside in a directory hierarchy starting with `output`. **Other data files**, in particular in `original-input-data`, have their own individual licenses that need to be individually clarified with the copyright holders.