HSLdevcom / mal-effect-calculations

Impact assessment scripts for the Helsinki region MAL planning process
https://www.hsl.fi/hsl/mal
European Union Public License 1.2
1 stars 0 forks source link

Change agent data pre-processing #13

Closed attesn closed 3 years ago

attesn commented 3 years ago

Previously agent data has been combined in data pre-processing before plotting. However, this does not work if analysis is not based on predefined groups.

Move group/combine to plotting scripts and data pre-processing includes only cleaning and defining variables :

PR also removes car access from zones plotting as this result is no longer produced by Helmet-model.

attesn commented 3 years ago

Sure! Sorry I forgot that column names of input data had some changes.

I've later changed the Helmet input data to have two tables agents and tours. This requires further updates to R scripts. Would you prefer that I add those changes here as well, or should I make a new PR?

johpiip commented 3 years ago

@atte-wsp Hmm, you can add it here since it is further "changing agent data preprocessing". :) I'll review this once you've pushed new commits and uploaded the V2030_ve0_rm data.

attesn commented 3 years ago

@johpiip Helmet data is updated to Sharepoint folders and changes are added here. I've been using V2030_mal19_v1 environment in config file.

attesn commented 3 years ago

@johpiip Seems that some refactoring of code is still needed as calculation is quite complicated and slow after latest changes. I'll comment here when done.

johpiip commented 3 years ago

No problem, I will wait until you are done, @atte-wsp! :)

johpiip commented 3 years ago

Hey @atte-wsp, sorry to bug you, but I glanced through some of your code. As a pre-review comment, could you Ctrl+Shift+F for library(sf) calls, and edit them so that you first call library(tidyverse) and then library(sf)? And could check that the results stay the same? sf docs recommend that particular order: https://r-spatial.github.io/sf/reference/tidyverse.html If the coordinates cause problems, you can sf::st_drop_coordinates() before using dplyr verbs.

attesn commented 3 years ago

Data pre-processing is ready for review. I'll add another branch for plotting as there are tons of updates coming with new effects and removing / updating old ones.