Publishing locations as open data
This page is for administrators and data teams. When service points or facilities are kept as content with a location field, their list is a valuable dataset. Exponential ships no GeoJSON, KML or geo web service output (see "What exists for maps"); a CSV with coordinates, made from the content, covers most re-use.
Contents
What the dataset contains
One row per location: a stable identifier (the object ID or your own code), name, address, latitude, longitude (decimal degrees, WGS 84 as Google Maps uses), opening hours, accessibility notes, a link to the page.
Making the file
- With
xrowextract: Export > One class of content export, the class (for exampleservice_point), the folder, CSV; preview the columns and check how the location field appears, then save the settings as a preset for the next update (xrowextract). - With the kernel command:
./console exp:ezcsvexport --storage-dir=var/export/csv <node id>writes one CSV per class; check the location columns before publishing (exp:ezcsvexport). - A developer can also write a template view that prints the coordinates as GeoJSON; that is your own code.
Publishing it
Publish the file as a distribution of a dataset in your catalog, with license, update frequency and the date of the export (see the open data section, "Publishing dataset files").
Checks
- To do: Only public locations; no addresses of individuals (for example home-based services).
- To do: Coordinates use a dot as decimal separator and the same precision throughout.
- To do: Every row has a stable identifier, so re-users can follow changes.
- To do: The file is refreshed when locations change.
Related pages
- What exists for maps
- Exporting content as CSV, JSON or XML
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.