File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11[deps ]
22GeoDataFrames = " 62cb38b5-d8d2-4862-a48e-6a340996859f"
3+ Missings = " e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
Original file line number Diff line number Diff 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
245245uz = paste0("/vsizip//vsicurl/", u, "/data/osm/gis_osm_transport_a_free_1.shp")
246246pol_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
251256The 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 |>
267272pol
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
You can’t perform that action at this time.
0 commit comments