Category Archives: Pandas

Calculating distance from Lat & Lon coordinates using Python & Pandas

Given a GPS log file structured as follows (column separators omitted for clarity): Speed Latitud Longitud Time 2019-01-07 06:15:27 0 59.649582 17.721365 2019-01-07 06:16:28 0 59.649583 17.721372 2019-01-07 06:17:28 0 59.649583 17.721370 2019-01-07 06:18:28 0 59.649583 17.721372 2019-01-07 06:19:29 0 … Continue reading

Posted in Data Analytics, Math, Nautical Information Systems, Pandas, Python | Tagged , , , , | Leave a comment

Vasaloppet 2018 – race time analysis

An analysis of race times for the ~11000 men and ~2000 women that participated in 2018 Vasaloppet. For explanations of the graphs, see earlier posts on Marcialonga or Tour de Ski. [Btw, the weird looking vertical orange/blue “spike” in the … Continue reading

Posted in Data Analytics, Numpy, Pandas, Python, sports, Statistics, Web | Tagged , , , , | Leave a comment

Tour de Ski Final climb – does age matter for performance ?

In an earlier post, I analyzed data from the Marcialonga Ski race. Marcialonga is one of the classic long distance ski races, where both elite’ as well as amateurs compete together. In fact, the vast majority of the competitors in … Continue reading

Posted in Bayes, Data Analytics, Math, Numpy, Pandas, Probability, PYMC, Python, SNA, sports, Statistics | Tagged , , , , , , , , | Leave a comment

Marcialonga Ski 2018 – some Analytics

Now, with the power grid finally – after 62 hours! – back in business, I’m able to continue my stats/analytics exploration of the past Marcialonga ski race. First, some basic stats about the race: Total number of participants: 5558, of … Continue reading

Posted in Bayes, Data Analytics, Numpy, Pandas, Probability, PYMC, Python, sports, Statistics | Tagged , , , , , , , , , | Leave a comment

Bayesian Linear Regression with PYMC

Python, Pandas & PYMC example on Bayesian Linear Regression, adopted from Richard McElreath’s “Statistical Rethinking” class, where he uses R as modeling language instead of PYMC. Data in a csv-file describe various attributes such as weight, height, age, gender etc … Continue reading

Posted in Bayes, Data Analytics, Numpy, Pandas, Probability, PYMC, Python, Statistics | Tagged , , , , , , , | Leave a comment

Python & Pandas to map gps coordinates to known locations

Assume you have a gps log file, with time and position (Lat,Lon in columns 9,10) info, like: 2018.12.12 00:41:20;0;0;0;0;0;1;0;25.8;59.348978;17.969643;0;0; 2018.12.12 01:41:21;0;0;0;0;0;1;0;25.7;59.348962;17.969627;0;0; 2018.12.12 02:41:21;0;0;0;0;0;1;0;25.7;59.349;17.969688;0;0; 2018.12.12 03:41:21;0;0;0;0;0;1;0;25.7;59.349;17.96966;0;0; 2018.12.12 04:41:22;0;0;0;0;0;1;0;25.6;59.349007;17.969618;0;0; 2018.12.12 04:48:50;0;0;0;0;1;1;1;25.2;59.349007;17.969635;0;0; 2018.12.12 04:49:51;0;0.001;0;0;1;1;1;28.3;59.349;17.969642;0;0; Assume further that you’d like to map each of … Continue reading

Posted in Maritime Technology, Nautical Information Systems, Numpy, Pandas, Python | Tagged , , , | Leave a comment