Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Map Docs#70

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
jesi-rgb wants to merge5 commits intosvelteplot:main
base:main
Choose a base branch
Loading
fromjesi-rgb:feat/map-docs
Draft

Map Docs#70

jesi-rgb wants to merge5 commits intosvelteplot:mainfromjesi-rgb:feat/map-docs

Conversation

@jesi-rgb
Copy link

@jesi-rgbjesi-rgb commentedMay 28, 2025
edited
Loading

fixes#10

@netlify
Copy link

netlifybot commentedMay 28, 2025
edited
Loading

Deploy Preview forsvelteplot ready!

NameLink
🔨 Latest commit8720aa0
🔍 Latest deploy loghttps://app.netlify.com/projects/svelteplot/deploys/6919c057f4acdc0008cabb75
😎 Deploy Previewhttps://deploy-preview-70--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify project configuration.

@jesi-rgbjesi-rgb changed the titlefirst attempt at map docsMap DocsMay 28, 2025
@jesi-rgbjesi-rgb marked this pull request as draftMay 28, 2025 10:08
@jesi-rgbjesi-rgb marked this pull request as ready for reviewMay 28, 2025 10:08
@jesi-rgbjesi-rgb marked this pull request as draftMay 28, 2025 14:25
@Wolfr
Copy link
Contributor

Awesome.

jesi-rgb reacted with heart emoji

@jesi-rgb
Copy link
Author

As I'm writing this section,@gka, I find it weird that the current available transforms are inside a "Map" category. As perd3-array's documentation, this lies under "Summarizing Data".

I would expect a Map transformer to receive a callback function that transforms the data in some way. For example, taking all Athlete names and converting them to a smaller format:

"Michael Phelps" → "M. Phelps"
"Aaron Brown" → "A. Brown"

This is a small example but I think it gets the point across of what I'm trying to say.

Maybe the current "Map" section could be called "Summarize", a series of transformations to summarize the data, in which we can now include the rest of the available methods, like sum, min, max, and so on.

Maybe I'm understanding it wrong, though! Would love if you could shed some light on this topic!

@jamesscottbrown
Copy link
Contributor

Maybe the current "Map" section could be called "Summarize", a series of transformations to summarize the data, in which we can now include the rest of the available methods, like sum, min, max, and so on.

I'd expect amapfunction to transform a list of values to a list of the same length, but containing modified values.

I'd expect asummarize function to transform a list of values to a single value.

Cumsum, rank and quantile transform a list of values to another list of values, so I think they're more appropriately described asmap thansummarize.

However, I would generally expect amap function to act on each value individually. There might be an alternative name that is clearer, butMap is what Observable Plot uses and it woud be good to maintain API compatability.

@jesi-rgb
Copy link
Author

However, I would generally expect a map function to act on each value individually. There might be an alternative name that is clearer, but Map is what Observable Plot uses and it woud be good to maintain API compatability.

I guess this is the core issue: it's a cumsum is a Map because it receives an array and outputs an array of the same size, but output is dependent on all elements

GlobalMap, or something along those lines could work. I do agree, though, to stick to Observable's API naming. In fact, I was trying to stick with d3's!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

docs: Map transform docs need some 💙

3 participants

@jesi-rgb@Wolfr@jamesscottbrown

[8]ページ先頭

©2009-2025 Movatter.jp