Commit 9f8454dd authored by Aurore Sallard's avatar Aurore Sallard
Browse files

Fixing minor bugs

parent a180d984
Pipeline #81508 failed with stage
......@@ -10,11 +10,11 @@ import data.utils
import data.spatial.utils
from tqdm import tqdm
def configure(context, require):
require.config("output_path")
require.config("raw_data_path")
require.config("analysis_path")
require.stage("analysis.import_syn_trips")
def configure(context):
context.config("output_path")
context.config("raw_data_path")
context.config("analysis_path")
context.stage("analysis.import_syn_trips")
def import_data_synthetic(context):
......
......@@ -10,11 +10,11 @@ import data.utils
import data.spatial.utils
from tqdm import tqdm
def configure(context, require):
require.config("output_path")
require.config("raw_data_path")
require.config("analysis_path")
require.stage("analysis.import_syn_trips")
def configure(context):
context.config("output_path")
context.config("raw_data_path")
context.config("analysis_path")
context.stage("analysis.import_syn_trips")
def import_data_synthetic(context):
......
......@@ -10,10 +10,10 @@ import data.utils
import data.spatial.utils
from tqdm import tqdm
def configure(context, require):
require.config("output_path")
require.config("raw_data_path")
require.config("analysis_path")
def configure(context):
context.config("output_path")
context.config("raw_data_path")
context.config("analysis_path")
def import_data_synthetic(context):
......
......@@ -10,11 +10,11 @@ import data.utils
import data.spatial.utils
from tqdm import tqdm
def configure(context, require):
require.config("output_path")
require.config("raw_data_path")
require.config("analysis_path")
require.stage("analysis.import_syn_trips")
def configure(context):
context.config("output_path")
context.config("raw_data_path")
context.config("analysis_path")
context.stage("analysis.import_syn_trips")
def import_data_synthetic(context):
......
......@@ -5,10 +5,10 @@ import xml.etree.ElementTree as ET
import gzip
import shutil
def configure(context, require):
require.config("output_path")
require.config("raw_data_path")
require.config("analysis_path")
def configure(context):
context.config("output_path")
context.config("raw_data_path")
context.config("analysis_path")
def import_data(context):
......
# General pipeline settings
working_directory: /home/tchervec/Documents/data/switzerland/cache
flowchart_path: /home/tchervec/Documents/data/switzerland/flowchart.json
working_directory: /home/asallard/Scenarios/Switzerland/cache
flowchart_path: /home/asallard/Scenarios/Switzerland/cache/flowchart.json
dryrun: false
# Requested stages
run:
# - data.microcensus.trips
# - data.statpop.projections.households
# - data.statpop.scaled
- population.matched
# - data.statpop.persons
# - data.statpop.projections.households
# - data.statpop.scaled
# - population.matched
# - population.output
- matsim.run
# These are configuration options that we use in the pipeline
config:
......@@ -22,4 +24,5 @@ config:
scaling_year: 2020
use_freight: true
hafas_date: 01.10.2018
data_path: /home/tchervec/Documents/data/switzerland/data
data_path: /home/asallard/Scenarios/Switzerland/Data
output_path: /home/asallard/Scenarios/Switzerland/output
......@@ -2,9 +2,11 @@ import numpy as np
import pandas as pd
import pyproj
import data.constants as c
from tqdm import tqdm
def configure(context):
context.config("data_path")
context.config("output_path")
def execute(context):
data_path = context.config("data_path")
......@@ -164,7 +166,7 @@ def execute(context):
"mode_detailed"
]]
df_mz_trips.to_csv("%s/microcensus_trips.csv" % context.config["output_path"], encoding = "latin1", index = False)
df_mz_trips.to_csv("%s/microcensus_trips.csv" % context.config("output_path"), encoding = "latin1", index = False)
return df_mz_trips[[
"person_id", "trip_id", "departure_time", "arrival_time", "mode", "purpose", "destination_x", "destination_y", "origin_x", "origin_y",
......
def configure(context):
context.config("data_path")
def execute(context):
data_path = context.config("data_path")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment