Nicky Nicolson commited on
Commit
16660e8
1 Parent(s): 65e9f20

Add GBIF specimens

Browse files
Files changed (2) hide show
  1. Dockerfile +9 -0
  2. requirements.txt +3 -1
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.11
2
 
 
3
  WORKDIR /code
4
 
5
  COPY ./requirements.txt /code/requirements.txt
@@ -8,6 +9,14 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
  ADD https://docs.google.com/uc?export=download&id=17mI5W0qiGiBp_RV1jy3QR3KtN7Ah-1Ha /code/ihinst.db
10
 
 
 
 
 
 
 
 
 
11
  RUN sqlite-utils tables /code/ihinst.db --counts
12
  RUN chmod 755 /code/ihinst.db
13
 
 
1
  FROM python:3.11
2
 
3
+
4
  WORKDIR /code
5
 
6
  COPY ./requirements.txt /code/requirements.txt
 
9
 
10
  ADD https://docs.google.com/uc?export=download&id=17mI5W0qiGiBp_RV1jy3QR3KtN7Ah-1Ha /code/ihinst.db
11
 
12
+ # Download GBIF occurrences and prepare for use with datasette
13
+ RUN mkdir data
14
+ ADD https://api.gbif.org/v1/occurrence/download/request/0032228-231002084531237.zip /data/gbif-occs.zip
15
+ RUN unzip data/gbif-occs.zip -d data
16
+ RUN ls -l data
17
+ RUN csvs-to-sqlite data/occurrences.csv code/gbifocc.db
18
+ RUN ls -l code
19
+
20
  RUN sqlite-utils tables /code/ihinst.db --counts
21
  RUN chmod 755 /code/ihinst.db
22
 
requirements.txt CHANGED
@@ -1,3 +1,5 @@
1
  datasette
2
  datasette-reconcile
3
- sqlite-utils
 
 
 
1
  datasette
2
  datasette-reconcile
3
+ sqlite-utils
4
+ csvs-to-sqlite
5
+ pandas==1.4.0