% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/counts.R, R/network.R, R/output_persons.R,
%   R/output_trips.R
\docType{package}
\name{readCounts}
\alias{readCounts}
\alias{loadNetwork}
\alias{readPersonsTable}
\alias{boxplotScoreDifferences}
\alias{matsimr-deprecated}
\alias{plotModalSplitPieChart}
\alias{plotModalSplitBarChart}
\alias{readTripsTable}
\alias{plotAverageTravelWait}
\alias{compareAverageTravelWait}
\alias{plotModalDistanceDistribution}
\alias{compareModalDistanceDistribution}
\alias{plotTripDistanceByMode}
\alias{plotTripCountByDepTime}
\alias{plotActivityEndTimes}
\alias{plotArrivalTimesPerTripPurpose}
\alias{plotDepartureTimesPerTripPurpose}
\alias{plotTripDistancedByType}
\alias{plotModalShiftSankey}
\alias{plotModalShiftBar}
\alias{plotMapWithFilteredTrips}
\alias{plotMapWithTrips}
\alias{plotTripTypesPieChart}
\alias{compareTripTypesBarChart}
\alias{plotMapWithTripsType}
\alias{compareBasePolicyOutput}
\alias{compareBasePolicyShapeOutput}
\alias{appendDistanceCategory}
\alias{filterByRegion}
\alias{deriveODMatrix}
\alias{getCrsFromConfig}
\alias{transformToSf}
\alias{plotStartActCountByDepTime}
\title{Deprecated Function}
\usage{
readCounts(file)

loadNetwork(filename)

readPersonsTable(input_path = ".", n_max = Inf)

boxplotScoreDifferences(personTibble_base, personTibble_policy)

plotModalSplitPieChart(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotModalSplitBarChart(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

readTripsTable(input_path = ".", n_max = Inf)

plotAverageTravelWait(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

compareAverageTravelWait(
  tripsTable1,
  tripsTable2,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotModalDistanceDistribution(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

compareModalDistanceDistribution(
  tripsTable1,
  tripsTable2,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotTripDistanceByMode(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotTripCountByDepTime(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotActivityEndTimes(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotArrivalTimesPerTripPurpose(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotDepartureTimesPerTripPurpose(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)

plotTripDistancedByType(
  tripsTable,
  shapeTable,
  crs,
  dump.output.to = matsimDumpOutputDirectory
)

plotModalShiftSankey(
  tripsTable1,
  tripsTable2,
  show.onlyChanges = FALSE,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory
)

plotModalShiftBar(
  tripsTable1,
  tripsTable2,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  output.name = "modalShiftBarChart"
)

plotMapWithFilteredTrips(
  table,
  shapeTable,
  crs,
  start.inshape = TRUE,
  end.inshape = TRUE,
  optimized = FALSE
)

plotMapWithTrips(table, crs, optimized = FALSE)

plotTripTypesPieChart(table, shapeTable, crs)

compareTripTypesBarChart(
  tripsTable1,
  tripsTable2,
  shapeTable,
  crs,
  dump.output.to = matsimDumpOutputDirectory
)

plotMapWithTripsType(table, shapeTable, crs, optimized = FALSE)

compareBasePolicyOutput(
  baseFolder,
  policyFolder,
  dump.output.to = matsimDumpOutputDirectory
)

compareBasePolicyShapeOutput(
  baseFolder,
  policyFolder,
  shapeFilePath,
  crs,
  dump.output.to = matsimDumpOutputDirectory
)

appendDistanceCategory(tripsTable)

filterByRegion(
  tripsTable,
  shapeTable,
  crs,
  start.inshape = TRUE,
  end.inshape = TRUE
)

deriveODMatrix(
  tripsTable,
  shapePath,
  crs,
  dump.output.to = matsimDumpOutputDirectory,
  simwrapper = FALSE,
  colnames = "numeric",
  outer = FALSE
)

getCrsFromConfig(folder)

transformToSf(table, crs, geometry.type = st_multipoint())

plotStartActCountByDepTime(
  tripsTable,
  unite.columns = character(0),
  united.name = "united",
  dump.output.to = matsimDumpOutputDirectory,
  only.files = FALSE
)
}
\arguments{
\item{file}{File to load. Must be an .xml file}

\item{filename}{File to load. Can be XML or gzipped XML}

\item{input_path}{character string, path to MATSim output directory or http link to the file.}

\item{n_max}{integer, maximum number of lines to read within output_trips}

\item{personTibble_base}{persons tibble of the base case, can be loaded with readPersonsTable.}

\item{personTibble_policy}{persons tibble of the policy case, can be loaded with readPersonsTable.}

\item{tripsTable}{tible of trips_output (from readTripsTable())}

\item{unite.columns}{vector of character strings, that represent patterns of columns to be united, changes name of all transport modes in the tibble copy to united.name = "united" that matches PATTERNS given in unite.columns}

\item{united.name}{character string, if columns were united, you can specify name for the resulting column in chart}

\item{dump.output.to}{folder that saves and configures yaml for simwrapper dashboard. folder where png of plot is stored}

\item{only.files}{boolean, that represent if plotting inside project is needed, by default FALSE - means function gives out a plot by plot_ly}

\item{tripsTable1}{tibble of trips_output (from \link{read_output_trips},f.e. base case)}

\item{tripsTable2}{tibble of trips_output (from \link{read_output_trips},f.e. policy case)}

\item{shapeTable}{sf object(data.frame with geometries), can be received by using st_read(path_to_geographical_file)}

\item{crs}{numeric of EPSG code or proj4string, can be found in network file from output directory of MATSim simulation}

\item{show.onlyChanges}{boolean, if it is set to TRUE => sankey diagram only contains changes on axes}

\item{output.name}{test}

\item{table}{tibble of trips_output (from \link{read_output_trips})}

\item{start.inshape}{bool, defines trips to conclude (see Description)}

\item{end.inshape}{bool, defines trips to conclude (see Description)}

\item{optimized}{bool, by default FALSE and gives interactive plot using leaflet, if TRUE using image with ggplot}

\item{baseFolder}{specifies data source folder with multiple base output_trips}

\item{policyFolder}{specifies data source folder with multiple policy output_trips}

\item{shapeFilePath}{specifies shapeFile used for comparison}

\item{shapePath}{full path to shapefile (if simwrapper TRUE, folder with shapeFile should contain also .dbf with the same name)}

\item{simwrapper}{create output in a simwrapper form if set to path of the shapefile}

\item{colnames}{if the specific shapefile contains known columns, they could be specified as name for columns OD. If not given then they get numeric values}

\item{outer}{logical that represent if the table should contain outside flow of the shape, it isn't}

\item{folder}{specifies path to find config}

\item{geometry.type}{function of sf transformation, geometry.type can be (by default is st_multipoint())\cr
!!!st_point()-resulting table contains 2 geometries start_wkt and end_wkt, representing start and end POINTs, and have type POINT!!!  or \cr
!!!st_multipoint()-resulting table contains 1 geometry wkt, representing start and end POINTS as MULTIPOINT!!! or \cr
!!!st_linestring() - resulting table contains 1 geometry wkt, representing line between start and end points as LINESTRING!!!}
}
\value{
\strong{readCounts} - tibble with MATSim link id ("loc_id") as key

\strong{loadNetwork} - "nodes" and "links" tibbles in a list object.

\strong{readPersonsTable} - tibble of output_persons

\strong{boxplotScoreDifferences} - ggplot boxplot of the distribution of the score differences

\strong{plotModalSplitPieChart} - Pie Chart plot of transport mode distribution, values given in percents

\strong{plotModalSplitBarChart} - Bar Chart plot of transport mode distribution, values given in percents

\strong{readTripsTable} - tibble of output_trips

\strong{plotAverageTravelWait} - Bar Chart plot of average time spent on travel/wait

\strong{plotModalDistanceDistribution} Bar Chart plot of count of trips among distance travelled

\strong{compareModalDistanceDistribution} - Bar Chart plot of count of trips among distance travelled

\strong{plotTripDistanceByMode} - Bar Chart plot of distance traveled per mode

\strong{plotTripCountByDepTime} - Line Chart plot of trips count by departure mode per mode

\strong{plotActivityEndTimes} Line plot with departure time x-axis and number start activities on y-axis

\strong{plotArrivalTimesPerTripPurpose} - Line plot with arrival time x-axis and number end activities on y-axis

\strong{plotDepartureTimesPerTripPurpose} -  Line plot with arrival time x-axis and number end activities on y-axis

\strong{plotTripDistancedByType} - Bar Chart plot of distance traveled by type

\strong{plotModalShiftSankey} - Alluvial diagram that represents changes in transport mode distribution of trip tables

\strong{plotModalShiftBar} - plots Bar Chart of transport mode changes with additional files for simwrapper

\strong{plotMapWithFilteredTrips} - plot with trips filtered depending on flags *.inshape on map from shapeTable

\strong{plotMapWithTrips} - plot with trips

\strong{plotTripTypesPieChart} - plot with percentage of each type of trips

\strong{compareTripTypesBarChart} - plot with percentage of each type of trips between 2 tables

\strong{plotMapWithTripsType} - plot that contains every trip with defined trip type

\strong{compareBasePolicyOutput} - list of tibbles, list of all base and policy output_trips as tibble

\strong{compareBasePolicyShapeOutput} - list of tibbles, list of all base and policy output_trips as tibble

tibble of output_trips with distance category column

\strong{filterByRegion} - tibble, with filtered trips depending on shapeTable and special flags (see Description)

\strong{deriveODMatrix} - tibble of origin/destination matrix

\strong{getCrsFromConfig} - code of coordinate reference system

\strong{transformToSf} - sf object (data.frame with geometries depending to geometry.type)

Bar Chart plot of distance traveled per mode
}
\description{
\strong{readCounts} - Loads a MATSim Counts XML-file as tibble into memory

\strong{loadNetwork} - Loads a MATSim XML network file, creating a nodes tibble and a links tibble.
Any node and link attribute records in the network are stored as
additional columns in the respective node and link tibbles.\cr
The links table is automatically joined with the nodes table so that
node x/y coordinates (and any other node attributes) are available on the
links table without additional processing.

\strong{readPersonsTable} - Loads a MATSim CSV output_persons from file or archive,
creating a tibble with columns as in csv file
copied + adopted code from readTripsTable in tripsOutput.R

\strong{boxplotScoreDifferences} - function generates a boxplot to compare the score differences between two sets of data
represented by personTibble_base and personTibble_policy tibbles.
It provides insights into the distribution of score differences between the two sets of data.

These functions are provided for compatibility with older version of
the matsimr package.  They may eventually be completely
removed.\cr\cr
\strong{plotModalSplitPieChart} - Takes Table trips_output (from \link{read_output_trips}),
to plot pie chart with with values that represent
percentage of using transport modes from trips

\strong{plotModalSplitBarChart} - Takes Table trips_output (from \link{read_output_trips}),
to plot bar chart with with values that represent
percentage of using transport modes from trips

\strong{readTripsTable} - Loads a MATSim output_trips file from file or archive path,
creating a tibble

\strong{plotAverageTravelWait} - Takes Table trips_output (from \link{read_output_trips}),
to plot bar chart with with values that represent
time spent on traveling/waiting
Using parameters unite.columns, specific columns could be given,
to unite them in 1 mode with the name united_name(by default 'united')

\strong{plotModalDistanceDistribution} - Takes Table trips_output (from \link{read_output_trips}),
to plot bar chart with with values that represent
number of trips ~ distance travelled
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united_name(by default 'united')

\strong{compareModalDistanceDistribution} - Takes 2 Tables trips_output (from \link{read_output_trips}),
to plot bar chart with with values that represent
difference of number of trips between tripsTable2 and tripsTable1 ~ distance travelled
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united_name(by default 'united')

\strong{plotTripDistanceByMode} - Takes Table trips_output (from \link{read_output_trips}),
to plot bar chart with with values that represent
average distance traveled ~ main mode used
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united_name(by default 'united')

\strong{plotTripCountByDepTime} - Takes Table trips_output (from \link{read_output_trips}),
to make line plot with with values that represent
count of trips for a specific departure time by main_mode
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united_name(by default 'united')

\strong{plotActivityEndTimes} - Takes Table trips_output (from \link{read_output_trips}),
to make line plot with with values that represent the
number of activities ending at a specific time.
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united_name(by default 'united')

\strong{plotArrivalTimesPerTripPurpose} - Takes Table trips_output (from \link{read_output_trips}),
to make line plot with with values that represent
count of destination activities for a specific arrival time
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united_name(by default 'united')

\strong{plotDepartureTimesPerTripPurpose} - Takes Table trips_output (from \link{read_output_trips}),
to make line plot with with values that represent
count of destination activities for a specific arrival time
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united_name(by default 'united')

\strong{plotTripDistancedByType} - Takes Table trips_output (from \link{read_output_trips}),
to plot bar chart with with values that represent
travelled distance of each tripType related to the shapeTable

\strong{plotModalShiftSankey} - Takes two trips_table (from \link{read_output_trips}), and collects
changes between transport mode distribution of these tables
to make alluvial diagram from this data\cr
Function calculates number of each transport mode used in
first and second table, and draws plot that represent how
distribution of transport mode has changed (f. e. what part of concrete trasport mode changed to another)
Using parameter unite.columns transport modes that match PATTERN in unite.columns can be united in 1 transport mode type (by default united_name is "united")
Using parameter show.onlyChanges

\strong{plotModalShiftBar} - Takes two trips_table (from \link{read_output_trips}), and collects
changes between transport mode distribution of these tables
to make bar chart diagram with dodging positioning from this data\cr
Function calculates number of each transport mode used in
first and second table, and draws plot that represent how
distribution of transport mode has changed (f. e. what part of concrete trasport mode changed to another)
Using parameter unite.columns transport modes that match PATTERN in unite.columns can be united in 1 transport mode type (by default united_name is "united")
Using parameter show.onlyChanges

\strong{plotMapWithFilteredTrips} - Takes trips_table and shapeTable(sf object from file representing geographical data, can be received by using function st_read(path_to_file))
transforms both objects to match mutual CRS(network.xml from MATSimOutputDirectory)
and filters the trips from table depending on *.inshape flags:\cr
if start.inshape = TRUE & end.inshape = TRUE return table that contains trips inside given shape
\cr if start.inshape = TRUE & end.inshape = FALSE return table that contains trips which starts in shape and ends out of the shape
\cr if start.inshape = FALSE & end.inshape = TRUE return table that contains trips which ends in shape and starts out of the shape
\cr if start.inshape = FALSE & end.inshape = FALSE return table that contains trips which starts and ends our of the given shape
\cr result of filtering is plotted on map of shapeTable where green points are startpoints of trip and red points are endpoints of trip

\strong{plotMapWithTrips} - Plots start and end coordinates of the given trips table on an osm map

\strong{plotTripTypesPieChart} - plots distribution of every type of trips(inside, outside, origin and destinating) in Pie Chart

\strong{compareTripTypesBarChart} - Creates BarChart of changing trip types(originating,transit etc) between 2 tables
and saves output to dump.output.to

\strong{plotMapWithTripsType} - plots every type of trips(inside, outside, origin and destinating) on map

\strong{compareBasePolicyOutput} - Chooses a function to compare output_trips from the folders.
baseFolder contains all base outputs, policyFolder contains all policy outputs.

\strong{compareBasePolicyShapeOutput} - Chooses a function to compare output_trips from the folders.
baseFolder contains all base outputs, policyFolder contains all policy outputs.

\strong{appendDistanceCategory} - adds to trips output tibble additional column that represent distance as category

\strong{filterByRegion} - Filtering of trips_table(from \link{read_output_trips}) depending on how they located in given shape\cr
Takes trips_table and shapeTable(sf object from file representing geographical data, can be received by using function st_read(path_to_file).
Please be aware that this filterByRegion currently only works, when one geometry is loaded.)
transforms both objects to match mutual CRS(network.xml from MATSimOutputDirectory)
and filters the trips from table depending on *.inshape flags: \cr
if start.inshape = TRUE & end.inshape = TRUE return table that contains trips inside given shape\cr
if start.inshape = TRUE & end.inshape = FALSE return table that contains trips which starts in shape and ends out of the shape\cr
if start.inshape = FALSE & end.inshape = TRUE return table that contains trips which ends in shape and starts out of the shape\cr
if start.inshape = FALSE & end.inshape = FALSE return table that contains trips which starts and ends our of the given shape

\strong{deriveODMatrix} - Creates an instance of ODMatrix(origin/destination) in conventional form or for the simwrapper

\strong{getCrsFromConfig} - Reads an coordinate reference system of MATSim output directory
from output_config.xml

\strong{transformToSf} - Transforms trips_table tibble (from \link{read_output_trips}) from tibble to sf (table with attribute features and geometry feature)\cr
Takes trips_table (from \link{read_output_trips}) and transforms trips_table to sf object using start_x, end_x, start_y, end_y as a geometry features
deletes from resulting data.frame start_x, end_x, start_y, end_y.\cr
And adds wkt column, if geometry.type = st_mulitpoint(), or geometry.type = st_linestring()\cr
Or adds start_wkt and end_wkt, if geometry.type = st_point()\cr
Added column/columns projected to given CRS (coordinate reference system),
that can be taken from network file of MATSimOutputDirectory\cr
Function also sets attribute geometry.type to resulting table to character value of "POINT","MULTIPOINT","LINESTRING"
to get which type of table was generated, if it is needed

Takes Table trips_output (from readTripsTable()),
to plot scatter plot with with values that represent
count of start activities for a specific departure time by main_mode
Using parameters unite.columns, specific columns could be given, to unite them in 1 mode with the name united.name(by default 'united')
}
\section{Details}{

  \code{plotModalSplitPieChart} now a synonym for \code{\link{plot_mainmode_piechart}}\cr
  \code{plotModalSplitBarChart} now a synonym for \code{\link{plot_mainmode_barchart}}\cr
  \code{plotAverageTravelWait} now a synonym for \code{\link{plot_travelwaittime_mean_barchart}}\cr
  \code{plotModalDistanceDistribution} now a synonym for \code{\link{plot_distcat_by_mainmode_barchart}}\cr
  \code{plotTripDistanceByMode} now a synonym for \code{\link{plot_distance_by_mainmode_barchart}}\cr
  \code{plotTripCountByDepTime} now a synonym for \code{\link{plot_trips_count_by_deptime_and_mainmode_linechart}}\cr
  \code{plotActivityEndTimes} not part of package(contained false logic)\cr
  \code{plotArrivalTimesPerTripPurpose}now a synonym for \code{\link{plot_arrtime_by_act}}\cr
  \code{plotDepartureTimesPerTripPurpose} now a synonym for \code{\link{plot_deptime_by_act}}\cr
  \code{plotTripTypesPieChart} now a synonym for \code{\link{plot_spatialtype_by_shape_piechart}}\cr
  \code{plotMapWithFilteredTrips}not part of package, you can filter before drawing a map\cr
  \code{plotMapWithTrips}now a synonym for \code{\link{plot_map_trips}}\cr
  \code{plotMapWithTripsType} now a synonym for \code{\link{plot_map_trips_by_spatialcat}}\cr
  \code{plotTripDistancedByType} now a synonym for \code{\link{plot_distance_by_spatialcat_barchart}}\cr
  \code{plotModalShiftBar} now a synonym for \code{\link{plot_compare_mainmode_barchart}}\cr
  \code{plotModalShiftSankey} now a synonym for \code{\link{plot_compare_mainmode_sankey}}\cr
  \code{compareAverageTravelWait} now a synonym for \code{\link{plot_compare_travelwaittime_by_mainmode_barchart}}\cr
  \code{compareTripTypesBarChart}now a synonym for \code{\link{plot_compare_count_by_spatialcat_barchart}}\cr
  \code{compareModalDistanceDistribution}  now a synonym for \code{\link{plot_compare_distcat_by_mainmode_barchart}}\cr
  \code{compareBasePolicyOutput} is not used in new package version, and is prepared to be completely removed from package
  If you would like to keep it in new package, write at \strong{soboliev@campus.tu-berlin.de}\cr
  \code{compareBasePolicyShapeOutput} is not used in new package version, and is prepared to be completely removed from package
  If you would like to keep it in new package, write at \strong{soboliev@campus.tu-berlin.de}\cr
  \code{appendDistanceCategory}now a synonym for \code{\link{process_append_distcat}}\cr
  \code{filterByRegion} now a synonym for \code{\link{process_filter_by_shape}}\cr
  \code{deriveODMatrix} now a synonym for \code{\link{process_get_od_matrix}}\cr
  \code{getCrsFromConfig}now a synonym for \code{\link{process_get_crs_from_config}}\cr
  \code{transformToSf} now a synonym for \code{\link{process_convert_table_to_sf}}\cr
  \code{readTripsTable}now a synonym for \code{\link{read_output_trips}}\cr
  \code{readConfig} now a synonym for \code{\link{read_config}}\cr
}

