rl-institut / rl-institut/simbev

Exports don't work properly when start and end date are the same

Open
#83 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
13
Forks
9
PR merge metrics
No merged PRs in 30d

Description

This error happened on a test run with same start and end date:
File "/home/moritz/github/simbev/simbev/simbev_class.py", line 166, in run car_array = car.export(region_directory, self) File "/home/moritz/github/simbev/simbev/car.py", line 324, in export post_event_len = activity.at[activity.index[1], "event_start"] File "/home/moritz/github/simbev/venv/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 5039, in __getitem__ return getitem(key) IndexError: index 1 is out of bounds for axis 0 with size 1

Additionally, the integrated plots don't use all available data, but cut off the last day

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the same start and end date run and inspect simbev/car.py around line 324, called from simbev/simbev_class.py line 166. Verify that exports no longer fail with a single-row activity index and that the integrated plots include the final day; the plot implementation is not identified in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data, data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.