The U2 Egypt project aims to digitize a series of recently declassified aerial photographs that document the Nile Delta and Nile Valley. Shot by U2 spy planes, this imagery provides much higher resolution images than any currently available imagery (for instance the CORONA satellite imagery that has revolutionized archaeology in this area in the past two decades), and shows the landscape prior to the construction of the Aswan High Dam.
This repo contains the website which contextualizes the images, provides geographical information about them, and describes the project.
This site is built in Hugo. The command to build the site for the development server, including drafts, is hugo build --minify --cleanDestinationDir -b http://dcdscit2.services.brown.edu/projects/u2egypt/. The command to build the site for production is hugo -e production --minify --cleanDestinationDir. To deploy, you must be on VPN, and rsync files: rsync -avz public username@.server:/var/www/html/projects/u2egypt replacing username and server with the correct values.
The image comparison functionality is by @cloudfour. The map is built with Leaflet and a number of plugins.
To embed a BDR item using Mirador, use the following shortcode:
{{< mirador "1234" >}}where 1234 is the numeric value for a BDR PID, e.g., the item at https://repository.library.brown.edu/studio/item/bdr:89322/ would be rendered with {{< mirador "89322" >}}. Multiple Mirador embeds can be included in a given page.
To compate two images of equal dimensions:
{{< compare left="804now.jpg" right="804then.jpg" left-alt="Giza now" right-alt="Giza then" label="blah">}}The shortcode assumes the images are page resources. Multiple image comparisons can be included in a given page.
When getting updated images and json from Kiosk, put everything in the /assets/kiosk directory.
In the project root, run python assets/js/clean_data.py -i assets/kiosk/docs.json -o assets/kiosk/clean_data.json. This script:
- removes the wrapping
u2ers_sitesso the values are easier to access - removes sites where the
limit_view_tofield is not null, and where there are no U2 images, which shouldn't be made public - transforms the
at_periodsandg_earth_damage_causefield values into arrays, so Hugo can loop through them appropriately (and use at_periods as a taxonomy) - transforms the
u2_images_showing_the_sitefield into an array
Once the data has been cleaned and formatted, we need to add information about the BDR items which are part of the Kiosk dataset. To do so, run
python assets/js/pid_lookup.py \
-s assets/kiosk/clean_data.json \
-l static/bdr.json \
-o assets/kiosk/data.jsonRun the json2geojson.py script: python assets/js/json2geojson.py -i assets/kiosk/data.json -o static/kiosk.geojson to transform the cleaned data into geojson.
There has got to be a less stupid way to make the Kiosk images, which should be global resources, published so the {{ .RelPermalink }} code works, but for now there is a Secret content page, which publishes all the images in the assets directory.