From 340ea9bf2e53d6b368c5a60914d124e0d3f833d8 Mon Sep 17 00:00:00 2001 From: Kasper Welbers Date: Mon, 6 Nov 2023 13:54:24 +0100 Subject: [PATCH] updae --- public/port-0.0.0-py3-none-any.whl | Bin 10210 -> 10193 bytes .../py/dist/port-0.0.0-py3-none-any.whl | Bin 10210 -> 10193 bytes src/framework/processing/py/port/script.py | 82 +++++---- src/framework/types/visualizations.ts | 2 +- .../ui/elements/figures/recharts_graph.tsx | 29 ++-- .../react/ui/pages/donation_page.tsx | 92 +++++----- .../prepareChartData.ts | 164 ++++++++++++------ .../visualizationDataFunctions/util.ts | 144 +++++++++------ src/index.tsx | 2 +- 9 files changed, 310 insertions(+), 205 deletions(-) diff --git a/public/port-0.0.0-py3-none-any.whl b/public/port-0.0.0-py3-none-any.whl index f85ee4fb23f540f1968995ace2e9943a11669a9f..25bbcd5f364e4cfe89e257142c64ace5e2579f62 100644 GIT binary patch delta 5990 zcmV-s7n$hdPti}X&kTQT|2obK6#xJsRR91E0001RZ*p`mb7OL8aC9zkdF5PtZ{tRi z|KFdY!@=B8yBx+2u=j^?ULZS##ZqlOX zv(qC6uZDMhQw|%8+peh%b;P{(W|H-qcS&A`@H9`Kvp&8$@lO*uqPZkTV8gLwkNd$eBOu}f%(|lp9d}AY)^zc;#mSQ zVcUlE*P7J$9p^Qb8wH}10C%^oVQ4(ZgOu~&Eqs3suAHfD>iidTJSH?_p8b^>2kFjz z^yzuob6t3s^CDxRt{ah*t`2+9;Nnhn6%57@w-NcORbMV;cY`4KiPQ=~ijfPdKQDm&=>?o zYe0X2qEt`XKJU^+LCv!kLKs>Nkh8u`*Bs-hkP>2I+T3A-v5`x#198xLP(oxNq$5Jv zUomq)X+l%zp-of`bL^@z1T#Wl4MvM*hzy&#>b%kR?27&QjGfrFDVe317b{w&mgNbGM zX`3&bN_|x4RiFylp+5-&mQ+JzAs?1H?S95Smn+V>W`w9C=y9#4OT z$#L?NA-P2YBONjCtA;VUFX8cQb|ti~MF5h(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Yq}`r2qm%pP}=y^Z1K;`5G@fGc;=@>9L!fsl?MZh!Tfk{J_8LlF->6NUa^0FwJKHoP~>T4Nxj$K=q=}btgh9dgdLp{CZ zLgy7i8EB;sKztY8%V7T=4{n73kV3vTfK|I@)W>2 zfan`uZFnBC--~L+cttM_3G7Z13GfY(RLIGzgv9{aB{r`~OrV~pe-QdtqT=;_!0L8~ z_}mxw{=m4VVzV1wT~xP>vT}p1z;fmsUq>imJnaplE93+-vEbQmZm(qWZe2Nq(eX<0 zkj6C}p3$0ow48qcqz+_%mh-X^C1Nsxel!qLriTLU0+z-CrO>|vWGDNeU#-jS3zKL0 zx@Z&pF$6U`o>DIT`43=N11r0@uZ#9j=3H)EFF-r!2+;ASAE}7`N(8tM@bmBpL8`(F zY<&inaDwkRNZkjYJ{_Ar9+y7C{xm$i6o{~c57o~QiKt{qzW_i7FybfO+*j%cewne~ z0vM)Emef#)!;R@W2uH~VLM$|^PcPR{9?YH&Hb zlE;zmCYosJmBOQfcJKsB{0N9x8R$c+Rl60){r>^8_#vSI1eB#I?vtG(Cx3O&&2p+R z00rQEpCz=23Bg4d2&hoy9}za0h&luXQVAA$`rA%#=ep>fv;XFt!`rKPA%rzd5c16L zpew0@)K|#-CdtMvYWL^F7MBHDjk03iOpKep%CCrQo6fApiwyysJ@GGwa`r2QO)KD) zwwgy&BC%bk5^{`V9~{GTjepz?chY=0Eu(&s0QsL(v~^9JL-!!v#@(^b0FpGJ5&!@I diff --git a/src/framework/processing/py/dist/port-0.0.0-py3-none-any.whl b/src/framework/processing/py/dist/port-0.0.0-py3-none-any.whl index f85ee4fb23f540f1968995ace2e9943a11669a9f..25bbcd5f364e4cfe89e257142c64ace5e2579f62 100644 GIT binary patch delta 5990 zcmV-s7n$hdPti}X&kTQT|2obK6#xJsRR91E0001RZ*p`mb7OL8aC9zkdF5PtZ{tRi z|KFdY!@=B8yBx+2u=j^?ULZS##ZqlOX zv(qC6uZDMhQw|%8+peh%b;P{(W|H-qcS&A`@H9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d5c16L zpew0@)K|#-CdtMvYWL^F7MBHDjk03iOpKep%CCrQo6fApiwyysJ@GGwa`r2QO)KD) zwwgy&BC%bk5^{`V9~{GTjepz?chY=0Eu(&s0QsL(v~^9JL-!!v#@(^b0FpGJ5&!@I diff --git a/src/framework/processing/py/port/script.py b/src/framework/processing/py/port/script.py index 26a5b9c..d62551d 100644 --- a/src/framework/processing/py/port/script.py +++ b/src/framework/processing/py/port/script.py @@ -264,50 +264,22 @@ def extract_videos_viewed(data): df = pd.DataFrame(video_counts, columns=["Date", "Videos"]) df["Timeslot"] = map_to_timeslot(df["Date"].dt.hour) - df["Date"] = df["Date"].dt.strftime("%Y-%m-%d") + df["Date"] = df["Date"].dt.strftime("%Y-%m-%d %H:00:00") df = df.reindex(columns=["Date", "Timeslot", "Videos"]) visualizations = [ props.PropsUIChartVisualization( title=props.Translatable( { - "en": "Number of videos per timeslot", - "nl": "Aantal bekeken videos per tijdslot", + "en": "Number of videos watched for every hour of the day", + "nl": "Aantal videos bekeken per uur van de dag", } ), type="bar", - group=props.PropsUIChartGroup( - column="Timeslot", - levels=[ - "0-1", - "1-2", - "2-3", - "3-4", - "4-5", - "5-6", - "6-7", - "7-8", - "8-9", - "9-10", - "10-11", - "11-12", - "12-13", - "13-14", - "14-15", - "15-16", - "16-17", - "17-18", - "18-19", - "19-20", - "20-21", - "21-22", - "22-23", - "23-24", - ], - ), + group=props.PropsUIChartGroup(column="Date", dateFormat="hour_cycle"), values=[ props.PropsUIChartValue( - label="N", column="Videos", aggregate="sum", addZeroes=True + column="Videos", aggregate="sum", addZeroes=True ) ], ) @@ -372,7 +344,7 @@ def extract_comments_and_likes(data): df = pd.merge(df1, df2, left_on="Date", right_on="Date", how="outer").sort_index() df["Timeslot"] = map_to_timeslot(df.index.hour) - df["Date"] = df.index.strftime("%Y-%m-%d") + df["Date"] = df.index.strftime("%Y-%m-%d %H:00:00") df = ( df.reindex(columns=["Date", "Timeslot", "Comment posts", "Likes given"]) .reset_index(drop=True) @@ -381,7 +353,26 @@ def extract_comments_and_likes(data): df["Comment posts"] = df["Comment posts"].astype(int) df["Likes given"] = df["Likes given"].astype(int) - visualizations = [] + visualizations = [ + props.PropsUIChartVisualization( + title=props.Translatable( + { + "en": "Number of comments and likes for every hour of the day", + "nl": "Aantal comments en likes per uur van de dag", + } + ), + type="bar", + group=props.PropsUIChartGroup(column="Date", dateFormat="hour_cycle"), + values=[ + props.PropsUIChartValue( + label="Comments and likes", + column="Date", + aggregate="count", + addZeroes=True, + ) + ], + ) + ] return ExtractionResult( "tiktok_comments_and_likes", @@ -408,7 +399,26 @@ def extract_session_info(data): df = df.drop("End", axis=1) df = df.drop("Duration", axis=1) - visualizations = [] + visualizations = [ + props.PropsUIChartVisualization( + title=props.Translatable( + { + "en": "Number of minutes spent on TikTok", + "nl": "Aantal minuten besteed aan TikTok", + } + ), + type="line", + group=props.PropsUIChartGroup(column="Start", dateFormat="auto"), + values=[ + props.PropsUIChartValue( + label="Nr. of minutes", + column="Duration (in minutes)", + aggregate="sum", + addZeroes=True, + ) + ], + ) + ] return ExtractionResult( "tiktok_session_info", diff --git a/src/framework/types/visualizations.ts b/src/framework/types/visualizations.ts index c13acf8..2bf9a61 100644 --- a/src/framework/types/visualizations.ts +++ b/src/framework/types/visualizations.ts @@ -65,6 +65,7 @@ export interface AxisSettings { } export type TickerFormat = 'percent' | 'default' +export type XType = 'string' | 'date' export interface ChartVisualizationData { type: 'line' | 'bar' | 'area' @@ -87,5 +88,4 @@ export type DateFormat = | 'hour' | 'month_cycle' | 'weekday_cycle' - | 'day_cycle' | 'hour_cycle' diff --git a/src/framework/visualisation/react/ui/elements/figures/recharts_graph.tsx b/src/framework/visualisation/react/ui/elements/figures/recharts_graph.tsx index 5b30507..e69bfa0 100644 --- a/src/framework/visualisation/react/ui/elements/figures/recharts_graph.tsx +++ b/src/framework/visualisation/react/ui/elements/figures/recharts_graph.tsx @@ -22,8 +22,9 @@ interface Props { visualizationData: ChartVisualizationData } -export default function RechartsGraph({ visualizationData }: Props): JSX.Element | null { - function tooltip(): JSX.Element { +export default function RechartsGraph ({ visualizationData }: Props): JSX.Element | null { + console.log(visualizationData) + function tooltip (): JSX.Element { return ( - - {secondary && } + + {secondary && } ) } - function legend(): JSX.Element { + function legend (): JSX.Element { return ( ) @@ -83,7 +84,7 @@ export default function RechartsGraph({ visualizationData }: Props): JSX.Element + {chart} ) } -function getLineStyle(index: number): { color: string; dash: string } { +function getLineStyle (index: number): { color: string, dash: string } { const COLORS = ['#4272EF', '#FF5E5E', '#FFCF60', '#1E3FCC', '#CC3F3F', '#CC9F3F'] const DASHES = ['1', '5 5', '10 10', '5 5 10 10'] @@ -157,7 +158,7 @@ function getLineStyle(index: number): { color: string; dash: string } { return { color: COLORS[row], dash: DASHES[column] } } -function getTickFormatters(yKeys: AxisSettings[]): { +function getTickFormatters (yKeys: AxisSettings[]): { tickFormatter: ((value: number) => string) | undefined tickFormatter2: ((value: number) => string) | undefined } { @@ -179,7 +180,7 @@ function getTickFormatters(yKeys: AxisSettings[]): { return { tickFormatter, tickFormatter2 } } -function getTickFormatter(format: TickerFormat): ((value: number) => string) | undefined { +function getTickFormatter (format: TickerFormat): ((value: number) => string) | undefined { if (format === 'percent') return (value: number) => `${value}%` return undefined } diff --git a/src/framework/visualisation/react/ui/pages/donation_page.tsx b/src/framework/visualisation/react/ui/pages/donation_page.tsx index 1c3a57d..12ef3d3 100644 --- a/src/framework/visualisation/react/ui/pages/donation_page.tsx +++ b/src/framework/visualisation/react/ui/pages/donation_page.tsx @@ -1,74 +1,74 @@ -import React from "react"; -import { Weak } from "../../../../helpers"; -import TextBundle from "../../../../text_bundle"; -import { Translator } from "../../../../translator"; -import { Translatable } from "../../../../types/elements"; -import { PropsUIPageDonation } from "../../../../types/pages"; +import React from 'react' +import { Weak } from '../../../../helpers' +import TextBundle from '../../../../text_bundle' +import { Translator } from '../../../../translator' +import { Translatable } from '../../../../types/elements' +import { PropsUIPageDonation } from '../../../../types/pages' import { isPropsUIPromptConfirm, isPropsUIPromptConsentForm, isPropsUIPromptFileInput, isPropsUIPromptRadioInput, - isPropsUIPromptQuestionnaire, -} from "../../../../types/prompts"; -import { ReactFactoryContext } from "../../factory"; -import { ForwardButton } from "../elements/button"; -import { Title1 } from "../elements/text"; -import { Confirm } from "../prompts/confirm"; -import { ConsentForm } from "../prompts/consent_form"; -import { FileInput } from "../prompts/file_input"; -import { Questionnaire } from "../prompts/questionnaire"; -import { RadioInput } from "../prompts/radio_input"; -import { Footer } from "./templates/footer"; + isPropsUIPromptQuestionnaire +} from '../../../../types/prompts' +import { ReactFactoryContext } from '../../factory' +import { ForwardButton } from '../elements/button' +import { Title1 } from '../elements/text' +import { Confirm } from '../prompts/confirm' +import { ConsentForm } from '../prompts/consent_form' +import { FileInput } from '../prompts/file_input' +import { Questionnaire } from '../prompts/questionnaire' +import { RadioInput } from '../prompts/radio_input' +import { Footer } from './templates/footer' // import { Sidebar } from './templates/sidebar' // import LogoSvg from '../../../../../assets/images/logo.svg' -import { Page } from "./templates/page"; -import { Progress } from "../elements/progress"; +import { Page } from './templates/page' +import { Progress } from '../elements/progress' // import { Instructions } from '../elements/instructions' -type Props = Weak & ReactFactoryContext; +type Props = Weak & ReactFactoryContext export const DonationPage = (props: Props): JSX.Element => { - const { title, forwardButton } = prepareCopy(props); + const { title, forwardButton } = prepareCopy(props) // const { platform, locale, resolve } = props - const { locale, resolve } = props; + const { locale, resolve } = props - function renderBody(props: Props): JSX.Element { - const context = { locale: locale, resolve: props.resolve }; - const body = props.body; + function renderBody (props: Props): JSX.Element { + const context = { locale: locale, resolve: props.resolve } + const body = props.body if (isPropsUIPromptFileInput(body)) { - return ; + return } if (isPropsUIPromptConfirm(body)) { - return ; + return } if (isPropsUIPromptConsentForm(body)) { - return ; + return } if (isPropsUIPromptRadioInput(body)) { - return ; + return } if (isPropsUIPromptQuestionnaire(body)) { - return ; + return } - throw new TypeError("Unknown body type"); + throw new TypeError('Unknown body type') } - function handleSkip(): void { - resolve?.({ __type__: "PayloadFalse", value: false }); + function handleSkip (): void { + resolve?.({ __type__: 'PayloadFalse', value: false }) } const footer: JSX.Element = (