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

Add learning by sector,regions bar chart and Map for learning #1577

Draft
wants to merge 2 commits into
base: project/operational-learning-2.0
Choose a base branch
from

Conversation

roshni73
Copy link
Collaborator

@roshni73 roshni73 commented Dec 5, 2024

Addresses:

Changes

  • Add learning by sector, region, and source overtime chart.
  • Add Map view for operational learning

This PR doesn't introduce:

  • typos
  • conflict markers
  • unwanted comments
  • temporary files, auto-generated files or secret keys
  • console.log meant for debugging
  • codegen errors

Copy link

changeset-bot bot commented Dec 5, 2024

⚠️ No Changeset found

Latest commit: e13a0c3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

app/src/views/OperationalLearning/index.tsx Outdated Show resolved Hide resolved
},
[],
);
const timeseriesChartClassNameSelector = () => styles.sourceChart;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this out of component.

Comment on lines 365 to 412
const xAxisFormatter = (date: Date) => date.toLocaleString(
navigator.language,
{ month: 'short' },
);
const timeSeriesValueSelector = useCallback(
(_: string, date: Date) => timeSeriesDataKeys?.find(
(source) => (
getFormattedDateKey(source.date) === getFormattedDateKey(date)
),
)?.count ?? 0,
[],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can move this to out of component.

Comment on lines 542 to 613
heading="Map"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use translation strings.

Comment on lines 554 to 556
keySelector={(item) => item.id}
valueSelector={(item) => item.value}
labelSelector={(item) => item.name}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not use arrow functions as props.

Comment on lines 567 to 569
keySelector={(item) => item.id}
valueSelector={(item) => item.value}
labelSelector={(item) => item.name}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not pass arrow functions as props to the component.

/>
</Container>
<Container
heading="learnings by regions"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use translation strings.

/>
<div className={styles.charts}>
<Container
heading="learnings by sectors"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use translation strings.

/>
</Container>
<Container
heading="Source overtime"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use translation strings.

@samshara samshara self-requested a review December 10, 2024 09:58
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from e80e0a5 to 3bde6b9 Compare December 11, 2024 04:21
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from 3bde6b9 to 3ef7309 Compare December 11, 2024 05:44
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from 3ef7309 to a9f5ebb Compare December 11, 2024 05:55
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from a9f5ebb to 3071d1b Compare December 11, 2024 06:39
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from 8ee38d7 to 6af5950 Compare December 12, 2024 05:27
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from 6af5950 to 087c25b Compare December 12, 2024 05:38
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from 9ad1428 to c289b84 Compare December 12, 2024 11:11
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from c289b84 to 0c9ac3f Compare December 12, 2024 11:17
@roshni73 roshni73 force-pushed the feature/add-charts-learnings branch from 0c9ac3f to bb76ad2 Compare December 13, 2024 04:38
@@ -0,0 +1,6 @@
{
"namespace": "learningMap",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"namespace": "learningMap",
"namespace": "operationalLearningMap",

{
"namespace": "learningMap",
"strings": {
"learningDownloadMapTitle": "Operational learning"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"learningDownloadMapTitle": "Operational learning"
"downloadMapTitle": "Operational learning map"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename file to OperationalLearningMap

Comment on lines 185 to 188
<MapLayer
layerKey="outer-circle"
layerOptions={outerCircleLayerOptionsForPersonnel}
/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this?

Comment on lines 57 to 77
const outerCirclePaintForPersonnel: CirclePaint = {
...baseOuterCirclePaint,
'circle-radius': [
'interpolate',
['linear', 1],
['get', 'learning'],

2,
5,
4,
7,
6,
9,
8,
11,
10,
13,
12,
15,
],
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are thinking of making the circles bigger based on learning count then we need to appropriately use the logic for defining stops.

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.

2 participants