Skip to content

Commit c30ea0e

Browse files
committed
Don't publish, but render.
1 parent bed76b0 commit c30ea0e

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ jobs:
4343
# Extra repositories:
4444
extra-repositories: |
4545
https://josiahparry.r-universe.dev
46+
4647
- name: R deps
4748
uses: r-lib/actions/setup-r-dependencies@v2
4849
with:
4950
cache-version: 2
5051
extra-packages: |
5152
any::sf
53+
54+
- name: Render Quarto Project
55+
uses: quarto-dev/quarto-actions/render@v2

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[deps]
22
GeoDataFrames = "62cb38b5-d8d2-4862-a48e-6a340996859f"
3+
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"

blog.qmd

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,23 +229,28 @@ pol_all
229229
## Julia
230230

231231
```{julia}
232-
df = GeoDataFrames.read("/vsizip/data.zip/data/osm/gis_osm_transport_a_free_1.shp")
233-
df
232+
pol_all = GeoDataFrames.read("/vsizip/data.zip/data/osm/gis_osm_transport_a_free_1.shp")
233+
pol_all
234234
```
235235

236236
:::
237237

238238
<!---
239239
This should also work in Python and Julia no? It's a GDAL feature.
240240
--->
241-
Note: in R, you can read-in the dataset from the URL in a single line of code without first downloading the zip file:
241+
Note: in R and Julia, you can read-in the dataset from the URL in a single line of code without first downloading the zip file:
242242

243243
```{r}
244244
#| eval: false
245245
uz = paste0("/vsizip//vsicurl/", u, "/data/osm/gis_osm_transport_a_free_1.shp")
246246
pol_all = sf::read_sf(uz)
247247
```
248248

249+
```{julia}
250+
zipurl = "/vsizip/vsicurl/" * u * "/data/osm/gis_osm_transport_a_free_1.shp"
251+
pol_all = GeoDataFrames.read(zipurl)
252+
```
253+
249254
## Subsetting by attributes
250255

251256
The following commands select a subset of the data based on attribute values (looking for a specific string in the `name` column).
@@ -267,6 +272,13 @@ pol = pol_all |>
267272
pol
268273
```
269274

275+
## Julia
276+
```{julia}
277+
using DataFrames
278+
pol = dropmissing(pol_all, :name)
279+
pol = subset!(pol, :name => n -> occursin.(r"Port*.+Poz", n))
280+
```
281+
270282
:::
271283

272284
## Basic plotting

0 commit comments

Comments
 (0)