Skip to content

Commit

Permalink
delete path from r scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorRyb committed Nov 2, 2022
1 parent 0ca4eed commit df7a5a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/main/R/CarOwnershipRate.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ library(scales)
library(sf)

### trips.csv to get car use
completeTrips <- read_csv2("/Users/gregorr/Desktop/Test/Pkw_BEsitzraten/010.output_trips.csv.gz", col_types = cols(person = col_character()))
completeTrips <- read_csv2("output_trips.csv.gz", col_types = cols(person = col_character()))
##
persons <- read_csv2("/Users/gregorr/Desktop/Test/Pkw_BEsitzraten/010.output_persons.csv.gz", col_types = cols(person = col_character()))
persons <- read_csv2("output_persons.csv.gz", col_types = cols(person = col_character()))
## person2homeRegionAndCoord
person2region <- read_csv("/Users/gregorr/Documents/work/respos/shared-svn/projects/matsim-metropole-ruhr/metropole-ruhr-v1.0/input/metropole-ruhr-v1.4-25pct.plans-homes.csv",
person2region <- read_csv("metropole-ruhr-v1.4-25pct.plans-homes.csv",
col_types = cols(person = col_character(), home_x = col_double(), home_y = col_double()
))

shape <- st_read("/Users/gregorr/Documents/work/respos/shared-svn/projects/rvr-metropole-ruhr/data/shapeFiles/dvg2krs_ruhrgebiet-rvr/dvg2krs_ruhrgebiet-rvr.shp")
shape <- st_read("/dvg2krs_ruhrgebiet-rvr/dvg2krs_ruhrgebiet-rvr.shp")
person2region <- person2region %>%
st_as_sf(coords = c("home_x", "home_y"), crs = 25832) %>%
st_join(shape)
Expand Down Expand Up @@ -48,4 +48,4 @@ personsNrOfCarUsers <- pivot_wider(personsNrOfCarUsers, names_from = usedCar, va
#personsNrOfCarUsers <- rename(personsNrOfCarUsers, notUsedCar = "nrOfNoneCarUsers")
#personsNrOfCarUsers <- rename(personsNrOfCarUsers, usedCar= "nrOfCarUsers")

write_excel_csv2(personsNrOfCarUsers, "/Users/gregorr/Documents/work/respos/shared-svn/projects/rvr-metropole-ruhr/data/carAvailability/Pkw-Dichte_MATSim.csv")
write_excel_csv2(personsNrOfCarUsers, "Pkw-Dichte_MATSim.csv")
6 changes: 3 additions & 3 deletions src/main/R/NumberOfTrips.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ library(sf)


### trips.csv to get nrOfTrips
completeTrips <- read_csv2("/Users/gregorr/Documents/work/respos/runs-svn/rvr-ruhrgebiet/v1.2.1/036/036.output_trips.csv.gz")
completeTrips <- read_csv2("output_trips.csv.gz")
## persons.csv to get SNZ attributes
persons <- read_csv2("/Users/gregorr/Documents/work/respos/runs-svn/rvr-ruhrgebiet/v1.2.1/036/036.output_persons.csv.gz")
persons <- read_csv2("output_persons.csv.gz")

## person2homeRegionAndCoord
person2region <-read_csv2("/Users/gregorr/Documents/work/respos/runs-svn/rvr-ruhrgebiet/v1.2.1/036/person2Home.csv")
person2region <-read_csv2("person2Home.csv")
## joining person and persons2region
persons <- left_join(persons, person2region, by= "person")

Expand Down

0 comments on commit df7a5a2

Please sign in to comment.