Skip to content

Where do we use df_samples? #9

@pierretamisier

Description

@pierretamisier

I want to import all my strava data into the tool (1500+ activities since 2007) so I'm trying to import a csv extract from http://flink.run

In the datapull.refresh_database function, I replace the strava API call:

activities = client.get_activities(after=after, limit=0)

By this snippet:

if strava_connected():
                            athlete_id = 1  # TODO: Make this dynamic if ever expanding to more users
                            client = get_strava_client()
                            after = config.get('strava', 'activities_after_date')

                            activities = []

                            with open('strava.csv', newline='') as strava_csv:
                                reader = csv.DictReader(strava_csv)
                                for row in reader:
                                    act = stravalib.model.Activity(
                                        name=row['name'],
                                        distance=float(row['distance']) if row['distance'] else 0,
                                        moving_time=timedelta(int(row['moving_time'])) if row['moving_time'] else 0,
                                        elapsed_time=int(row['elapsed_time']) if row['elapsed_time'] else 0,
                                        total_elevation_gain=float(row['total_elevation_gain']) if row['total_elevation_gain'] else 0,
                                        type=row['type'],
                                        workout_type=row['workout_type'],
                                        id=row['id'],
                                        ...etc...
                                        activities.append(act)

Now the problem is downstream, the df_samples make an API call to get the streams of activity. I'm still not clear of what these df_samples are used for. Can someone post a screenshot of where they are used in the UI?

I'm trying to think of ways I can import archive data without blowing up the API calls rate limit (100 per 15min). What am I loosing if I don't have any df_samples in the tool? What are they used for in terms of KPIs?

I believe the strength of any charting tool resides in the ability to draw models on past data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions