8000 Completed AI/ML section and started on Fundamentals Section by kvdesai · Pull Request #70 · plotly/plotly.r-docs · GitHub
[go: up one dir, main page]

Skip to content

Completed AI/ML section and started on Fundamentals Section #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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Aug 17, 2021

Conversation

kvdesai
Copy link
Contributor
@kvdesai kvdesai commented Aug 5, 2021

AI/ML Section
PCA page
t-SNE and UMAP page

Fundamentals Section
multiple chart types page
Styling page
Horizontal and Vertical shapes page (with Dash)
Figure Label Page (with Dash)

@kvdesai kvdesai requested a review from HammadTheOne August 5, 2021 17:06
@HammadTheOne
Copy link
Collaborator

Nice to see the anglr install works!

I'm seeing another minor issue with the build. Seems like it passed at one point, but there's another URL in one of the .Rmd that's timing out and causing the build to fail.

@kvdesai
Copy link
Contributor Author
kvdesai commented Aug 6, 2021

Oh ok...will check

@kvdesai
Copy link
Contributor Author
kvdesai commented Aug 6, 2021

Looks like the old R code has multiple pages downloading data directly from https://stats.idre.ucla.edu
That server seems to be down as of now, and hence the build is failing. I am guessing that this is a criticlal issue for UCLA and hence should get fixed soon. Let's wait for a day?

@kvdesai
Copy link
Contributor Author
kvdesai commented Aug 6, 2021
8000

The university portal https://stats.idre.ucla.edu is back up again, and hence the build is now passing.
@HammadTheOne

@HammadTheOne
Copy link
Collaborator

@kvdesai Thanks for the update! This is the first time I've seen it happen, so it's fine for now, but if it becomes a recurring problem it might be worth locally storing and loading those datasets. It's out of the scope for this PR though, so we can come back to that if it becomes an issue.

Comment on lines 62 to 67
xaxis2=axis,
xaxis3=axis,
xaxis4=axis,
yaxis2=axis,
yaxis3=axis,
yaxis4=axis
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a better way to set multiple axes here? I was thinking maybe with subplots, but that seems just as verbose. We might just have to stick with this, but if you have any other ideas, it might be worth exploring them to make the code cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me think about it.

tsne <- data.frame(tsne)
pdb <- cbind(tsne,iris$Species)
options(warn = -1)
fig <- plot_ly(data = pdb ,x = ~X1, y = ~X2, z = ~X3, color = ~iris$Species, colors = c('#636EFA','#EF553B','#00CC96') ) %>%
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as earlier, I would add bg_color and zerolinecolor to the axes to match the Python figures..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 1 to 10
### Styling Figures made with Plotly

Plotly's R graphing library makes it easy to create interactive, publication-quality graphs.

More specifically, here are the 3 ways you can style and customize figures made with Plotly:

1. Control common parameters like titles, labeling and colors using built-in Plotly function arguments
2. Updating the plotly figure attributes
3. Using ggplot2's template via theme attribute.

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍


### Horizontal and Vertical Lines in Dash

[Dash for R](https://dashr.plotly.com) is an open-source framework for building analytical applications, with no Javascript required, and it is tightly integrated with the Plotly graphing library.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might need to check in with Nicolas here to see how we're going to embed these Dash apps directly into the docs for R.

With the Python docs, we're using an IFrame, (https://github.com/plotly/plotly.py/blob/doc-prod/doc/python/horizontal-vertical-shapes.md) which contains a link to the app hosted on the Dash Gallery server. We can maybe give you access to that or host the app there to have the same functionality here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure; we can do that. Let me know once you have a chance to discuss with Nicolas and Jack.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure Hammad, let's figure out the Dash piece once we have the pages live.



### Global and Local Font Specification

Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar comment to previous examples, I would set the plot_bgcolor to #e5ecf6 to match the Plotly Express default within the Python docs for visibility and aesthetics.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator
@HammadTheOne HammadTheOne left a comment

Choose a reason for hiding this comment

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

Hi @kvdesai, this is some really good documentation - there's some great updates for the R specific features as well.

I've left some comments and suggestions. I think we'll want to make the changes for the aesthetics and then we can consider some of the other ones to clean up the code a little bit.

As far as integrating the Dash apps go, I think this is a good first step, but we'll want to eventually embed them directly into the docs through an iframe like the Python ones, but we can discuss that in more detail and come back to them once we have a plan in place.

Let me know if you have any questions about the feedback and feel free to ping me whenever the changes have been made.

kvdesai and others added 18 commits August 16, 2021 22:09
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com>
@HammadTheOne HammadTheOne self-requested a review August 17, 2021 20:58
Copy link
Collaborator
@HammadTheOne HammadTheOne left a comment

Choose a reason for hiding this comment

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

💃

@HammadTheOne HammadTheOne merged commit e383137 into master Aug 17, 2021
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
0