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

customized notebook for CO2 values #21

Open
wants to merge 124 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
5717d5a
customized notebook for CO2 values
anna-eftas Apr 17, 2020
dac04f9
Converter from envirocar format to movingpandas & scikitmobility
May 19, 2020
0acfd22
added interpolation function
annaformaniuk May 19, 2020
9084e4d
init file
SbastianGarzon May 19, 2020
98346b3
consistent naming
annaformaniuk May 19, 2020
4a87ef0
envirocar __init__.py file
SbastianGarzon May 19, 2020
5bee9fd
cleaning and interpolating trajectory values
annaformaniuk May 19, 2020
e6d1c9f
updated visualization
annaformaniuk May 19, 2020
0ca5f13
plotly visualization of interpolated CO2
annaformaniuk May 19, 2020
af0154a
add explanation of track.id indexer for the data
saadsaifse May 21, 2020
cde40ca
update function summaries
saadsaifse May 21, 2020
910bdd9
plot unclean and non-interpolated data
saadsaifse May 21, 2020
3bc9b0b
more linting
annaformaniuk May 23, 2020
10fdfa5
add trajectory class, represent track as trajectory for further analysis
saadsaifse May 23, 2020
a053588
no bare exception for flake8
annaformaniuk May 24, 2020
f61d5ce
Merge remote-tracking branch 'refs/remotes/origin/feature/formatconve…
annaformaniuk May 24, 2020
8f67784
starting points for clustering and aggregation
annaformaniuk May 24, 2020
d07889b
added aggregation work in preprocessing.py and its usage in notebook
mmateenm90 May 27, 2020
fd200ea
add generalization method
Jun 1, 2020
ed84b45
update enum check
Jun 1, 2020
d0d64c9
revised aggregate() and added flow_between_regins()
mmateenm90 Jun 2, 2020
db20969
update generalization method
saadsaifse Jun 2, 2020
69c1af8
generalize and plot trajectory
saadsaifse Jun 2, 2020
556d429
added comments
mmateenm90 Jun 5, 2020
e79b2a2
interpolating and replicating all values and returning a gdf
annaformaniuk Jun 6, 2020
92f8139
Merge branch 'feature/basic-pre-processing' of https://github.com/ann…
annaformaniuk Jun 6, 2020
3854c23
Added function aggregateByGrid() and plotAggregate()
sigdelg Jun 7, 2020
15a6ab4
Merge branch 'feature/basic-pre-processing' of https://github.com/ann…
sigdelg Jun 7, 2020
6a8fb11
added three functions of temporal filters for Weekday, Hours and Date
mmateenm90 Jun 7, 2020
f218028
Merge branch 'feature/basic-pre-processing' of https://github.com/ann…
mmateenm90 Jun 7, 2020
f64c9b2
added three temporal filters function
mmateenm90 Jun 8, 2020
0574aed
showing a trajectory in a space-time cube
annaformaniuk Jun 9, 2020
77547b5
Merge remote-tracking branch 'refs/remotes/origin/feature/basic-pre-p…
annaformaniuk Jun 9, 2020
95ad55b
Interpolating all the measurements separately
annaformaniuk Jun 9, 2020
78f1573
absolute path problem fixed, tooltip added to choropleth
sigdelg Jun 10, 2020
d86c134
Similarity measures
Jun 16, 2020
755597e
Merge pull request #1 from annaformaniuk/feature/similarity
SbastianGarzon Jun 16, 2020
32d8349
format trajectory.py
SbastianGarzon Jun 16, 2020
790b7ba
fix format trajectory.py
SbastianGarzon Jun 16, 2020
0817761
Merge pull request #2 from annaformaniuk/feature/similarity
SbastianGarzon Jun 16, 2020
eadd025
merge generalize to pre-processing
saadsaifse Jun 20, 2020
5247a9a
Merge pull request #4 from annaformaniuk/feature/basic-pre-processing
saadsaifse Jun 20, 2020
225da43
remove trajectory ref from similarity measures, add generalization ty…
saadsaifse Jun 20, 2020
637d187
update traj collection
saadsaifse Jun 20, 2020
3e50595
Merge branch 'develop' into feature/visualisation
annaformaniuk Jun 20, 2020
66d4bf0
bring back traj collection function in preprocessing
saadsaifse Jun 20, 2020
6e8ce4b
remove dup functions
saadsaifse Jun 20, 2020
6d448f1
add aggregation and clustering work
saadsaifse Jun 20, 2020
62de2d8
remove dup function
saadsaifse Jun 20, 2020
c8b66db
Merge branch 'develop' into feature/visualisation
annaformaniuk Jun 20, 2020
e4c2a73
add track generalizer and geom utils
saadsaifse Jun 23, 2020
35c3ecc
Similarity measures implemented with movingpandas trajectories
Jun 23, 2020
7bc0060
Merge pull request #5 from annaformaniuk/feature/similarity_tools
SbastianGarzon Jun 23, 2020
713e961
update douglas-peucker algorithm
saadsaifse Jun 23, 2020
3149ab5
remove generalization methods from pre-processing class
saadsaifse Jun 23, 2020
598d696
write first version of algorithm
saadsaifse Jun 23, 2020
16e26a3
Update visualisation.py
mmateenm90 Jun 26, 2020
ff036eb
update generalization avg algorithm, results are still incorrect
saadsaifse Jun 26, 2020
cef9e9e
fix generlization distribution function
saadsaifse Jun 27, 2020
1cf0651
add distribution function to all generalizers
saadsaifse Jun 27, 2020
2137efc
add check if list of distribution columns is empty
saadsaifse Jun 27, 2020
51fee6d
run generalization on traj collection
saadsaifse Jun 27, 2020
cf8f703
Merge branch 'develop' into feature/custom_generalizer
saadsaifse Jun 27, 2020
4410173
Merge pull request #6 from annaformaniuk/feature/custom_generalizer
saadsaifse Jun 27, 2020
c254a89
added a function to calculate acceleration
annaformaniuk Jun 28, 2020
4ef4441
Merge remote-tracking branch 'origin/feature/visualisation' into feat…
annaformaniuk Jun 28, 2020
82903fb
Merge branch 'feature/visualisation' into feature/quality-assessment
annaformaniuk Jun 28, 2020
2f4dce3
added two correlation plots
annaformaniuk Jun 28, 2020
91b1d65
reformatted visualisation.py
annaformaniuk Jun 29, 2020
f1d51db
Merge branch 'feature/quality-assessment' into develop
annaformaniuk Jun 29, 2020
60465d2
finished reformatting
annaformaniuk Jun 29, 2020
a2d6ed3
Merge branch 'develop' into feature/quality-assessment
annaformaniuk Jun 29, 2020
9d8895a
Merge branch 'develop' into feature/visualisation
annaformaniuk Jun 29, 2020
9b0c12c
Merge remote-tracking branch 'refs/remotes/origin/develop'
annaformaniuk Jun 29, 2020
1e6ff75
Merge branch 'develop' into feature/quality-assessment
annaformaniuk Jun 29, 2020
bdd8277
Merge branch 'develop' into feature/visualisation
annaformaniuk Jun 29, 2020
d069d87
consistency!
annaformaniuk Jun 29, 2020
fbf3e3e
Merge branch 'develop' into feature/quality-assessment
annaformaniuk Jun 29, 2020
8b85964
Merge branch 'develop' into feature/visualisation
annaformaniuk Jun 29, 2020
9666af1
add visualization in notebook. 'self' correction in functions file
mmateenm90 Jun 29, 2020
0f81515
Merge branch 'feature/visualisation' of https://github.com/annaforman…
mmateenm90 Jun 29, 2020
0c7c8ee
Track similarity + generalization, changes of input (to collectionTra…
Jun 30, 2020
5f1793a
Merge pull request #7 from annaformaniuk/similarity_and_generalization
SbastianGarzon Jun 30, 2020
65466ee
adjusted acceleration for multiple tracks
annaformaniuk Jun 30, 2020
cbf1d83
remove similariy code from pre-processing example
saadsaifse Jun 30, 2020
0670113
add columns to generalized df
saadsaifse Jun 30, 2020
f89e79a
Merge branch 'develop' into feature/basic-pre-processing
annaformaniuk Jul 1, 2020
eb96b3e
add new notebook for generalization example
saadsaifse Jul 1, 2020
a2fed48
Generalized column name added
Jul 1, 2020
09b1fb8
Merge pull request #8 from annaformaniuk/generalization_id_similarity
SbastianGarzon Jul 1, 2020
4fe3964
more correlation analysis
annaformaniuk Jul 1, 2020
e79fea7
special approach to acceleration outliers
annaformaniuk Jul 1, 2020
fd8b3a5
Merge branch 'feature/quality-assessment' into develop
annaformaniuk Jul 1, 2020
163d733
interpolating meters, not seconds
annaformaniuk Jul 1, 2020
60bdc98
interpolating multiple tracks at once
annaformaniuk Jul 1, 2020
68c0339
add notebook descriptions. removed big chuck of visualization parts
mmateenm90 Jul 2, 2020
63aed94
added visualizations (same as preprocessing file)
mmateenm90 Jul 2, 2020
4ed5abe
Mosaic plot for spatio-temporal aggregation, Clustreing of tracks or…
sigdelg Jul 2, 2020
58df221
Merge branch 'feature/visualisation' of https://github.com/annaforman…
sigdelg Jul 2, 2020
b3e0b35
Visualisation notebook updated
sigdelg Jul 2, 2020
21aa851
finalized interpolation and quality
annaformaniuk Jul 2, 2020
b4d4032
redundant functions eliminated
sigdelg Jul 2, 2020
417a8a7
Merge branch 'feature/basic-pre-processing' into develop
annaformaniuk Jul 2, 2020
634d4be
Merge branch 'feature/visualisation'
annaformaniuk Jul 2, 2020
1590c61
removed individual assignment
annaformaniuk Jul 2, 2020
baa445a
corrected preprocessing notebook for my part
mmateenm90 Jul 2, 2020
1d96d9a
delete my redundant part from visualisation notebook
mmateenm90 Jul 2, 2020
75eb824
update generalization notebook with douglas peucker
saadsaifse Jul 2, 2020
4b8f157
removed more stuff from preprocessing notebook
annaformaniuk Jul 2, 2020
6553b49
Merge remote-tracking branch 'origin/develop' into develop
annaformaniuk Jul 2, 2020
2506904
update min distance generalizer
saadsaifse Jul 2, 2020
9f52b6d
merge dev
saadsaifse Jul 2, 2020
d3842ff
update min time delta, min distance generalizers, add examples
saadsaifse Jul 2, 2020
a734d4f
update preprocessing examples
saadsaifse Jul 2, 2020
5adabfc
merge dev to master
saadsaifse Jul 2, 2020
732f5af
add requirements and some spaces
annaformaniuk Jul 2, 2020
4e8591a
aggregation and visualization separated for size issue
sigdelg Jul 3, 2020
91920c0
Merge branch 'feature/visualisation' into develop
annaformaniuk Jul 3, 2020
a0e6dc3
fixed visualisation notebook
annaformaniuk Jul 3, 2020
e0c302f
Merge branch 'develop'
annaformaniuk Jul 3, 2020
9c20c77
update requirements
annaformaniuk Jul 3, 2020
3b36799
Avoid long generalization warning message
Jul 3, 2020
cf85b28
Merge pull request #9 from annaformaniuk/similarity_message
SbastianGarzon Jul 3, 2020
ef81b5e
Merge branch 'develop'
annaformaniuk Jul 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ venv/
*.ipynb_checkpoints/
**/*.html
dist/
build/
build/
.DS_Store
.mypy_cache/
7 changes: 6 additions & 1 deletion envirocar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from .client.client_config import ECConfig
from .client.download_client import DownloadClient
from .client.api.track_api import TrackAPI
from .client.request_param import BboxSelector, TimeSelector
from .client.request_param import BboxSelector, TimeSelector
from .trajectories.preprocessing import Preprocessing
from .trajectories.track_converter import TrackConverter
from .trajectories.visualisation import Visualiser
from .trajectories.track_generalizer import *
from .trajectories.track_similarity import *
1 change: 1 addition & 0 deletions envirocar/trajectories/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 26 additions & 0 deletions envirocar/trajectories/geom_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from math import sin, cos, atan2, radians, sqrt
from shapely.geometry import Point

R_EARTH = 6371000 # radius of earth in meters

def measure_distance_spherical(point1, point2):
"""Return spherical distance between two shapely Points as a float."""
if (type(point1) != Point) or (type(point2) != Point):
raise TypeError("Only Points are supported as arguments, got {} and {}".format(point1, point2))
lon1 = float(point1.x)
lon2 = float(point2.x)
lat1 = float(point1.y)
lat2 = float(point2.y)
delta_lat = radians(lat2 - lat1)
delta_lon = radians(lon2 - lon1)
a = sin(delta_lat/2) * sin(delta_lat/2) + cos(radians(lat1)) * cos(radians(lat2)) * sin(delta_lon/2) * sin(delta_lon/2)
c = 2 * atan2(sqrt(a), sqrt(1 - a))
dist = R_EARTH * c
return dist


def measure_distance_euclidean(point1, point2):
"""Return euclidean distance between two shapely Points as float."""
if (not isinstance(point1, Point)) or (not isinstance(point2, Point)):
raise TypeError("Only Points are supported as arguments, got {} and {}".format(point1, point2))
return point1.distance(point2)
Loading