Skip to content
/ arabel Public

🕷️ Source code for the future Atlas of spiders of Belgium based on the ARABEL database

License

Notifications You must be signed in to change notification settings

niconoe/arabel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO

  • occurrence search: proper message if empty table
  • occurrence search: show numer of occurrences in ? occurrence search: (option to) group by family

Arabel

Source code for the (future) Atlas of spiders (ARABEL Database).

Implemented with Python, Django and Vue.js

Data import process

  1. convert access database to CSV using jetread. All useful data is in the tables listed below:
./jetread spinnenatlas_20201007.mdb export "STAAL GEGEVENS" -fmt csv > staal_gegevens.csv

./jetread spinnenatlas_20201007.mdb export "LITERATUUR" -fmt csv > litteratuur.csv

./jetread spinnenatlas_20201007.mdb export "GEGEVENS" -fmt csv > gegevens.csv

./jetread spinnenatlas_20201007.mdb export "SOORTEN INFO" -fmt csv > soorten_info.csv

./jetread spinnenatlas_20201007.mdb export "Omschrijving Rode lijst categoriën" -fmt csv > redlist_categories.csv
  1. Copy those 4 files to ./data (keep the same filenames)

  2. Run the full import script:

$ python manage.py import_all_access

  1. Make sure all grid data is in the database (see point below)

  2. Reconcile Access data and grid data:

$ python manage.py join_station_squares

Importing grid data

Grid data (=MGRS squares over Belgium) should be imported to the MgrsSquare model/table. GeoDjango's layermapping utility can be used for that. Source data in grid_data directory:

Example:

from django.contrib.gis.utils import LayerMapping
from website.models import *
mapping = {'name': 'code', 'gzd': 'gzd', 'poly': 'POLYGON'}
lm = LayerMapping(MgrsSquare, '/home/nnoe/Downloads/utm5_grid_belgium.polygon.gpkg', mapping)
lm.save(verbose=True, strict=True)

About

🕷️ Source code for the future Atlas of spiders of Belgium based on the ARABEL database

Topics

Resources

License

Stars

Watchers

Forks