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

[user info] Integrate aggregated map and User / Month Data #147

Open
2 tasks
mmcky opened this issue Feb 14, 2025 · 7 comments
Open
2 tasks

[user info] Integrate aggregated map and User / Month Data #147

mmcky opened this issue Feb 14, 2025 · 7 comments
Assignees

Comments

@mmcky
Copy link
Collaborator

mmcky commented Feb 14, 2025

The assets will be built in

https://github.com/QuantEcon/website-dynamic

but we can

  • copy the map and figure (built using plotly) to website/gh-pages branch, or
  • website can fetch the data from website-dynamic hosted via gh-pages on quantecon.github.io/website-dynamic/
@DrDrij
Copy link
Member

DrDrij commented Feb 20, 2025

Render the cool Plotly.js analytics data on quantecon.org
- Load Plotly via a <script> tag from the official CDN
- Fetch map_data.json and month_data.json as hosted file from 'website-dynamic' site
- Render using data
- No iframes, rendered directly in the page DOM, allowing custom style or positioning

The data is made available as JSON files on website-dynamic https://github.com/QuantEcon/website-dynamic/commit/0ed87a5a752babf74d361fa64fa812fe6fb5aa6a

@mmcky Can we make website-dynamic public to access the JSON? Alternative might be to use rsync and push them to the websites-repo.

@DrDrij
Copy link
Member

DrDrij commented Feb 20, 2025

I have used copycat in the past for EconARK. It’s a simple src and dtn copy between repos.
https://github.com/econ-ark/REMARK/blob/main/.github/workflows/transfer-remark-metadata.yml
https://github.com/marketplace/actions/copycat-action
We could use this method depending on how we want to maintain ‘website-dynamic’.

Btw. Nice work @kp992 👏

@kp992
Copy link
Collaborator

kp992 commented Feb 20, 2025

Thanks @DrDrij.

It’s a simple src and dtn copy between repos.

This sounds like a good idea.

We could use this method depending on how we want to maintain ‘website-dynamic’.

I don't think so we will actively modify the repo website-dynamic once the plots are integrated. They will get auto-updated every Sunday.

@mmcky
Copy link
Collaborator Author

mmcky commented Feb 20, 2025

@DrDrij we can push the json data file to gh-pages which is public so it should be fetch able directly which may be the easiest way to go rather than transferring assets between repos.

@mmcky
Copy link
Collaborator Author

mmcky commented Feb 20, 2025

thanks @kp992 for the ability to do a manual trigger. @DrDrij those assets are now available on the gh-pages branch and is publicly routable

https://quantecon.github.io/website-dynamic/map_data.json

DrDrij added a commit that referenced this issue Feb 21, 2025
* Access JSON data from website-dynamic and render using Plotly JS library on front-end #147

* Silly mistake in front-matter, plotly renders now available '/analytics-dashboard/' #147
@DrDrij
Copy link
Member

DrDrij commented Feb 21, 2025

Sorry guys. I've been trying to be super specific with my commit messages and inadvertently merged my branch.

The analytics dashboard is not linked from anywhere, I will style it in a new PR (or perhaps recycle this branch with styling from feedback).

https://quantecon.org/analytics-dashboard/

@kp992
Copy link
Collaborator

kp992 commented Feb 21, 2025

Thanks @DrDrij and @mmcky,

The plots looks great to me. I got a couple of ideas/suggestions:

  1. Can we include the updated date some where below the plot?
  2. Shall we remove the headings Active Users by Country and Monthly Users? They look repetitive in the plot title and heading.

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

No branches or pull requests

3 participants