This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new 9a7483a0 [DOCS] Update README.md (#859)
9a7483a0 is described below
commit 9a7483a0209dcef6a2020ef919f271e5dd456c98
Author: Mo Sarwat <[email protected]>
AuthorDate: Mon Jun 12 18:21:32 2023 -0700
[DOCS] Update README.md (#859)
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index dfadfd50..66f70427 100644
--- a/README.md
+++ b/README.md
@@ -57,11 +57,11 @@ This example loads NYC taxi trip records and taxi zone
information stored as .CS
#### Load NYC taxi trips and taxi zones data from CSV Files Stored on AWS S3
``` python
-taxidf = spark.read.format('csv').option("header","true").option("delimiter",
",").load("s3a://your-directory/data/nyc-taxi-data.csv")
+taxidf = sedona.read.format('csv').option("header","true").option("delimiter",
",").load("s3a://your-directory/data/nyc-taxi-data.csv")
taxidf = taxidf.selectExpr('ST_Point(CAST(Start_Lon AS Decimal(24,20)),
CAST(Start_Lat AS Decimal(24,20))) AS pickup', 'Trip_Pickup_DateTime',
'Payment_Type', 'Fare_Amt')
```
``` python
-zoneDf = spark.read.format('csv').option("delimiter",
",").load("s3a://your-directory/data/TIGER2018_ZCTA5.csv")
+zoneDf = sedona.read.format('csv').option("delimiter",
",").load("s3a://your-directory/data/TIGER2018_ZCTA5.csv")
zoneDf = zoneDf.selectExpr('ST_GeomFromWKT(_c0) as zone', '_c1 as zipcode')
```
@@ -73,7 +73,7 @@ taxidf_mhtn =
taxidf.where('ST_Contains(ST_PolygonFromEnvelope(-74.01,40.73,-73.
#### Spatial Join between Taxi Dataframe and Zone Dataframe to Find taxis in
each zone
```python
-taxiVsZone = spark.sql('SELECT zone, zipcode, pickup, Fare_Amt FROM zoneDf,
taxiDf WHERE ST_Contains(zone, pickup)')
+taxiVsZone = sedona.sql('SELECT zone, zipcode, pickup, Fare_Amt FROM zoneDf,
taxiDf WHERE ST_Contains(zone, pickup)')
```
#### Show a map of the loaded Spatial Dataframes using GeoPandas