Appendix
Status messages
The status column of points.csv, and of the table on the review page, says what PubMaps did with each place. If a place is missing from the map, its status says why.
| Status | Meaning | What you can do |
|---|---|---|
| on map | Drawn as a point. | — |
| drawn as area | A park or district drawn from its outline. | include = no to hide it. |
| name only (no symbol) | You set include = name. |
— |
| excluded by editor | You set include = no. |
Clear include to undo. |
| not located (author query) | A study site, plot or town with no position. It is in the author query. | Type lon/lat, or ask the author. |
| not located (context) | Another kind of place with no position. Not needed on the map. | Type a position and include = yes if it matters. |
| generic name (author query) | A description rather than a name (“Ward no. 3”, “Plot 3”, “national forest reserve”). Gazetteers cannot look these up. | Ask the author for positions, or type them. |
| relative location (author query) | Located only relative to something else (“2 km above the village”). Grouped into one request in the author query. | Ask the author for GPS positions. |
| far from the study (check) | The gazetteer position is much farther from the other places than expected, often a different place with the same name. | Check it on the check map; type the right position or set include = no. |
| role (context, not a point) | A place named for context, such as a country or a large region. | include = name to name it. include = yes forces it: a park or district is then drawn as an area, anything else as a point. |
| area or line feature (context, not a point) | A natural feature too large to be a point: a mountain range, desert or plain. | include = name to name it without a symbol. |
| drawn as river | A river, drawn as a blue line where it crosses the map. | include = no to hide it; include = name for the name alone. |
| river not found within the map | No stretch of a river of that name crosses the map. | Check the spelling in label; OpenStreetMap may use another name. |
| river: map server not reachable (redraw later) | The OpenStreetMap river service did not answer. | Redraw later; nothing needs changing. |
| same river as ‘name’ | The manuscript names the river twice (“Rapti”, “Rapti River”). | — |
| duplicate of ‘name’ | The same place twice under one name, within 5 km. | — |
| province/state (shown by the state boundaries) | A state or province. The dashed state lines already show it. | include = name to name it; include = yes to outline it. |
| area covers the whole map (context) | A district or park that fills the frame. Shading it would tint everything. | include = name to name it. |
| area outside the map frame | The area does not reach the map. | — |
| only a sliver inside the map (context) | Only a thin edge of the area falls inside the frame. | include = yes to draw it anyway. |
| same place is drawn as a point | A district with the same name as a town already on the map. | — |
| … – no outline found | No OpenStreetMap outline was found for this park or district. | include = name to name it. |
| area too small | A park or district too small to show as an area, with no position to draw it as a point instead. | Type a position to show it as a point. |
How a position was found
The match column, and the marker colours on the check map:
| Match | Meaning |
|---|---|
| stated | The manuscript gives the coordinates. |
| editor | You typed the position. |
| exact | The gazetteer name matched exactly and the feature is the right kind. |
| partial | A close name, a slightly different kind of feature, or a spelling variant. Confirm it. |
| suggestion | The gazetteer offered something of the wrong kind (a road for a mountain). Not placed. |
| none | Not located. |
coord_source names the source: text (the manuscript), editor, geonames, nominatim (OpenStreetMap), or none when the place has no position.
Functions and settings
The package source, with its README and change history, is at https://github.com/kimbridges/pubmaps.
pubmap(manuscript, dir = NULL, provider = "openai", model = NULL, backends = c("geonames", "nominatim"), places = NULL, relief = FALSE, legend = NULL, inset_label = NULL)
Reads a manuscript and builds its review folder.
manuscript: path to the PDF (or a text file).dir: where to write the review folder. By default a folder named after the manuscript inside your review folder.provider,model: which language model reads the manuscript ("openai"or"anthropic"). Left out,modelis"gpt-6.1-sol"for OpenAI and"claude-sonnet-5-5"for Anthropic.backends: which gazetteers to search.places: a place list saved earlier (places_extracted.rdsin the review folder), to skip the reading.relief:TRUEadds a second map,map_relief.pdf, with shaded relief.legend:FALSEleaves the legend strip off the figure, for a journal that explains the symbols in the caption.inset_label:FALSEleaves the country name off the inset.- For
legendandinset_label, leaving them out keeps the review folder’s last choice; a new folder starts with both on.
pubmap_rerender(dir, relief = FALSE, legend = NULL, inset_label = NULL)
Redraws a map from its points.csv after corrections. Does not read the manuscript again. dir is the review folder, or just the manuscript’s name. legend and inset_label change those choices; left out, the folder’s last choice is kept.
pubmaps_review_dir(), pubmaps_cache_dir()
Show where review folders and the gazetteer cache are kept.
The steps inside pubmap() are also available on their own (extract_places(), locate_places(), plan_map(), render_map()). Part II describes them. Each function’s help page (?pubmap) gives the full details.
Environment variables (in .Renviron):
| Variable | Purpose |
|---|---|
OPENAI_API_KEY or ANTHROPIC_API_KEY |
Access to the language model. |
GEONAMES_USERNAME |
Your GeoNames account name. Without it, GeoNames is skipped. |
PUBMAPS_REVIEW |
Optional. Where review folders go. Default: review in the working directory. |
PUBMAPS_CACHE |
Optional. Where gazetteer answers are cached. Default: R’s user cache folder. |
GEONAMES_HOST |
Optional. The GeoNames server; set it for a premium account. |
GEONAMES_TOKEN |
Optional. A premium account’s token, if it uses one. |
The same two folders can also be set for one session with options(pubmaps.review = ...) and options(pubmaps.cache = ...), which take precedence.