Skip to content

Commit 165eacc

Browse files
committed
2 parents d45f74c + 09abbfe commit 165eacc

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ jobs:
2323
with:
2424
toolchain: stable
2525
override: true
26+
27+
- uses: julia-actions/setup-julia@v1
28+
with:
29+
version: 1.9
30+
- uses: julia-actions/julia-buildpkg@v1
31+
- uses: julia-actions/cache@v1
32+
with:
33+
cache-compiled: "true"
34+
cache-registries: "true"
35+
2636
- name: Set up Quarto
2737
uses: quarto-dev/quarto-actions/setup@v2
2838

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ data/
88
data.zip
99
*.gpkg
1010
*.gif
11+
Manifest.toml

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
GeoDataFrames = "62cb38b5-d8d2-4862-a48e-6a340996859f"

blog.qmd

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ author:
2020
affiliation: Adam Mickiewicz University, Poznań, Poland
2121
orcid: 0000-0002-1057-3721
2222
email:
23+
- name: Maarten Pronk
24+
affiliation: Deltares & TU Delft, Delft, the Netherlands
25+
orcid: 0000-0001-8758-3939
26+
email:
2327
---
2428

2529
```{r}
@@ -89,6 +93,11 @@ library(tidyverse)
8993
library(tmap)
9094
```
9195

96+
## Julia
97+
```{julia}
98+
using GeoDataFrames
99+
```
100+
92101
:::
93102

94103
## Creating geographic data
@@ -152,7 +161,18 @@ if (!dir.exists("data")) {
152161
}
153162
```
154163

155-
Note that we can read directly from ZIP files with R and Python thanks to the [GDAL Virtual File System](https://gdal.org/user/virtual_file_systems.html).
164+
## Julia
165+
166+
```{julia}
167+
using Downloads
168+
u = "https://github.com/Robinlovelace/opengeohub2023/releases/download/data/data.zip"
169+
f = basename(u)
170+
if !isfile(f)
171+
download(u, f)
172+
end
173+
```
174+
175+
Note that we can read directly from ZIP files with R, Python, and Julia thanks to the [GDAL Virtual File System](https://gdal.org/user/virtual_file_systems.html).
156176

157177
:::
158178

@@ -198,8 +218,17 @@ pol_all = sf::read_sf("/vsizip/data.zip/data/osm/gis_osm_transport_a_free_1.shp"
198218
pol_all
199219
```
200220

221+
## Julia
222+
```{julia}
223+
df = GeoDataFrames.read("/vsizip/data.zip/data/osm/gis_osm_transport_a_free_1.shp")
224+
df
225+
```
226+
201227
:::
202228

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

205234
```{r}

0 commit comments

Comments
 (0)