Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Rework visualization module #513

Merged
merged 7 commits into from
Aug 17, 2023
Merged

ENH: Rework visualization module #513

merged 7 commits into from
Aug 17, 2023

Conversation

bifbof
Copy link
Collaborator

@bifbof bifbof commented Aug 16, 2023

This one turned out to be bigger than expected.
closes #506
My first motivation was to remove the positionfixes.plot override.
But I realized that with all these plot functions cascading calls to each other, it would be much easier to put them into one function that does everything in one go. So I created ti.plot.
With only one function to remember, it is also easier to use trackintel.
The rest of the module was so small that I decided to put them in one file. The resulting file is still quite small at 465 LOC.
So a big part of this PR is just collecting and cleaning things up.
But I know I did a lot in one go, so if you want me to split up some changes or decide to do something else, let me know :)

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage: 97.19% and project coverage change: +0.17% 🎉

Comparison is base (9f1b15a) 92.88% compared to head (4f6dc62) 93.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #513      +/-   ##
==========================================
+ Coverage   92.88%   93.05%   +0.17%     
==========================================
  Files          40       34       -6     
  Lines        2136     2074      -62     
  Branches      395      388       -7     
==========================================
- Hits         1984     1930      -54     
+ Misses        133      130       -3     
+ Partials       19       14       -5     
Files Changed Coverage Δ
trackintel/analysis/modal_split.py 100.00% <ø> (ø)
trackintel/model/locations.py 100.00% <ø> (ø)
trackintel/model/positionfixes.py 100.00% <ø> (ø)
trackintel/model/staypoints.py 100.00% <ø> (ø)
trackintel/model/tours.py 89.47% <ø> (-0.53%) ⬇️
trackintel/model/triplegs.py 100.00% <ø> (ø)
trackintel/model/trips.py 100.00% <ø> (ø)
trackintel/visualization/plotting.py 97.12% <97.12%> (ø)
trackintel/__init__.py 100.00% <100.00%> (ø)
trackintel/visualization/__init__.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@hongyeehh hongyeehh left a comment

Choose a reason for hiding this comment

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

Look fine to me; thanks for the cleanup and change!
I would request another reviewer for this large PR.

Copy link
Member

@NinaWie NinaWie left a comment

Choose a reason for hiding this comment

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

Great effort! I think this cleanup makes the plotting a lot nicer!

trackintel/visualization/plotting.py Outdated Show resolved Hide resolved
@bifbof bifbof merged commit 11c36f3 into mie-lab:master Aug 17, 2023
7 checks passed
@bifbof bifbof deleted the rem_plot branch August 17, 2023 16:08
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.

Move as_positionfixes.plot method into separate function
3 participants