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

DTREX-609 Data questions #78

Merged
merged 35 commits into from
May 10, 2022
Merged

DTREX-609 Data questions #78

merged 35 commits into from
May 10, 2022

Conversation

diogommartins
Copy link
Contributor

@diogommartins diogommartins commented Apr 20, 2022

Documentation

Local documentation accessible through mkdocs serve + http://127.0.0.1:8000/concepts/data-questions/

Examples

from amora.questions import QUESTIONS

for question in QUESTIONS:
    print(question)

How many data points where acquired?

SELECT sum(`step_count_by_source`.`value_count`) AS `total`
FROM `amora-data-build-tool.amora`.`step_count_by_source`

Answer

   total
0  18785

What are the available data sources?

SELECT DISTINCT `step_count_by_source`.`source_name`
FROM `amora-data-build-tool.amora`.`step_count_by_source`

Answer

    source_name
0  Diogo iPhone
1        Mi Fit
2        iPhone

What is the observation starting point?

SELECT min(`step_count_by_source`.`event_timestamp`) AS `event_timestamp`
FROM `amora-data-build-tool.amora`.`step_count_by_source`

Answer

            event_timestamp
0 2019-12-09 13:00:00+00:00

What is the latest data point?

SELECT max(`step_count_by_source`.`event_timestamp`) AS `event_timestamp`
FROM `amora-data-build-tool.amora`.`step_count_by_source`

Answer

            event_timestamp
0 2021-07-23 02:00:00+00:00

Qual o total de passos dados até hoje?

SELECT
  sum(`step_count_by_source`.`value_sum`) AS `total`,
  `step_count_by_source`.`source_name`
FROM `amora-data-build-tool.amora`.`step_count_by_source`
GROUP BY `step_count_by_source`.`source_name`

Answer

       total   source_name
0  1177603.0  Diogo iPhone
1  1422951.0        Mi Fit
2   147400.0        iPhone

What is the current estimated walked distance?

SELECT
  sum(`step_count_by_source`.`value_sum`) * 79 AS `total_in_centimeters`,
  (sum(`step_count_by_source`.`value_sum`) * 79) / 100 AS `total_in_meters`,
  (sum(`step_count_by_source`.`value_sum`) * 79) / 100000 AS `total_in_kilometers`,
  `step_count_by_source`.`source_name`
FROM `amora-data-build-tool.amora`.`step_count_by_source`
GROUP BY `step_count_by_source`.`source_name`

Answer

   total_in_centimeters  total_in_meters  total_in_kilometers   source_name
0            93030637.0        930306.37            930.30637  Diogo iPhone
1           112413129.0       1124131.29           1124.13129        Mi Fit
2            11644600.0        116446.00            116.44600        iPhone

diogommartins and others added 24 commits April 20, 2022 11:56
…ture_service` (#82)

* DTREX-613 Adds an unit test for `amora.feature_store.registry.get_feature_service`

* 0.1.10rc3
* Adiciona shed

* Adiciona pre-commit

* Formata código
…tore usage at `examples/amora_project/feature_store.ipynb`
@diogommartins diogommartins marked this pull request as ready for review May 3, 2022 18:13
@diogommartins diogommartins changed the title WIP: Data questions DTREX-608 Data questions May 3, 2022
@diogommartins diogommartins changed the title DTREX-608 Data questions DTREX-609 :: Data Questions May 4, 2022
@diogommartins diogommartins changed the title DTREX-609 :: Data Questions DTREX-609 Data questions May 4, 2022
amora/views.py Outdated Show resolved Hide resolved
amora/views.py Outdated Show resolved Hide resolved
amora/views.py Outdated Show resolved Hide resolved
amora/questions.py Outdated Show resolved Hide resolved
@diogommartins diogommartins requested a review from thulio May 10, 2022 17:49
@diogommartins diogommartins merged commit 0902def into main May 10, 2022
@diogommartins diogommartins deleted the feature/data-questions branch May 10, 2022 21:28
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.

None yet

2 participants