Skip to content

Add regression script - #2

Open
catincalazar12345 wants to merge 3 commits into
mainfrom
catinca
Open

Add regression script#2
catincalazar12345 wants to merge 3 commits into
mainfrom
catinca

Conversation

@catincalazar12345

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread scripts/regression.py Outdated
return pd.DataFrame(rows)


all_dfs = [parse_tomtom_json(p) for p in Path("data/reports/json/").glob("*.json")]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unnecessary, there is no data/reports/json/ in the repo

Comment thread scripts/regression.py Outdated


df["date"] = pd.to_datetime(df["date"])
df["day_of_week"] = df["date"].dt.dayofweek # 0=Monday

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the comment

Comment thread scripts/regression.py Outdated

for result in seg["segmentTimeResults"]:
ts_id = result["timeSet"]
interval_name = timeset_lookup[ts_id] # e.g. "18:00-18:15"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the comment

Comment thread scripts/regression.py Outdated

def parse_tomtom_json(filepath):
with open(filepath) as f:
data = json.load(f)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to get the data from data/reports/dataframe.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants