rayshader
Altair
rayshader | Altair | |
---|---|---|
9 | 43 | |
2,002 | 8,927 | |
- | 0.8% | |
7.2 | 9.0 | |
about 1 month ago | 12 days ago | |
R | Python | |
- | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rayshader
-
Quick tip: Using R, Rayshader and SingleStore Notebooks
Rayshader is a powerful R package designed for creating beautiful 3D visualisations and maps. By using raytracing techniques, it transforms spatial data into three-dimensional landscapes, allowing users to explore and analyse geographical features. In this article, we have barely scratched the surface. Check out the website for further details and examples.
-
Data Visualization: Choropleth maps with ggplot and R
10 thoughts on data visualization best practices and tools:
1) For interactive visualizations of data on 3D globes, I use a mix of C++, Python (for data cleaning), and Unreal Engine (with a plugin called Cesium). An example of this is at https://youtu.be/9i-tQ8Sr80o.
2) If I am trying to put together a 3D globe that has less quality but that can be accessed by the web, I use Mapbox GL JS, D3.js, and React. An example of this is at https://www.whiteowleducation.com/blog/2022/10/14/real-estat....
3) I have seen others use Three.js for developing 3D data visualizations on the web. An example of this in a data science context is at https://blog.fastforwardlabs.com/2019/04/29/visualizing-acti....
4) If you are trying to do 3D population density maps in R, there are a lot in the community that say you should use https://www.rayshader.com/ with R.
5) If you are really trying to push the limits of data visualization, follow https://twitter.com/Arti_AR_video . He is doing data vis in AR. Robert Scoble had a good tweet the other day (https://twitter.com/Scobleizer/status/1620498790653501440?) showing Arti with 3D bar charts sitting on a table.
6) If you are doing data vis for urban planning, odds are they are already using ArcGIS, and odds are you will be using something like that.
7) If you are trying to do data vis that relates to architecture, I would actually suggest starting with Twinmotion (which is part of the Unreal Engine ecosystem).
8) If you are trying to do data vis for simulations, it may be worth looking at https://www.nvidia.com/en-us/omniverse/ .
9) If you are wanting to show some high end maps fast, use Geolayers 3. There is a YouTube channel called "Boone Loves Video" (https://www.youtube.com/channel/UCXyGw2OkrAzLhq1r7hyDZkA). Boone explains Geolayers often in his videos.
10) I personally believe that if you are trying to get to next-gen data visualization my best guess is that you would use a mix of Blender, Nuke, Houdini, or After Effects. I personally have only used Blender and After Effects so far.
Also, if you have any data visualization needs, I am currently on the job market. https://www.linkedin.com/in/ralphbrooks has details about me.
-
Population density map of India
It's made in R using Rayshader and a population dataset from Kontur.
-
Shaded relief maps of the three national parks in Washington state -- North Cascades, Olympic, and Mount Rainier
I make these graphics using the rayshader package in R. Follow me on Twitter (@MrPecners) for more content like this, or check out this gallery I put together.
-
[OC] Elevation of France
Made in R using the Rayshader package (https://www.rayshader.com/). Data is comming from the open sourced tangrams heightmapper (https://github.com/tangrams/heightmapper).
-
[OC] Great Lakes bathymetry, inverted and exaggerated
Data source: NOAA Great Lakes Bathymetry Tools used: R, with the {rayshader} and {magick} packages (magick is an R wrapper for imagemagick) Code: https://github.com/Pecners/great\_lakes\_bath As the subtitle calls out, the heights are exaggerated. I had trouble calculating the exact level of exaggeration, and I’d love to hear from GIS folks about how to do this. I set a scale of 50x, but that assumes equal spacing between x and y, and that the height is the same unit scale of x and y. So, I transformed the CRS to ESPG:3174, which I believe is 1 meter per degree. I checked this data too, and for the bounding box here, I calculated the width and height of the box (meters), and then divided by the degree difference of both (post-transformed, so used 3174), and I got 1 meter/degree for both width and height. Height is in meters, so that appears to work out. If I set scale to 1, it seems accurate, i.e. appearing flat, but this (with scale set to 50x) appears to be greater than 250x to me, because the deepest part of Lake Michigan appears to be as deep as it is wide there. That depth is around 280 meters, and the lake width there is at least 50 miles. For 280 meters to appear to be 50 miles, that scale works out to be 287x. Another possibility is that rayshader (or rgl which rayshader uses) is scaling differently than I understand it, but I reviewed the source code and couldn’t find an explanation.
- Can one create graps like this one in R?
-
Is this possible to create via R? If not, how did they do this?
It probably wasn't done in R, but I think it is possible (with some heavy work). The first package that comes to mind making this possible is rayshader (https://www.rayshader.com/). My guess would be "all of it is possible if you're crazy/devoted enough".
- Visualizing the Undersea Tonga Volcano [OC]
Altair
-
Ask HN: What's the best charting library for customer-facing dashboards?
I like Vega-Lite: https://vega.github.io/vega-lite/
It’s built by folks from the same lab as D3, but designed as “a higher-level visual specification language on top of D3” [https://vega.github.io/vega/about/vega-and-d3/]
My favorite way to prototype a dashboard is to use Streamlit to lay things out and serve it and then use Altair [https://altair-viz.github.io/] to generate the Vega-Lite plots in Python. Then if you need to move to something besides Python to productionize, you can produce the same Vega-Lite definitions using the framework of your choice.
- FLaNK AI Weekly 18 March 2024
- FLaNK AI for 11 March 2024
-
Vega-Altair: Declarative Visualization in Python
Feel free to open an issue to let us know which parts of the documentation you find obscure and if you have suggestions for how to improve them. We did a larger overhaul a few months back and are always open to feedback on how to improve it further! https://altair-viz.github.io/
(disclaimer: I'm a co-maintainer of Altair)
-
Gnuplotlib: Non-Painful Plotting for NumPy
Vega-Altair is pretty great as well. It uses a grammar of graphics that’s slightly different from ggplot, but has most of the same advantages.
https://altair-viz.github.io/
-
Mastering Matplotlib: A Step-by-Step Tutorial for Beginners
Altair - Declarative statistical visualization library for Python.
-
Top 10 growing data visualization libraries in Python in 2023
Github: Altair
- What python library you are using for interactive visualisation?(other than plotly)
- Libs para gráficos
-
If you had to pick a library from another language (Rust, JS, etc.) that isn’t currently available in Python and have it instantly converted into Python for you to use, what would it be?
Yeah, that's one of the main reasons I like altair. It has 10M downloads per month and the newest Git update is from two days ago.
What are some alternatives?
rayrender - A pathtracer for R. Build and render complex scenes and 3D data visualizations directly from R
plotly - The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
heightmapper - interactive heightmaps from terrain data
bokeh - Interactive Data Visualization in the browser, from Python
roomba - General purpose API response tidier
seaborn - Statistical data visualization in Python
ggplot - ggplot port for python
plotnine - A Grammar of Graphics for Python
matplotlib - matplotlib: plotting with Python
folium - Python Data. Leaflet.js Maps.
Flask JSONDash - :snake: :bar_chart: :chart_with_upwards_trend: Build complex dashboards without any front-end code. Use your own endpoints. JSON config only. Ready to go.
ggplot2 - An implementation of the Grammar of Graphics in R