You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -234,13 +234,13 @@ The city then included some small grocery stores that are very close to meeting
234
234
We can [download the KML file](https://opendata.dc.gov/api/download/v1/items/1d7c9d0e3aac49c1aa88d377a3bae430/kml?layers=4) and change the extension to XML so that the file opens in a standard web browser, or we can directly download the KML file as an XML file as in the code chunk below.
htmltools::knit_print.html("<table><tr><th>Heading Col 1</th><th>Heading Col 2</th></tr><tr><td>Value 1</td><td>Value 2</td></tr></table>")
404
404
```
405
405
@@ -1332,8 +1332,8 @@ rev_war_battles2 <- tibble(
1332
1332
When writing custom functions for web scrapign, it's usually helpful to give yourself an idea of what the function does in a comment -- you can often reuse these functions, but that only works if you're kind to future you and remind yourself what they actually do.
Copy file name to clipboardExpand all lines: part-advanced-topics/06-pdf-tools.qmd
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,7 @@ You can also run `tesseract` from the command line, if you [install the library]
262
262
For the sake of shorter commands, let's assume I'm working with a 1-page PDF file named `file.pdf` and want to create `file.txt` which contains the text of the image-based PDF.
263
263
264
264
```{bash}
265
-
#| eval: !expr F
265
+
#| eval: false
266
266
pdftoppm -png ../data/file.pdf file # <1>
267
267
tesseract -l eng ../data/file-1.png ../data/file-1-bash # <2>
268
268
```
@@ -415,7 +415,7 @@ In any case, it's possible to use this command within R or Python, but once you
415
415
Let's OCR the Lancaster county, NE home appraisal image PDF and see what we come up with.
416
416
417
417
```{bash}
418
-
#| eval: !expr F
418
+
#| eval: false
419
419
ocrmypdf -l eng ../data/file.pdf ../data/file-ocrmypdf.pdf
420
420
```
421
421
@@ -851,7 +851,7 @@ There's a function, `locate_areas()`, that works interactively - it opens a view
851
851
`locate_areas` provides a sequence of coordinates that are relatively consistent across multiple full-page tables, so we might try to use those coordinates to improve our table parsing.
We can start out by plotting a map with the location of each sighting. I've colored the points in a seasonal color scheme, and added the description of each incident as a mouseover label.
@@ -903,7 +903,7 @@ We can also plot regions, instead of just points. I downloaded a dataset release
903
903
904
904
I've set this chunk to not evaluate because it causes the book to be painfully large.
We can start out by plotting a map with the location of each sighting. I've colored the points in a seasonal color scheme, and added the description of each incident as a mouseover label.
@@ -899,7 +899,7 @@ We can also plot regions, instead of just points. I downloaded a dataset release
899
899
900
900
I've set this chunk to not evaluate because it causes the book to be painfully large.
0 commit comments