|
1 | | -<img src="docs/src/img/GraphFrames-Logo-Large.png" alt="GraphFrames Logo" width="500"/> |
| 1 | +<p align="center"> |
| 2 | + <img src="docs/src/img/GraphFrames-Logo-Large.png" alt="GraphFrames Logo" width="500"/> |
| 3 | +</p> |
2 | 4 |
|
3 | | -[](https://github.com/graphframes/graphframes/actions/workflows/scala-ci.yml) |
4 | | -[](https://github.com/graphframes/graphframes/actions/workflows/python-ci.yml) |
5 | | -[](https://github.com/graphframes/graphframes/actions/workflows/pages/pages-build-deployment) |
6 | | -[](https://github.com/graphframes/graphframes/actions/workflows/scala-publish.yml) |
7 | | -[](https://github.com/graphframes/graphframes/actions/workflows/python-publish.yml) |
8 | | - |
9 | | - |
| 5 | +<p align="center"> |
| 6 | + <a href="https://github.com/graphframes/graphframes/actions/workflows/scala-ci.yml"><img src="https://github.com/graphframes/graphframes/actions/workflows/scala-ci.yml/badge.svg" alt="Scala CI"></a> <a href="https://github.com/graphframes/graphframes/actions/workflows/python-ci.yml"><img src="https://github.com/graphframes/graphframes/actions/workflows/python-ci.yml/badge.svg" alt="Python CI"></a> <a href="https://github.com/graphframes/graphframes/actions/workflows/pages/pages-build-deployment"><img src="https://github.com/graphframes/graphframes/actions/workflows/pages/pages-build-deployment/badge.svg" alt="pages-build-deployment"></a> <a href="https://github.com/graphframes/graphframes/actions/workflows/scala-publish.yml"><img src="https://github.com/graphframes/graphframes/actions/workflows/scala-publish.yml/badge.svg" alt="scala-central-publish"></a> <a href="https://github.com/graphframes/graphframes/actions/workflows/python-publish.yml"><img src="https://github.com/graphframes/graphframes/actions/workflows/python-publish.yml/badge.svg" alt="python-pypi-publish"></a> <img src="https://img.shields.io/github/v/release/graphframes/graphframes" alt="GitHub Release"> <img src="https://img.shields.io/github/license/graphframes/graphframes" alt="GitHub License"> <img src="https://img.shields.io/pypi/dm/graphframes-py" alt="PyPI - Downloads"> |
| 7 | +</p> |
10 | 8 |
|
| 9 | +# GraphFrames: graph algorithms at scale |
11 | 10 |
|
| 11 | +This is a package for graphs processing and analytics on scale. It is built on top of Apache Spark and relies on DataFrame abstraction. It provides built-in and easy to use distributed graph algorithms as well as a flexible APIs like `Pregel` or `AggregateMessages` to make custom graph processing. Users can write highly expressive queries by leveraging the DataFrame API, combined with a new API for network motif finding. The user also benefits from DataFrame performance optimizations within the Spark SQL engine. GraphFrames works in Java, Scala, and Python. |
12 | 12 |
|
13 | | -# GraphFrames: DataFrame-based Graphs |
| 13 | +## GraphFrames usecases |
14 | 14 |
|
15 | | -This is a package for graphs processing and analytics on scale. It is built on top of Apache Spark and relies on DataFrame abstraction. Users can write highly expressive queries by leveraging the DataFrame API, combined with a new API for network motif finding. The user also benefits from DataFrame performance optimizations within the Spark SQL engine. GraphFrames works in Java, Scala, and Python. |
| 15 | +There are some popular use cases when GraphFrames is almost irreplaceable, including, but not limited to: |
16 | 16 |
|
17 | | -You can find user guide and API docs at <https://graphframes.io> |
| 17 | +- Compliance analytics with a scalable shortest paths algorithm and motif analysis; |
| 18 | +- Anti-fraud with scalable cycles detection in large networks; |
| 19 | +- Identity resolution on the scale of billions with highly efficient connected components; |
| 20 | +- Search result ranking with a distributed, Pregel-based PageRank; |
| 21 | +- Clustering huge graphs with Label Propagation and Power Iteration Clustering; |
| 22 | +- Building a knowledge graph systems with Property Graph Model. |
18 | 23 |
|
19 | | -## GraphFrames is Back |
| 24 | +## Documentation |
20 | 25 |
|
21 | | -This project was in maintenance mode for some time, but we are happy to announce that it is now back in active development! |
| 26 | +- [Installation](https://graphframes.io/02-quick-start/01-installation.html) |
| 27 | +- [Creating Graphs](https://graphframes.io/04-user-guide/01-creating-graphframes.html) |
| 28 | +- [Basic Graph Manipulations](https://graphframes.io/04-user-guide/02-basic-operations.html) |
| 29 | +- [Centrality Metrics](https://graphframes.io/04-user-guide/03-centralities.html) |
| 30 | +- [Motif finding](https://graphframes.io/04-user-guide/04-motif-finding.html) |
| 31 | +- [Traversals and Connectivity](https://graphframes.io/04-user-guide/05-traversals.html) |
| 32 | +- [Community Detection](https://graphframes.io/04-user-guide/06-graph-clustering.html) |
| 33 | +- [Scala API](https://graphframes.io/api/scaladoc/) |
| 34 | +- [Python API](https://graphframes.io/api/python/) |
| 35 | +- [Apache Spark compatibility](https://graphframes.io/02-quick-start/01-installation.html#spark-versions-compatibility) |
22 | 36 |
|
23 | | -## Installation and Quick-Start |
24 | | - |
25 | | -### GraphFrames core |
26 | | - |
27 | | -GraphFrames scala core and Spark-Connect plugin are published in the Sonatype Central. Namespace is `io.graphframes`. |
28 | | - |
29 | | -```bash |
30 | | -# Interactive Scala/Java |
31 | | - |
32 | | -# For Spark 3.5.x, scala 2.12 |
33 | | -$ spark-shell --packages io.graphframes:graphframes-spark3_2.12:0.9.2 |
34 | | - |
35 | | -# For Spark 3.5.x, scala 2.13 |
36 | | -$ spark-shell --packages io.graphframes:graphframes-spark3_2.13:0.9.2 |
37 | | - |
38 | | -# For Spark 4.0.x |
39 | | -$ spark-shell --packages io.graphframes:graphframes-spark4_2.13:0.9.2 |
40 | | - |
41 | | -# Interactive Python, Spark 3.5.x |
42 | | -$ pyspark --packages io.graphframes:graphframes-spark3_2.12:0.9.2 |
43 | | - |
44 | | -# Interactive Python, Spark 4.0.x |
45 | | -$ pyspark --packages io.graphframes:graphframes-spark4_2.13:0.9.2 |
46 | | -``` |
47 | | - |
48 | | -### GraphFrames Python API |
49 | | - |
50 | | -Python API is published in the PyPi: |
51 | | - |
52 | | -```bash |
53 | | -pip install graphframes-py |
54 | | -``` |
55 | | - |
56 | | -**NOTE!** *Python distribution does not include JVM-core. You need to add it to your cluster or Spark-Connect server!* |
57 | | - |
58 | | -### GraphFrames Spark Connect |
59 | | - |
60 | | -To add GraphFrames to your spark connect server, you need to specify the plugin name, for example: |
61 | | - |
62 | | -```bash |
63 | | -./sbin/start-connect-server.sh \ |
64 | | - --conf spark.connect.extensions.relation.classes=org.apache.spark.sql.graphframes.GraphFramesConnect \ |
65 | | - --packages io.graphframes.graphframes-connect-spark4_2.13:0.9.2 |
66 | | - --conf spark.checkpoint.dir=${CHECKPOINT_DIR} |
67 | | -``` |
68 | | - |
69 | | -**NOTE!** *GraphFrames is relying on iterative graph algorithms and uses checkpoints internally to avoid infinite growing of the Spark's Logical Plan. Spark-Connect API does not provide the way to specify the checkpoint dir and it should be specified via `spark.checkpoint.dir` configuration!* |
70 | | - |
71 | | -### Quick Start |
| 37 | +## Quick Start |
72 | 38 |
|
73 | 39 | Now you can create a GraphFrame as follows. |
74 | 40 |
|
75 | | -In Python: |
76 | | - |
77 | 41 | ```python |
78 | 42 | from pyspark.sql import SparkSession |
79 | 43 | from graphframes import GraphFrame |
@@ -176,103 +140,37 @@ g.connectedComponents().show() |
176 | 140 |
|
177 | 141 | To learn more about GraphFrames, check out these resources: |
178 | 142 |
|
179 | | -* [GraphFrames Documentation](https://graphframes.github.io/graphframes) |
180 | | -* [GraphFrames Network Motif Finding Tutorial](https://graphframes.github.io/graphframes/docs/_site/motif-tutorial.html) |
181 | | -* [Introducing GraphFrames](https://databricks.com/blog/2016/03/03/introducing-graphframes.html) |
182 | | -* [On-Time Flight Performance with GraphFrames for Apache Spark](https://databricks.com/blog/2016/03/16/on-time-flight-performance-with-graphframes-for-apache-spark.html) |
183 | | - |
184 | | -## Community Resources |
| 143 | +### GraphFrames tutorials |
185 | 144 |
|
186 | | -* [GraphFrames Google Group](https://groups.google.com/forum/#!forum/graphframes) |
187 | | -* [#graphframes Discord Channel on GraphGeeks](https://discord.com/channels/1162999022819225631/1326257052368113674) |
188 | | -* [Graph Operations in Apache Spark Using GraphFrames](https://www.pluralsight.com/courses/apache-spark-graphframes-graph-operations) |
189 | | -* [Executing Graph Algorithms with GraphFrames on Databricks](https://www.pluralsight.com/courses/executing-graph-algorithms-graphframes-databricks) |
| 145 | +- [GraphFrames Network Motif Finding Tutorial](https://graphframes.github.io/graphframes/docs/_site/motif-tutorial.html) |
190 | 146 |
|
191 | | -## Note about Python API distribution |
| 147 | +### Community Resources |
192 | 148 |
|
193 | | -`graphframes-py` is our Official PyPi Package |
| 149 | +This resources are provided by the community: |
194 | 150 |
|
195 | | -We recommend using the Spark Packages system to install the latest version of GraphFrames, but now publish a build of our Python package to PyPi in the [graphframes-py](https://pypi.org/project/graphframes-py/) package. It can be used to provide type hints in IDEs, but does not load the java-side of GraphFrames so will not work without loading the GraphFrames package. See [Installation and Quick-Start](#installation-and-quick-start). |
196 | | - |
197 | | -```bash |
198 | | -pip install graphframes-py |
199 | | -``` |
200 | | - |
201 | | -**WARNING!** |
202 | | - |
203 | | -This project does not own or control the [graphframes PyPI package](https://pypi.org/project/graphframes/) (installs 0.6.0) or [graphframes-latest PyPI package](https://pypi.org/project/graphframes-latest/) (installs 0.8.4). |
204 | | - |
205 | | -**WARNING!** |
206 | | - |
207 | | -## Maven and SBT |
208 | | - |
209 | | -Maven: |
210 | | -```xml |
211 | | -<dependencies> |
212 | | - <dependency> |
213 | | - <groupId>io.graphframes</groupId> |
214 | | - <artifactId>graphframes-spark4_2.13</artifactId> |
215 | | - <version>0.9.2</version> |
216 | | - </dependency> |
217 | | -</dependencies> |
218 | | -``` |
219 | | - |
220 | | -SBT: |
221 | | -```sbt |
222 | | -libraryDependencies += "io.graphframes" %% "graphframes-spark4" % "0.9.2" |
223 | | -``` |
224 | | - |
225 | | -**WARNING!** |
226 | | - |
227 | | -**=========================** |
228 | | - |
229 | | -Due to governance problems and limitations, all the new releases of `GraphFrames` will be published to the Maven Central under the namespace `io.graphframes` (not `org.graphframes`)! |
230 | | - |
231 | | -**=========================** |
| 151 | +- [Introducing GraphFrames](https://databricks.com/blog/2016/03/03/introducing-graphframes.html) |
| 152 | +- [GraphFrames Google Group](https://groups.google.com/forum/#!forum/graphframes) |
| 153 | +- [#graphframes Discord Channel on GraphGeeks](https://discord.com/channels/1162999022819225631/1326257052368113674) |
| 154 | +- [Graph Operations in Apache Spark Using GraphFrames](https://www.pluralsight.com/courses/apache-spark-graphframes-graph-operations) |
| 155 | +- [Executing Graph Algorithms with GraphFrames on Databricks](https://www.pluralsight.com/courses/executing-graph-algorithms-graphframes-databricks) |
| 156 | +- [On-Time Flight Performance with GraphFrames for Apache Spark](https://databricks.com/blog/2016/03/16/on-time-flight-performance-with-graphframes-for-apache-spark.html) |
| 157 | +- [Sustainability in Aluminum Production](https://www.databricks.com/blog/sustainability-aluminum-production) |
232 | 158 |
|
233 | 159 | ## GraphFrames Internals |
234 | 160 |
|
235 | | -To learn how GraphFrames works internally to combine graph and relational queries, check out the paper [GraphFrames: An Integrated API for Mixing Graph and |
236 | | -Relational Queries, Dave et al. 2016](https://people.eecs.berkeley.edu/~matei/papers/2016/grades_graphframes.pdf). |
237 | | - |
238 | | -## Building and running unit tests |
239 | | - |
240 | | -To compile the core project, run `build/sbt package` from the project home directory. |
241 | | -To compile the Spark Connect Plugin, run `build/sbt connect/package` |
242 | | - |
243 | | -## Spark version compatibility |
244 | | - |
245 | | -This project is compatible with Spark 3.5.x and Spark 4.0.x. Significant speed improvements have been made to DataFrames in recent versions of Spark, so you may see speedups from using the latest Spark version. |
246 | | - |
247 | | -| Component | Spark 3.x (Scala 2.12) | Spark 3.x (Scala 2.13) | Spark 4.x (Scala 2.13) | |
248 | | -|---------------------|------------------------|------------------------|------------------------| |
249 | | -| graphframes | ✓ | ✓ | ✓ | |
250 | | -| graphframes-connect | ✓ | ✓ | ✓ | |
| 161 | +- [A top level overview of GraphFrames internals](https://graphframes.io/01-about/02-architecture.html) |
| 162 | +- [GraphFrames: An Integrated API for Mixing Graph and Relational Queries, Dave et al. 2016](https://people.eecs.berkeley.edu/~matei/papers/2016/grades_graphframes.pdf). |
251 | 163 |
|
252 | 164 | ## Contributing |
253 | 165 |
|
254 | 166 | GraphFrames was made as collaborative effort among UC Berkeley, MIT, Databricks and the open source community. At the moment GraphFrames is maintained by the group of individual contributors. |
255 | 167 |
|
256 | | -See [contribution guide](./CONTRIBUTING.md) |
257 | | -and the [local development setup walkthrough](./docs/src/06-contributing/01-contributing-guide.md) for |
258 | | -step-by-step instructions on preparing your environment, running tests, and |
259 | | -submitting changes. |
| 168 | +See [contribution guide](./CONTRIBUTING.md) and the [local development setup walkthrough](https://graphframes.io/06-contributing/01-contributing-guide.html) for step-by-step instructions on preparing your environment, running tests, and submitting changes. |
260 | 169 |
|
261 | 170 | ## Releases |
262 | 171 |
|
263 | 172 | See [release notes](https://github.com/graphframes/graphframes/releases). |
264 | 173 |
|
265 | | -## Nightly builds |
266 | | - |
267 | | -GraphFrames project is publishing SNAPSHOTS (nightly builds) to the "Central Portal Snapshots." |
268 | | -Please read [this section](https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-snapshot-releases-for-your-project) of the Sonatype documentation to check how can you use snapshots in your project. |
269 | | - |
270 | | -GroupId: `io.graphframes` |
271 | | -ArtifactIds: |
| 174 | +## Star History |
272 | 175 |
|
273 | | -* `graphframes-spark3_2.12` |
274 | | -* `graphframes-spark3_2.13` |
275 | | -* `graphframes-connect-spark3_2.12` |
276 | | -* `graphframes-connect-spark3_2.13` |
277 | | -* `graphframes-spark4_2.13` |
278 | | -* `graphframes-connect-spark4_2.13` |
| 176 | +[](https://www.star-history.com/#graphframes/graphframes&Date) |
0 commit comments