Below is a detailed list of steps followed to create and provide ongoing updates to intertextual maps from a geo-encoded text.

  1. ONE TIME/ONGOING: Encode text in TEI/XML. Places designated with the following elements and attributes:
<rs type=“place” ref=“PLACECODE”

    <placeName ref=“PLACECODE”></placeName>

    <rs type=“demonym” ref=“PLACECODE”></rs>
  2. ONE TIME: Upload file to Exist-DB corpus collection
  3. ONE TIME: Create blank CODEplaces.xml file
  4. NIGHTLY (cronjob): Export place data from tei file: create-CODE-places.xql—>CODEplaces.xml
  5. ONE TIME: Create xsl file to update csv file: csv-transform-obraCODE.xsl
  6. ONE TIME: Create csv file with stylesheet: places-obraCODE.xsl-->places-obraCODE.csv
  7. ONE TIME: Add csv file to savecsvfiletopublicfolder.xq
  8. NIGHTLY (cronjob): Hit xml/CODEplaces.xml to update csv file
  9. NIGHTLY (cronjob): Hit xql/savecsvfiletopublicfolder.xq
  10. NIGHTLY (cronjob): Import data into mysql db
  11. NIGHTLY (cronjob): Export mysql data (mysql table dump)
  12. NIGHTLY (cronjob): Create placeography file: CREATE-CODE-PLACEOGRAPHY.xql—>CODE-placeography.xml
  13. NIGHTLY (cronjob): Set xml file to update daily:

    wget xql/create-CODE-places.xql >/dev/null 2>&1
  14. NIGHTLY (cronjob): Set csv file to update
    wget xml/CODEplaces.xml >/dev/null 2>&1
  15. NIGHTLY (cronjob): Import csv into database:

    mysql --execute="CREATE TABLE placeobras_import (placeref VARCHAR(150) NOT NULL,placeworks VARCHAR(250) NOT NULL, PRIMARY KEY (placeref));"

    mysql --execute="LOAD DATA LOCAL INFILE 'places-obraCODE.csv' INTO TABLE placeobras_import FIELDS TERMINATED BY ',' lines terminated by '\n' IGNORE 1 LINES (placeref, placeworks)"
    mysql --execute="UPDATE placeobras_import B INNER JOIN places A USING (placeref) SET A.placeworks = CASE WHEN A.placeworks ='' THEN B.placeworks WHEN A.placeworks LIKE concat('\%',B.placeworks,'\%') THEN A.placeworks ELSE concat(A.placeworks,',',B.placeworks) END;"
 mysql --execute="load data local infile 'places-obraCODE.csv' IGNORE into table places fields terminated by ',' OPTIONALLY ENCLOSED BY '\"' lines terminated by '\n' IGNORE 1 LINES (placeref,placeworks)"

    mysql --execute="DROP TABLE placeobras_import;"
  16. ONE TIME: Data entry for each place in MySql DB (using Sequel Pro)
    geo coords: point, area or path (WKT format)

    place name

    place type

place country


    Country/province/region shapes:
    hand-drawn: QGIS and
  17. ONE TIME: Create views in MySQL DB
CREATE VIEW places_areas_CODE AS SELECT placeref, placename,placearea,placetype,placeworks,placeapprx,placecountry FROM places WHERE placepointcoords<>'' and placeworks LIKE '%OBRACODE%'
  18. NIGHTLY (cronjob): Remove old shape files and create new shape files for place type contains OBRACODE results:
 rm /srv/shiny-server/CODE/shapefiles/*
    ogr2ogr /shapefiles MYSQL:DATABASE,user=USER,password=PASSWORD,port=3306 places_points_CODE places_areas_CODE -lco ENCODING=UTF-8
  19. ONE TIME: Create maps in R/Shiny
. Load point and area data (global)
—map data (server)
—create layout (ui) (upload to server)
  20. ONE TIME: Create CODE-placeography.xml file
  21. NIGHTLY (cronjob): Populate CODE-placeography.xml file with CREATE-CODE-PLACEOGRAPHY.xql file
  22. ONE TIME: Stylesheet to format CODE-placeography.xml: xsl/placeography-html-CODE.xml
  23. ONE TIME: Create snippet file: PLACEOGRAPHY-BIBLIO-CODE.xml
  24. ONE TIME: Test placeography file, e.g.:
  25. NIGHTLY (cronjob): Get snippets: xql/GETTING-SNIPPETS-PLACES-CODE.xql. Check book structure (parte/apartado/párrafo) and adjust code in get snippets and CODE-placeography.xml
  26. ONE TIME: Check map. Look for misplaced points and regions. Check that updates are working nightly.