Export
Following the Wikipedia culture, RopeWiki believes that access to information should be free and available to everyone. All of RopeWiki information, from canyon locations to KML maps to condition reports, is publicly available for anyone to use.
We believe facilitating the sharing of information among people is what has made humankind progress since the dawn of time. Humans used to congregate in a cave around a fire learning how to hunt by looking at pictographs painted on the walls. Nowadays we pull up a page on our iPhone to learn how to make a figure 8 releasable anchor... time have changed but the spirit is still the same.
You want to grab everything and post it on your site? No problem! Just follow the Creative Commons license so that the body of human knowledge will benefit. We will be delighted that our information was useful to you and hope you will come back for more soon.
Reciprocating
If you import our information in your own website or system, it would be nice if you could reciprocate (letting us use your information too). You don't need to do anything extreme, just provide us a link to a page with the information in any format you like and we will make it work.
Queries
Special:Ask is the best way to export data from any Wiki, this is basically a 'http' call of an inline query like the one we ourselves use in the system. The Special:Ask allows you to write you query online and then either run them to get results or get a url to run it later in a script or app of your own.
Special:Ask support a number of export formats, from HTML to CSV to JSON feeds, and all is accomplished automatically in the server.
- http://www.semantic-mediawiki.org/wiki/Help:XML_format
- http://www.semantic-mediawiki.org/wiki/Help:JSON_format
- http://www.semantic-mediawiki.org/wiki/Help:CSV_format
- https://maps.extension.wiki/wiki/KML_export
With Special:Ask you can take a sample query of the ones shown below and easily customize what data you want and in what format.
- Click on any of the 'HTML' queries, they will show HTML results page
- Click on [Edit query] (top line) and change the settings to fit your need: limit, offset and format are the most important!
- Click [Run query] to get results or [embed query] to export the url to use in your own scripts
To download A LOT of data, you may need to paginate. Run your query multiple times changing the 'offset' to get the next page. By doing so you can download vast amounts of data very efficiently without risks of timeout.
#1 {{#ask:QUERY|offset=0|limit=1000}}
#2 {{#ask:QUERY|offset=1000|limit=1000}}
#3 {{#ask:QUERY|offset=2000|limit=1000}}
etc..
Stop when you get less than 1000 results (you have reach the end)
Its' better to run more frequent incremental updates querying only data modified since the last update (Modification date), but once a month or so is better to just download the whole database just in case there's been deletions, renames and other internal changes in the way pages are named.
Canyon Locations
This section shows how Canyon Locations can be exported from RopeWiki to be imported in another system using [Special:Ask].
The query below will download a CSV file with coordinates of all canyons modified aftter 1 July 2010, along with url of KML file (for those that have one):
{{#ask: [[Category:Canyons]][[Max Modification date::>07/01/2010]]
|?Has coordinates=Coords
|?Has KML file=KML File
|sort=Max Modification date
|order=descending
|limit=1000
|offset=0
|format=csv
}}
Edit this query in Special:Ask
Canyon Information
This section shows how Canyon Information can be exported from RopeWiki to be imported in another system.
{{#ask: [[Max Modification date::>1Jan2000]][[Category:Canyons]][[Has location type::Canyoneering]][[Has location class::1]]
|?Max Modification date
|?Located in region
|?Has latitude
|?Has longitude
|?Has ACA Rating
|?Has number of rappels
|?Has longest rappel
|?Has fastest typical time
|?Has slowest typical time
|?Has vehicle type
|?Has shuttle length
|?Is explored
|?Has approach elevation gain
|?Has exit elevation gain
|?Has best season
|?Has star rating
|?Has KML file
|?Has url
|sort=Max Modification date
|order=desc
|limit=1000
|format=csv
}}
Edit this query in Special:Ask
In this sample query the Canyon information export is limited to entries added or modified AFTER 1 July 2000. This is just an example, you can configure the query to fit any needs. Canyon summary information is best exported initially as a big bulk without the limiting date. Updates can then be exported periodically, limited to the date of last update. This process could be automated and run weekly, only importing the new additions and modifications of the previous week.
Explanation of columnas CSV in Spanish for CanyoningApp:
- (first column) = Nombre canyon
- Max Modification date = Ultima fecha de modificacion
- Located in region= Nombre region (ver REGIONES)
- Has latitude= latitud
- Has longitude= longitud
- Has ACA Rating= rating del canyon
- Has number of rappels Numero rappeles
- Has longest rappel Rappel mas largo
- Has fastest typical time Tiempo (minimo)
- Has slowest typical timeTiempo (maximo)
- Has vehicle type Tipo coche necesario
- Has shuttle length >0 si hace falta combo vehiculos
- Is explored false si NO se ha explorado todavia
- Has approach elevation gain Elevacion al acceder
- Has exit elevation gain Elevacion al salir
- Has best season Mejor temporada
- Has star rating Calidad (0:no se sabe, 1:mala – 5:excelente)
- Has KML file URL del fichero KML con el recorrido del canyon
- Has url URL a la pagina de ropewiki.com de este canyon!
Canyon ID
Canyons may have names that are slightly different from site to site. To facilitate canyon matching one may use a numeric ID to identify a canyon and use that ID across sites. Ropewiki uses the PAGEID by default, this is a number that uniquely identifies the wiki page where a canyon is documented. If you are extracting information from Ropewiki you can use this ID in your system as internal ID to simplify bi-directional syncs. (from us to you and from you to us)
The PAGEID is reported in the last column of the JSON/CSV export list. Just put it in a
and we will be able to link your data seamlessly, regardless of the name you choose to use for the canyon.
Another option to ID canyons is to use the GPS coordinates of the location, by comparing the coordinates and finding the closest match one can identify canyons across sites that use different names. However, this trick does not always work. Canyons may not have GPS coordinates or there may be more than one canyon in the same area that confuse the system.
Regions
A region is a large area that may contain sub-regions and/or canyons that share common characteristics. Regions form a hierarchical structure that resembles a tree where the region "World" is the root node and the smallest regions are the leaf nodes. Regions may have multiple parent regions, for instance "Lake Powell" belongs to "Utah" and "Arizona", "Columbia River Gorge" belongs to "Oregon" and "Washington" and "British Columbia" belongs to "Pacific Northwest" and "Canada".
You can see Ropewiki region structure at https://ropewiki.com/index.php/Regions
Regions do not change often, but you should update them at the same time you update canyon information just in case. The information payload is so small you may just want to download the whole structure with every update.
{{#ask: [[Max Modification date::>1Jan2000]][[Category:Regions]]
|?Max Modification date
|?Located in region
|?Has region level
|?Is major region
|format=csv
|sort=Max Modification date
|order=desc
|limit=1000
|format=csv
}}
Edit this query in Special:Ask
Columns explained in Spanish for CanyoningApp:
- (first column) = Nombre region
- Max Modification date = Ultima fecha de modificacion
- Located in region = Nombre del padre (otra region), puede haber mas de uno
- Has region level = Nivel (1=region base)
- Is major region = Es un pais o gran estado
Condition Reports
This section shows how Condition Reports can be exported from RopeWiki to be imported in another system. We support a number of formats, from HTML table to RSS feeds, and all is accomplished with the Special:Ask. This is basically a 'http' call of an inline query like the one below:
{{#ask: [[Category:Conditions]][[Has condition location::+]][[Modification date::>07/01/2010]]
|?Modification date
|?Has condition date
|?Has condition location
|?Has reported by
|?Has condition quality
|?Has condition water
|?Has condition wetsuit
|?Has condition difficulty
|?Has condition time
|?Has team size
|?Has team min experience
|?Has team max experience
|?Has condition comments
|?Has condition url
|sort=Has condition date
|order=descending
|limit=1000
|link=none
|format=csv
}}
Edit this query in Special:Ask
In this sample query Condition report information is exported sorted by 'Condition date', and the list is limited to entries added or modified AFTER 1 July 2010. This is just an example, you can configure the query in any way you want. You may want to keep track of the date of the last sync and download only conditions that were created or modified after the last update. If properly implemented, your system may automatically sync data daily with minimal overhead.
NOTE: The first column is always the Condition Report pagename. Just add 'https://ropewiki.com/index.php/' and replace ' ' with '_' to get a full url.
For example: 'Conditions:Seven Teacups-20140728171310' => https://ropewiki.com/index.php/Conditions:Seven_Teacups-20140728171310
You may want to provide this link to your users in case they want to get more details about that specific condition report.