/bizkaiko-etxeak

Interactive map of the buildings of Biscay and their age

Primary LanguageJupyter NotebookMIT LicenseMIT

Bizkaiko etxeak

(Houses of Biscay)

Bizkaiko etxeak is an interactive web map where the houses of Biscay (Basque Country) are depicted based on their construction date. The map data was taken from the website of the cadastre of Biscay. Although the data is open access, its property and reusing rights are not, so there is no data in the repository, only the necessary code and instructions to create the map itself. That's why some directories only have gitignore files: to preserve directory structure while ignoring protected data.

Live map

The map

Getting Started

These instructions will show you the steps followed to create the aforementioned map. First, clone the git repository:

$ git clone git://github.com/mikeliturbe/bizkaiko-etxeak.git

Data wrangling

Raw cadastre data requires preprocessing. All steps for data retrieval and manipulation are explained in a Jupyter notebook. To get the notebook up and running in a virtual environment:

$ cd data_wrangling
$ pip install -r requirements.txt
$ jupyter notebook

Follow the notebook instructions to create the map shapefiles. Final shapefiles will be located in the data/results directory.

Map creation

  • Install Tilemill.
  • Copy the Tilemill project data from the repository to the Tilemill saves directory (~/Documents/MapBox/project/ by default)
$ cd tilemill_project
$ mkdir ~/Documents/Mapbox/project/bizkaiko-etxeak
$ cp -r * ~/Documents/Mapbox/project/bizkaiko-etxeak/
  • Copy the shapefiles generated with the Jupyter Notebook to the layers directory inside the Tilemill project directory.
$ cd data/results
$ cp all_buildings* ~/Documents/Mapbox/project/bizkaiko-etxeak/layers/allbuildings/
$ cp all_boundaries* ~/Documents/Mapbox/project/bizkaiko-etxeak/layers/allboundaries/
  • Open Tilemill and the project should appear there.
  • By using CartoCSS you can customize the appearance of the map. For this map, the color of building shapes were chosen according to their construction date. Colors were chosen using ColorBrewer.

Map deployment

  • Export project MBTiles using Tilemill (Export > MBTiles).
  • Convert MBTiles to images with MBUtil
$ mb-util --image_format=png name_of_file.mbtiles bizkaiko-etxeak
  • Upload the created image tile directory to a web server.
  • Change web_files/index.html to point to the domain and directory hosting the map tiles.
  • Upload the contents of the web_files directory to the web server.
  • Access the website with a web navigator. The map should be online.

Built With

Authors

License

  • This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments