egrace479 commited on
Commit
77c7745
1 Parent(s): 70efb3e

Update readme with more info on multiple zenodo records and duplication of specimens. Add license/citation files.

Browse files
Files changed (4) hide show
  1. .gitignore +164 -0
  2. README.md +6 -3
  3. licenses.json +1 -0
  4. notebooks/make_Jiggins_Img_Master.ipynb +2494 -3
.gitignore ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ #.idea/
161
+
162
+ # Mac system
163
+ .DS_Store
164
+
README.md CHANGED
@@ -30,7 +30,7 @@ language:
30
  ### Dataset Summary
31
 
32
  Subset of the collection records from the research group of Chris Jiggins at the University of Cambridge derived from almost 20 years of field studies.
33
- This subset contains approximately 49,359 RGB images of 12,586 specimens across all Heliconius. Many records include images as well as locality data.
34
  All detached wings were photographed with a DSLR camera with a 100 mm macro-lens in standardized conditions; images and full records with data are stored in the [EarthCape database](https://heliconius.ecdb.io/default.aspx) and on [Zenodo](https://zenodo.org/communities/butterfly?q=&l=list&p=1&s=10&sort=newest) (across 32 records from the Butterfly Genetics Group).
35
 
36
  Both dorsal and ventral images available. Contains both whole butterfly, and 4 wings separate. Large variation in image content.
@@ -93,8 +93,9 @@ Current preprocessing steps: [WingSeg](https://github.com/agporto/WingSeg) on th
93
 
94
  ### Source Data
95
 
96
- Image subset of the [collection records](https://doi.org/10.5281/zenodo.4289222) from the research group of Chris Jiggins at the University of Cambridge derived from almost 20 years of field studies.
97
 
 
98
 
99
  #### Initial Data Collection and Normalization
100
 
@@ -142,7 +143,9 @@ None
142
 
143
  ### Licensing Information
144
 
145
- [More Information Needed]
 
 
146
 
147
  ### Citation Information
148
 
 
30
  ### Dataset Summary
31
 
32
  Subset of the collection records from the research group of Chris Jiggins at the University of Cambridge derived from almost 20 years of field studies.
33
+ This subset contains approximately 49,359 RGB images of 12,586 specimens (34,929 images of 9,546 specimens across all Heliconius). Many records include images as well as locality data.
34
  All detached wings were photographed with a DSLR camera with a 100 mm macro-lens in standardized conditions; images and full records with data are stored in the [EarthCape database](https://heliconius.ecdb.io/default.aspx) and on [Zenodo](https://zenodo.org/communities/butterfly?q=&l=list&p=1&s=10&sort=newest) (across 32 records from the Butterfly Genetics Group).
35
 
36
  Both dorsal and ventral images available. Contains both whole butterfly, and 4 wings separate. Large variation in image content.
 
93
 
94
  ### Source Data
95
 
96
+ These images are a subset of the [Butterfly Genetics Group's Cambridge butterfly collection](https://zenodo.org/communities/butterfly?q=&f=subject%3ACambridge&l=list&p=1&s=10&sort=newest). This collection of butterfly images comes from the research group of Chris Jiggins at the University of Cambridge derived from almost 20 years of field studies.
97
 
98
+ Data is pulled from the Zenodo Records in [`licenses.json`](https://huggingface.co/datasets/imageomics/Jiggins_Heliconius_Collection/blob/main/licenses.json). This file also contains full citation information for all records.
99
 
100
  #### Initial Data Collection and Normalization
101
 
 
143
 
144
  ### Licensing Information
145
 
146
+ The data (images and text) are all licensed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). Each image and text in this dataset is provided under the least restrictive terms allowed by its licensing requirements as provided to us (i.e, we impose no additional restrictions past those specified by this license on the original source files). Modified images are only restricted by this original license.
147
+
148
+ Images can be matched to their source record through the `zenodo_link` column in the Master CSVs to the `url` in the licenses.json file.
149
 
150
  ### Citation Information
151
 
licenses.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"record_number": "4289223", "url": "https://zenodo.org/record/4289223", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., van der Heijden, E., Nadeau, N., & Jiggins, C. (2020 , November). Cambridge butterfly wing collection batch 10. Zenodo. https://doi.org/10.5281/zenodo.4289223", "bibtex": "@misc{gabriela_montejo_kovacevich_2020_4289223, author = {Gabriela Montejo-Kovacevich and Eva van der Heijden and Nicola Nadeau and Chris Jiggins}, title = {Cambridge butterfly wing collection batch 10}, month = nov, year = 2020, publisher = {Zenodo}, doi = {10.5281/zenodo.4289223}, url = {https://doi.org/10.5281/zenodo.4289223} }"}, {"record_number": "4288311", "url": "https://zenodo.org/record/4288311", "license": "cc-by-4.0", "citation": "Salazar, P. A., Nadeau, N., Montejo-Kovacevich, G., & Jiggins, C. (2020 , November). Sheffield butterfly wing collection - Patricio Salazar, Nicola Nadeau, Ikiam broods batch 1 and 2. Zenodo. https://doi.org/10.5281/zenodo.4288311", "bibtex": "@misc{patricio_a_salazar_2020_4288311, author = {Patricio A. Salazar and Nicola Nadeau and Gabriela Montejo-Kovacevich and Chris Jiggins}, title = {{Sheffield butterfly wing collection - Patricio Salazar, Nicola Nadeau, Ikiam broods batch 1 and 2}}, month = nov, year = 2020, publisher = {Zenodo}, doi = {10.5281/zenodo.4288311}, url = {https://doi.org/10.5281/zenodo.4288311} }"}, {"record_number": "2677821", "url": "https://zenodo.org/record/2677821", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., & Warren, I. (2019 , May). Cambridge butterfly wing collection batch 2. Zenodo. https://doi.org/10.5281/zenodo.2677821", "bibtex": "@misc{montejo_kovacevich_2019_2677821, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian}, title = {Cambridge butterfly wing collection batch 2}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2677821}, url = {https://doi.org/10.5281/zenodo.2677821} }"}, {"record_number": "3477891", "url": "https://zenodo.org/record/3477891", "license": "cc-by-4.0", "citation": "Jiggins, C., Montejo-Kovacevich, G., Salazar, P., & Warren, I. (2019 , October). Heliconiine Butterfly Collection Records from University of Cambridge. Zenodo. https://doi.org/10.5281/zenodo.3477891", "bibtex": "@misc{chris_jiggins_2019_3477891, author = {Chris Jiggins and Gabriela Montejo-Kovacevich and Patricio Salazar and Ian Warren}, title = {{Heliconiine Butterfly Collection Records from University of Cambridge}}, month = oct, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.3477891}, url = {https://doi.org/10.5281/zenodo.3477891} }"}, {"record_number": "2682458", "url": "https://zenodo.org/record/2682458", "license": "cc-by-4.0", "citation": "Jiggins, C., Montejo-Kovacevich, G., Warren, I., & Wiltshire, E. (2019 , May). Cambridge butterfly wing collection batch 3. Zenodo. https://doi.org/10.5281/zenodo.2682458", "bibtex": "@misc{jiggins_2019_2682458, author = {Jiggins, Chris and Montejo-Kovacevich, Gabriela and Warren, Ian and Wiltshire, Eva}, title = {Cambridge butterfly wing collection batch 3}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2682458}, url = {https://doi.org/10.5281/zenodo.2682458} }"}, {"record_number": "2682669", "url": "https://zenodo.org/record/2682669", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., & Warren, I. (2019 , May). Cambridge butterfly wing collection batch 4. Zenodo. https://doi.org/10.5281/zenodo.2682669", "bibtex": "@misc{montejo_kovacevich_2019_2682669, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian}, title = {Cambridge butterfly wing collection batch 4}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2682669}, url = {https://doi.org/10.5281/zenodo.2682669} }"}, {"record_number": "2684906", "url": "https://zenodo.org/record/2684906", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., Warren, I., & Wiltshire, E. (2019 , May). Cambridge butterfly wing collection batch 5. Zenodo. https://doi.org/10.5281/zenodo.2684906", "bibtex": "@misc{montejo_kovacevich_2019_2684906, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian and Wiltshire, Eva}, title = {Cambridge butterfly wing collection batch 5}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2684906}, url = {https://doi.org/10.5281/zenodo.2684906} }"}, {"record_number": "2552371", "url": "https://zenodo.org/record/2552371", "license": "cc-by-4.0", "citation": "Warren, I. & Jiggins, C. (2019 , February). Miscellaneous Heliconius wing photographs (2001-2019) Part 1. Zenodo. https://doi.org/10.5281/zenodo.2552371", "bibtex": "@misc{warren_2019_2552371, author = {Warren, Ian and Jiggins, Chris}, title = {{Miscellaneous Heliconius wing photographs (2001-2019) Part 1}}, month = feb, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2552371}, url = {https://doi.org/10.5281/zenodo.2552371} }"}, {"record_number": "2553977", "url": "https://zenodo.org/record/2553977", "license": "cc-by-4.0", "citation": "Warren, I. & Jiggins, C. (2019 , February). Miscellaneous Heliconius wing photographs (2001-2019) Part 3. Zenodo. https://doi.org/10.5281/zenodo.2553977", "bibtex": "@misc{warren_2019_2553977, author = {Warren, Ian and Jiggins, Chris}, title = {{Miscellaneous Heliconius wing photographs (2001-2019) Part 3}}, month = feb, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2553977}, url = {https://doi.org/10.5281/zenodo.2553977} }"}, {"record_number": "2686762", "url": "https://zenodo.org/record/2686762", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., Warren, I., & Wiltshire, E. (2019 , May). Cambridge butterfly wing collection batch 6. Zenodo. https://doi.org/10.5281/zenodo.2686762", "bibtex": "@misc{montejo_kovacevich_2019_2686762, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian and Wiltshire, Eva}, title = {Cambridge butterfly wing collection batch 6}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2686762}, url = {https://doi.org/10.5281/zenodo.2686762} }"}, {"record_number": "2549524", "url": "https://zenodo.org/record/2549524", "license": "cc-by-4.0", "citation": "Jiggins, C. & Warren, I. (2019 , January). Cambridge butterfly wing collection - Chris Jiggins 2001/2 broods batch 1. Zenodo. https://doi.org/10.5281/zenodo.2549524", "bibtex": "@misc{jiggins_2019_2549524, author = {Jiggins, Chris and Warren, Ian}, title = {{Cambridge butterfly wing collection - Chris Jiggins 2001/2 broods batch 1}}, month = jan, year = 2019, publisher = {Zenodo}, version = 1, doi = {10.5281/zenodo.2549524}, url = {https://doi.org/10.5281/zenodo.2549524} }"}, {"record_number": "2550097", "url": "https://zenodo.org/record/2550097", "license": "cc-by-4.0", "citation": "Jiggins, C. & Warren, I. (2019 , January). Cambridge butterfly wing collection - Chris Jiggins 2001/2 broods batch 2. Zenodo. https://doi.org/10.5281/zenodo.2550097", "bibtex": "@misc{jiggins_2019_2550097, author = {Jiggins, Chris and Warren, Ian}, title = {{Cambridge butterfly wing collection - Chris Jiggins 2001/2 broods batch 2}}, month = jan, year = 2019, publisher = {Zenodo}, version = 1, doi = {10.5281/zenodo.2550097}, url = {https://doi.org/10.5281/zenodo.2550097} }"}, {"record_number": "4153502", "url": "https://zenodo.org/record/4153502", "license": "cc-by-4.0", "citation": "Meier, J. I., Salazar, P., Montejo-Kovacevich, G., Warren, I., & Jggins, C. (2020 , October). Cambridge butterfly wing collection - Patricio Salazar PhD wild specimens batch 3. Zenodo. https://doi.org/10.5281/zenodo.4153502", "bibtex": "@misc{joana_i_meier_2020_4153502, author = {Joana I. Meier and Patricio Salazar and Gabriela Montejo-Kovacevich and Ian Warren and Chris Jggins}, title = {{Cambridge butterfly wing collection - Patricio Salazar PhD wild specimens batch 3}}, month = oct, year = 2020, publisher = {Zenodo}, doi = {10.5281/zenodo.4153502}, url = {https://doi.org/10.5281/zenodo.4153502} }"}, {"record_number": "1247307", "url": "https://zenodo.org/record/1247307", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., & Warren, I. (2018 , May). Cambridge butterfly wing collection batch 1. Zenodo. https://doi.org/10.5281/zenodo.1247307", "bibtex": "@misc{gabriela_montejo_kovacevich_2018_1247307, author = {Gabriela Montejo-Kovacevich and Chris Jiggins and Ian Warren}, title = {Cambridge butterfly wing collection batch 1}, month = may, year = 2018, publisher = {Zenodo}, doi = {10.5281/zenodo.1247307}, url = {https://doi.org/10.5281/zenodo.1247307} }"}, {"record_number": "3082688", "url": "https://zenodo.org/record/3082688", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., & Warren, I. (2019 , May). Cambridge butterfly wing collection batch 1- version 2. Zenodo. https://doi.org/10.5281/zenodo.3082688", "bibtex": "@misc{montejo_kovacevich_2019_3082688, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian}, title = {{Cambridge butterfly wing collection batch 1- version 2}}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.3082688}, url = {https://doi.org/10.5281/zenodo.3082688} }"}, {"record_number": "2813153", "url": "https://zenodo.org/record/2813153", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., Warren, I., Salazar, C., Elias, M., Gavins, I., Wiltshire, E., Montgomery, S., & McMillan, O. (2019 , May). Cambridge and collaborators butterfly wing collection batch 10. Zenodo. https://doi.org/10.5281/zenodo.2813153", "bibtex": "@misc{montejo_kovacevich_2019_2813153, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian and Salazar, Camilo and Elias, Marianne and Gavins, Imogen and Wiltshire, Eva and Montgomery, Stephen and McMillan, Owen}, title = {{Cambridge and collaborators butterfly wing collection batch 10}}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2813153}, url = {https://doi.org/10.5281/zenodo.2813153} }"}, {"record_number": "1748277", "url": "https://zenodo.org/record/1748277", "license": "cc-by-4.0", "citation": "Salazar, P., Montejo-Kovacevich, G., Warren, I., & Jiggins, C. (2018 , December). Cambridge butterfly wing collection - Patricio Salazar PhD wild and bred specimens batch 1. Zenodo. https://doi.org/10.5281/zenodo.1748277", "bibtex": "@misc{salazar_2018_1748277, author = {Salazar, Patricio and Montejo-Kovacevich, Gabriela and Warren, Ian and Jiggins, Chris}, title = {{Cambridge butterfly wing collection - Patricio Salazar PhD wild and bred specimens batch 1}}, month = dec, year = 2018, publisher = {Zenodo}, doi = {10.5281/zenodo.1748277}, url = {https://doi.org/10.5281/zenodo.1748277} }"}, {"record_number": "2702457", "url": "https://zenodo.org/record/2702457", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., Warren, I., & Wiltshire, E. (2019 , May). Cambridge butterfly wing collection batch 7. Zenodo. https://doi.org/10.5281/zenodo.2702457", "bibtex": "@misc{montejo_kovacevich_2019_2702457, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian and Wiltshire, Eva}, title = {Cambridge butterfly wing collection batch 7}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2702457}, url = {https://doi.org/10.5281/zenodo.2702457} }"}, {"record_number": "2548678", "url": "https://zenodo.org/record/2548678", "license": "cc-by-4.0", "citation": "Salazar, P., Montejo-Kovacevich, G., Warren, I., & Jiggins, C. (2019 , January). Cambridge butterfly wing collection - Patricio Salazar PhD wild and bred specimens batch 2. Zenodo. https://doi.org/10.5281/zenodo.2548678", "bibtex": "@misc{salazar_2019_2548678, author = {Salazar, Patricio and Montejo-Kovacevich, Gabriela and Warren, Ian and Jiggins, Chris}, title = {{Cambridge butterfly wing collection - Patricio Salazar PhD wild and bred specimens batch 2}}, month = jan, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2548678}, url = {https://doi.org/10.5281/zenodo.2548678} }"}, {"record_number": "5561246", "url": "https://zenodo.org/record/5561246", "license": "cc-by-4.0", "citation": "Pinheiro de Castro, E., Jiggins, C., Lucas da Silva-Brand\u00e3o, K., Victor Lucci Freitas, A., Zikan Cardoso, M., Van Der Heijden, E., Meier, J., & Warren, I. (2022 , February). Brazilian Butterflies Collected December 2020 to January 2021. Zenodo. https://doi.org/10.5281/zenodo.5561246", "bibtex": "@misc{pinheiro_de_castro_2022_5561246, author = {Pinheiro de Castro, Erika and Jiggins, Christopher and Lucas da Silva-Brand\u00e3o, Karina and Victor Lucci Freitas, Andre and Zikan Cardoso, Marcio and Van Der Heijden, Eva and Meier, Joana and Warren, Ian}, title = {{Brazilian Butterflies Collected December 2020 to January 2021}}, month = feb, year = 2022, publisher = {Zenodo}, doi = {10.5281/zenodo.5561246}, url = {https://doi.org/10.5281/zenodo.5561246} }"}, {"record_number": "2707828", "url": "https://zenodo.org/record/2707828", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., Warren, I., & Wiltshire, E. (2019 , May). Cambridge butterfly wing collection batch 8. Zenodo. https://doi.org/10.5281/zenodo.2707828", "bibtex": "@misc{montejo_kovacevich_2019_2707828, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian and Wiltshire, Eva}, title = {Cambridge butterfly wing collection batch 8}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2707828}, url = {https://doi.org/10.5281/zenodo.2707828} }"}, {"record_number": "2714333", "url": "https://zenodo.org/record/2714333", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Jiggins, C., Warren, I., Wiltshire, E., & Gavins, I. (2019 , May). Cambridge butterfly wing collection batch 9. Zenodo. https://doi.org/10.5281/zenodo.2714333", "bibtex": "@misc{montejo_kovacevich_2019_2714333, author = {Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian and Wiltshire, Eva and Gavins, Imogen}, title = {Cambridge butterfly wing collection batch 9}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2714333}, url = {https://doi.org/10.5281/zenodo.2714333} }"}, {"record_number": "4291095", "url": "https://zenodo.org/record/4291095", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., van der Heijden, E., & Jiggins, C. (2020 , November). Cambridge butterfly collection - GMK Broods Ikiam 2018. Zenodo. https://doi.org/10.5281/zenodo.4291095", "bibtex": "@misc{gabriela_montejo_kovacevich_2020_4291095, author = {Gabriela Montejo-Kovacevich and Eva van der Heijden and Chris Jiggins}, title = {{Cambridge butterfly collection - GMK Broods Ikiam 2018}}, month = nov, year = 2020, publisher = {Zenodo}, doi = {10.5281/zenodo.4291095}, url = {https://doi.org/10.5281/zenodo.4291095} }"}, {"record_number": "5731587", "url": "https://zenodo.org/record/5731587", "license": "cc-by-4.0", "citation": "Meier, J., Barker, A., Jiggins, C., Warren, I., & Blow, R. (2021 , November). Cambridge butterfly wing collection - Ecuador, August 2019. Zenodo. https://doi.org/10.5281/zenodo.5731587", "bibtex": "@misc{joana_meier_2021_5731587, author = {Joana Meier and Annalie Barker and Chris Jiggins and Ian Warren and Rachel Blow}, title = {{Cambridge butterfly wing collection - Ecuador, August 2019}}, month = nov, year = 2021, publisher = {Zenodo}, version = {version 1}, doi = {10.5281/zenodo.5731587}, url = {https://doi.org/10.5281/zenodo.5731587} }"}, {"record_number": "3569598", "url": "https://zenodo.org/record/3569598", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Cookson, L., van der Heijden, E., Warren, I., Edwards, D. P., & Jiggins, C. (2019 , December). Cambridge butterfly collection - Loreto, Peru 2018. Zenodo. https://doi.org/10.5281/zenodo.3569598", "bibtex": "@misc{gabriela_montejo_kovacevich_2019_3569598, author = {Gabriela Montejo-Kovacevich and Letitia Cookson and Eva van der Heijden and Ian Warren and David P. Edwards and Chris Jiggins}, title = {Cambridge butterfly collection - Loreto, Peru 2018}, month = dec, year = 2019, publisher = {Zenodo}, version = {1.0.0}, doi = {10.5281/zenodo.3569598}, url = {https://doi.org/10.5281/zenodo.3569598} }"}, {"record_number": "4287444", "url": "https://zenodo.org/record/4287444", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Cookson, L., van der Heijden, E., Warren, I., Edwards, D. P., & Jiggins, C. (2020 , November). Cambridge butterfly collection - Loreto, Peru 2018 batch2. Zenodo. https://doi.org/10.5281/zenodo.4287444", "bibtex": "@misc{gabriela_montejo_kovacevich_2020_4287444, author = {Gabriela Montejo-Kovacevich and Letitia Cookson and Eva van der Heijden and Ian Warren and David P. Edwards and Chris Jiggins}, title = {{Cambridge butterfly collection - Loreto, Peru 2018 batch2}}, month = nov, year = 2020, publisher = {Zenodo}, doi = {10.5281/zenodo.4287444}, url = {https://doi.org/10.5281/zenodo.4287444} }"}, {"record_number": "4288250", "url": "https://zenodo.org/record/4288250", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Cookson, L., van der Heijden, E., Warren, I., Edwards, D. P., & Jiggins, C. (2020 , November). Cambridge butterfly collection - Loreto, Peru 2018 batch3. Zenodo. https://doi.org/10.5281/zenodo.4288250", "bibtex": "@misc{gabriela_montejo_kovacevich_2020_4288250, author = {Gabriela Montejo-Kovacevich and Letitia Cookson and Eva van der Heijden and Ian Warren and David P. Edwards and Chris Jiggins}, title = {{Cambridge butterfly collection - Loreto, Peru 2018 batch3}}, month = nov, year = 2020, publisher = {Zenodo}, doi = {10.5281/zenodo.4288250}, url = {https://doi.org/10.5281/zenodo.4288250} }"}, {"record_number": "5526257", "url": "https://zenodo.org/record/5526257", "license": "cc-by-4.0", "citation": "Montejo-Kovacevich, G., Paynter, Q., & Ghane, A. (2021 , September). Heliconius erato cyrbia, Cook Islands (New Zealand) 2016, 2019, 2021. Zenodo. https://doi.org/10.5281/zenodo.5526257", "bibtex": "@misc{montejo_kovacevich_2021_5526257, author = {Montejo-Kovacevich, Gabriela and Paynter, Quentin and Ghane, Amin}, title = {{Heliconius erato cyrbia, Cook Islands (New Zealand) 2016, 2019, 2021}}, month = sep, year = 2021, publisher = {Zenodo}, doi = {10.5281/zenodo.5526257}, url = {https://doi.org/10.5281/zenodo.5526257} }"}, {"record_number": "2553501", "url": "https://zenodo.org/record/2553501", "license": "cc-by-4.0", "citation": "Warren, I. & Jiggins, C. (2019 , February). Miscellaneous Heliconius wing photographs (2001-2019) Part 2. Zenodo. https://doi.org/10.5281/zenodo.2553501", "bibtex": "@misc{warren_2019_2553501, author = {Warren, Ian and Jiggins, Chris}, title = {{Miscellaneous Heliconius wing photographs (2001-2019) Part 2}}, month = feb, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2553501}, url = {https://doi.org/10.5281/zenodo.2553501} }"}, {"record_number": "2735056", "url": "https://zenodo.org/record/2735056", "license": "cc-by-4.0", "citation": "Salazar, C., Montejo-Kovacevich, G., Jiggins, C., Warren, I., & Gavins, I. (2019 , May). Camilo Salazar and Cambridge butterfly wing collection batch 1. Zenodo. https://doi.org/10.5281/zenodo.2735056", "bibtex": "@misc{salazar_2019_2735056, author = {Salazar, Camilo and Montejo-Kovacevich, Gabriela and Jiggins, Chris and Warren, Ian and Gavins, Imogen}, title = {{Camilo Salazar and Cambridge butterfly wing collection batch 1}}, month = may, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2735056}, url = {https://doi.org/10.5281/zenodo.2735056} }"}, {"record_number": "2554218", "url": "https://zenodo.org/record/2554218", "license": "cc-by-4.0", "citation": "Mattila, A., Jiggins, C., & Warren, I. (2019 , February). University of Helsinki butterfly wing collection - Anniina Mattila field caught specimens. Zenodo. https://doi.org/10.5281/zenodo.2554218", "bibtex": "@misc{mattila_2019_2554218, author = {Mattila, Anniina and Jiggins, Chris and Warren, Ian}, title = {{University of Helsinki butterfly wing collection - Anniina Mattila field caught specimens}}, month = feb, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2554218}, url = {https://doi.org/10.5281/zenodo.2554218} }"}, {"record_number": "2555086", "url": "https://zenodo.org/record/2555086", "license": "cc-by-4.0", "citation": "Mattila, A., Jiggins, C., & Warren, I. (2019 , February). University of Helsinki butterfly collection - Anniina Mattila bred specimens. Zenodo. https://doi.org/10.5281/zenodo.2555086", "bibtex": "@misc{mattila_2019_2555086, author = {Mattila, Anniina and Jiggins, Chris and Warren, Ian}, title = {{University of Helsinki butterfly collection - Anniina Mattila bred specimens}}, month = feb, year = 2019, publisher = {Zenodo}, doi = {10.5281/zenodo.2555086}, url = {https://doi.org/10.5281/zenodo.2555086} }"}]
notebooks/make_Jiggins_Img_Master.ipynb CHANGED
@@ -1,3 +1,2494 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:942902efc187ba615cd7ca2a9030e64060aafa4c09ee03f775565186d00eeb77
3
- size 79884
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "import pandas as pd"
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "code",
14
+ "execution_count": 2,
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "jiggins = pd.read_csv(\"../Jiggins_Zenodo_Master.csv\", low_memory = False)"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": 3,
24
+ "metadata": {},
25
+ "outputs": [
26
+ {
27
+ "data": {
28
+ "text/plain": [
29
+ "(49956, 25)"
30
+ ]
31
+ },
32
+ "execution_count": 3,
33
+ "metadata": {},
34
+ "output_type": "execute_result"
35
+ }
36
+ ],
37
+ "source": [
38
+ "jiggins.shape"
39
+ ]
40
+ },
41
+ {
42
+ "cell_type": "code",
43
+ "execution_count": 4,
44
+ "metadata": {},
45
+ "outputs": [
46
+ {
47
+ "data": {
48
+ "text/html": [
49
+ "<div>\n",
50
+ "<style scoped>\n",
51
+ " .dataframe tbody tr th:only-of-type {\n",
52
+ " vertical-align: middle;\n",
53
+ " }\n",
54
+ "\n",
55
+ " .dataframe tbody tr th {\n",
56
+ " vertical-align: top;\n",
57
+ " }\n",
58
+ "\n",
59
+ " .dataframe thead th {\n",
60
+ " text-align: right;\n",
61
+ " }\n",
62
+ "</style>\n",
63
+ "<table border=\"1\" class=\"dataframe\">\n",
64
+ " <thead>\n",
65
+ " <tr style=\"text-align: right;\">\n",
66
+ " <th></th>\n",
67
+ " <th>Unnamed: 0</th>\n",
68
+ " <th>CAMID</th>\n",
69
+ " <th>X</th>\n",
70
+ " <th>Image_name</th>\n",
71
+ " <th>Side</th>\n",
72
+ " <th>zenodo_name</th>\n",
73
+ " <th>zenodo_link</th>\n",
74
+ " <th>Sequence</th>\n",
75
+ " <th>Taxonomic.Name</th>\n",
76
+ " <th>Locality</th>\n",
77
+ " <th>...</th>\n",
78
+ " <th>Dataset</th>\n",
79
+ " <th>Store</th>\n",
80
+ " <th>Eclosion.Date</th>\n",
81
+ " <th>Brood</th>\n",
82
+ " <th>Death.Date</th>\n",
83
+ " <th>Cross.Type</th>\n",
84
+ " <th>Stage</th>\n",
85
+ " <th>Sex</th>\n",
86
+ " <th>Unit.Type</th>\n",
87
+ " <th>Verbatim.Coordinates</th>\n",
88
+ " </tr>\n",
89
+ " </thead>\n",
90
+ " <tbody>\n",
91
+ " <tr>\n",
92
+ " <th>0</th>\n",
93
+ " <td>1</td>\n",
94
+ " <td>NaN</td>\n",
95
+ " <td>20776</td>\n",
96
+ " <td>NaN</td>\n",
97
+ " <td>NaN</td>\n",
98
+ " <td>0.sheffield.ps.nn.ikiam.batch1.csv</td>\n",
99
+ " <td>https://zenodo.org/record/4288311</td>\n",
100
+ " <td>NaN</td>\n",
101
+ " <td>NaN</td>\n",
102
+ " <td>NaN</td>\n",
103
+ " <td>...</td>\n",
104
+ " <td>NaN</td>\n",
105
+ " <td>NaN</td>\n",
106
+ " <td>NaN</td>\n",
107
+ " <td>NaN</td>\n",
108
+ " <td>NaN</td>\n",
109
+ " <td>NaN</td>\n",
110
+ " <td>NaN</td>\n",
111
+ " <td>NaN</td>\n",
112
+ " <td>NaN</td>\n",
113
+ " <td>NaN</td>\n",
114
+ " </tr>\n",
115
+ " <tr>\n",
116
+ " <th>1</th>\n",
117
+ " <td>2</td>\n",
118
+ " <td>NaN</td>\n",
119
+ " <td>20777</td>\n",
120
+ " <td>NaN</td>\n",
121
+ " <td>NaN</td>\n",
122
+ " <td>0.sheffield.ps.nn.ikiam.batch1.csv</td>\n",
123
+ " <td>https://zenodo.org/record/4288311</td>\n",
124
+ " <td>NaN</td>\n",
125
+ " <td>NaN</td>\n",
126
+ " <td>NaN</td>\n",
127
+ " <td>...</td>\n",
128
+ " <td>NaN</td>\n",
129
+ " <td>NaN</td>\n",
130
+ " <td>NaN</td>\n",
131
+ " <td>NaN</td>\n",
132
+ " <td>NaN</td>\n",
133
+ " <td>NaN</td>\n",
134
+ " <td>NaN</td>\n",
135
+ " <td>NaN</td>\n",
136
+ " <td>NaN</td>\n",
137
+ " <td>NaN</td>\n",
138
+ " </tr>\n",
139
+ " <tr>\n",
140
+ " <th>2</th>\n",
141
+ " <td>3</td>\n",
142
+ " <td>NaN</td>\n",
143
+ " <td>20778</td>\n",
144
+ " <td>NaN</td>\n",
145
+ " <td>NaN</td>\n",
146
+ " <td>0.sheffield.ps.nn.ikiam.batch1.csv</td>\n",
147
+ " <td>https://zenodo.org/record/4288311</td>\n",
148
+ " <td>NaN</td>\n",
149
+ " <td>NaN</td>\n",
150
+ " <td>NaN</td>\n",
151
+ " <td>...</td>\n",
152
+ " <td>NaN</td>\n",
153
+ " <td>NaN</td>\n",
154
+ " <td>NaN</td>\n",
155
+ " <td>NaN</td>\n",
156
+ " <td>NaN</td>\n",
157
+ " <td>NaN</td>\n",
158
+ " <td>NaN</td>\n",
159
+ " <td>NaN</td>\n",
160
+ " <td>NaN</td>\n",
161
+ " <td>NaN</td>\n",
162
+ " </tr>\n",
163
+ " <tr>\n",
164
+ " <th>3</th>\n",
165
+ " <td>4</td>\n",
166
+ " <td>NaN</td>\n",
167
+ " <td>20779</td>\n",
168
+ " <td>NaN</td>\n",
169
+ " <td>NaN</td>\n",
170
+ " <td>0.sheffield.ps.nn.ikiam.batch1.csv</td>\n",
171
+ " <td>https://zenodo.org/record/4288311</td>\n",
172
+ " <td>NaN</td>\n",
173
+ " <td>NaN</td>\n",
174
+ " <td>NaN</td>\n",
175
+ " <td>...</td>\n",
176
+ " <td>NaN</td>\n",
177
+ " <td>NaN</td>\n",
178
+ " <td>NaN</td>\n",
179
+ " <td>NaN</td>\n",
180
+ " <td>NaN</td>\n",
181
+ " <td>NaN</td>\n",
182
+ " <td>NaN</td>\n",
183
+ " <td>NaN</td>\n",
184
+ " <td>NaN</td>\n",
185
+ " <td>NaN</td>\n",
186
+ " </tr>\n",
187
+ " <tr>\n",
188
+ " <th>4</th>\n",
189
+ " <td>5</td>\n",
190
+ " <td>NaN</td>\n",
191
+ " <td>20780</td>\n",
192
+ " <td>NaN</td>\n",
193
+ " <td>NaN</td>\n",
194
+ " <td>0.sheffield.ps.nn.ikiam.batch1.csv</td>\n",
195
+ " <td>https://zenodo.org/record/4288311</td>\n",
196
+ " <td>NaN</td>\n",
197
+ " <td>NaN</td>\n",
198
+ " <td>NaN</td>\n",
199
+ " <td>...</td>\n",
200
+ " <td>NaN</td>\n",
201
+ " <td>NaN</td>\n",
202
+ " <td>NaN</td>\n",
203
+ " <td>NaN</td>\n",
204
+ " <td>NaN</td>\n",
205
+ " <td>NaN</td>\n",
206
+ " <td>NaN</td>\n",
207
+ " <td>NaN</td>\n",
208
+ " <td>NaN</td>\n",
209
+ " <td>NaN</td>\n",
210
+ " </tr>\n",
211
+ " </tbody>\n",
212
+ "</table>\n",
213
+ "<p>5 rows × 25 columns</p>\n",
214
+ "</div>"
215
+ ],
216
+ "text/plain": [
217
+ " Unnamed: 0 CAMID X Image_name Side \\\n",
218
+ "0 1 NaN 20776 NaN NaN \n",
219
+ "1 2 NaN 20777 NaN NaN \n",
220
+ "2 3 NaN 20778 NaN NaN \n",
221
+ "3 4 NaN 20779 NaN NaN \n",
222
+ "4 5 NaN 20780 NaN NaN \n",
223
+ "\n",
224
+ " zenodo_name zenodo_link \\\n",
225
+ "0 0.sheffield.ps.nn.ikiam.batch1.csv https://zenodo.org/record/4288311 \n",
226
+ "1 0.sheffield.ps.nn.ikiam.batch1.csv https://zenodo.org/record/4288311 \n",
227
+ "2 0.sheffield.ps.nn.ikiam.batch1.csv https://zenodo.org/record/4288311 \n",
228
+ "3 0.sheffield.ps.nn.ikiam.batch1.csv https://zenodo.org/record/4288311 \n",
229
+ "4 0.sheffield.ps.nn.ikiam.batch1.csv https://zenodo.org/record/4288311 \n",
230
+ "\n",
231
+ " Sequence Taxonomic.Name Locality ... Dataset Store Eclosion.Date Brood \\\n",
232
+ "0 NaN NaN NaN ... NaN NaN NaN NaN \n",
233
+ "1 NaN NaN NaN ... NaN NaN NaN NaN \n",
234
+ "2 NaN NaN NaN ... NaN NaN NaN NaN \n",
235
+ "3 NaN NaN NaN ... NaN NaN NaN NaN \n",
236
+ "4 NaN NaN NaN ... NaN NaN NaN NaN \n",
237
+ "\n",
238
+ " Death.Date Cross.Type Stage Sex Unit.Type Verbatim.Coordinates \n",
239
+ "0 NaN NaN NaN NaN NaN NaN \n",
240
+ "1 NaN NaN NaN NaN NaN NaN \n",
241
+ "2 NaN NaN NaN NaN NaN NaN \n",
242
+ "3 NaN NaN NaN NaN NaN NaN \n",
243
+ "4 NaN NaN NaN NaN NaN NaN \n",
244
+ "\n",
245
+ "[5 rows x 25 columns]"
246
+ ]
247
+ },
248
+ "execution_count": 4,
249
+ "metadata": {},
250
+ "output_type": "execute_result"
251
+ }
252
+ ],
253
+ "source": [
254
+ "jiggins.head()"
255
+ ]
256
+ },
257
+ {
258
+ "cell_type": "code",
259
+ "execution_count": 5,
260
+ "metadata": {},
261
+ "outputs": [
262
+ {
263
+ "data": {
264
+ "text/plain": [
265
+ "Index(['Unnamed: 0', 'CAMID', 'X', 'Image_name', 'Side', 'zenodo_name',\n",
266
+ " 'zenodo_link', 'Sequence', 'Taxonomic.Name', 'Locality',\n",
267
+ " 'Sample.accession', 'Collected.by', 'Other.Id', 'Collected.By', 'Date',\n",
268
+ " 'Dataset', 'Store', 'Eclosion.Date', 'Brood', 'Death.Date',\n",
269
+ " 'Cross.Type', 'Stage', 'Sex', 'Unit.Type', 'Verbatim.Coordinates'],\n",
270
+ " dtype='object')"
271
+ ]
272
+ },
273
+ "execution_count": 5,
274
+ "metadata": {},
275
+ "output_type": "execute_result"
276
+ }
277
+ ],
278
+ "source": [
279
+ "jiggins.columns"
280
+ ]
281
+ },
282
+ {
283
+ "cell_type": "code",
284
+ "execution_count": 6,
285
+ "metadata": {},
286
+ "outputs": [
287
+ {
288
+ "data": {
289
+ "text/plain": [
290
+ "411"
291
+ ]
292
+ },
293
+ "execution_count": 6,
294
+ "metadata": {},
295
+ "output_type": "execute_result"
296
+ }
297
+ ],
298
+ "source": [
299
+ "jiggins.Image_name.isna().sum()"
300
+ ]
301
+ },
302
+ {
303
+ "cell_type": "code",
304
+ "execution_count": 7,
305
+ "metadata": {},
306
+ "outputs": [
307
+ {
308
+ "data": {
309
+ "text/plain": [
310
+ "28585 CAM036108_v.JPG\n",
311
+ "45469 CAM044420_v.CR2\n",
312
+ "16097 CAM011543_v.CR2\n",
313
+ "22992 CAM017525_v.JPG\n",
314
+ "6601 CAM000930_v.JPG\n",
315
+ "39261 CAM043354_v.CR2\n",
316
+ "2577 19N2059_d.CR2\n",
317
+ "21344 CAM017153_d.JPG\n",
318
+ "48669 CS004036_d.JPG\n",
319
+ "19706 CAM016699_v.JPG\n",
320
+ "12020 CAM009527_v.JPG\n",
321
+ "47898 CS000628_d.JPG\n",
322
+ "7592 CAM001394_d.JPG\n",
323
+ "43523 CAM044173_v.CR2\n",
324
+ "12596 CAM010226_v.JPG\n",
325
+ "33816 CAM041028_v.JPG\n",
326
+ "23148 CAM017547_v_whitestandard.JPG\n",
327
+ "44996 CAM044362_hwv.CR2\n",
328
+ "3460 19N2605_v.JPG\n",
329
+ "24164 CAM017738_d_whitestandard.CR2\n",
330
+ "Name: Image_name, dtype: object"
331
+ ]
332
+ },
333
+ "execution_count": 7,
334
+ "metadata": {},
335
+ "output_type": "execute_result"
336
+ }
337
+ ],
338
+ "source": [
339
+ "jiggins.Image_name.sample(20)"
340
+ ]
341
+ },
342
+ {
343
+ "cell_type": "code",
344
+ "execution_count": 8,
345
+ "metadata": {},
346
+ "outputs": [
347
+ {
348
+ "data": {
349
+ "text/html": [
350
+ "<div>\n",
351
+ "<style scoped>\n",
352
+ " .dataframe tbody tr th:only-of-type {\n",
353
+ " vertical-align: middle;\n",
354
+ " }\n",
355
+ "\n",
356
+ " .dataframe tbody tr th {\n",
357
+ " vertical-align: top;\n",
358
+ " }\n",
359
+ "\n",
360
+ " .dataframe thead th {\n",
361
+ " text-align: right;\n",
362
+ " }\n",
363
+ "</style>\n",
364
+ "<table border=\"1\" class=\"dataframe\">\n",
365
+ " <thead>\n",
366
+ " <tr style=\"text-align: right;\">\n",
367
+ " <th></th>\n",
368
+ " <th>CAMID</th>\n",
369
+ " <th>X</th>\n",
370
+ " <th>Image_name</th>\n",
371
+ " <th>zenodo_name</th>\n",
372
+ " <th>zenodo_link</th>\n",
373
+ " </tr>\n",
374
+ " </thead>\n",
375
+ " <tbody>\n",
376
+ " <tr>\n",
377
+ " <th>22895</th>\n",
378
+ " <td>CAM017512</td>\n",
379
+ " <td>5226</td>\n",
380
+ " <td>CAM017512_d.JPG</td>\n",
381
+ " <td>CAM.coll.images.batch1_v2.csv</td>\n",
382
+ " <td>https://zenodo.org/record/3082688</td>\n",
383
+ " </tr>\n",
384
+ " <tr>\n",
385
+ " <th>36246</th>\n",
386
+ " <td>CAM041681</td>\n",
387
+ " <td>39690</td>\n",
388
+ " <td>CAM041681_d.CR2</td>\n",
389
+ " <td>0.gmk.broods.all.csv</td>\n",
390
+ " <td>https://zenodo.org/record/4291095</td>\n",
391
+ " </tr>\n",
392
+ " <tr>\n",
393
+ " <th>38630</th>\n",
394
+ " <td>CAM043178</td>\n",
395
+ " <td>29793</td>\n",
396
+ " <td>CAM043178_fwv.CR2</td>\n",
397
+ " <td>batch1.Peru.image.names.Zenodo.csv</td>\n",
398
+ " <td>https://zenodo.org/record/3569598</td>\n",
399
+ " </tr>\n",
400
+ " <tr>\n",
401
+ " <th>45984</th>\n",
402
+ " <td>CAM044484</td>\n",
403
+ " <td>34635</td>\n",
404
+ " <td>CAM044484_hwd.CR2</td>\n",
405
+ " <td>batch2.Peru.image.names.Zenodo.csv</td>\n",
406
+ " <td>https://zenodo.org/record/4287444</td>\n",
407
+ " </tr>\n",
408
+ " <tr>\n",
409
+ " <th>15393</th>\n",
410
+ " <td>CAM011382</td>\n",
411
+ " <td>28038</td>\n",
412
+ " <td>CAM011382_d.JPG</td>\n",
413
+ " <td>2001_2.broods.batch.2.csv</td>\n",
414
+ " <td>https://zenodo.org/record/2550097</td>\n",
415
+ " </tr>\n",
416
+ " <tr>\n",
417
+ " <th>44443</th>\n",
418
+ " <td>CAM044299</td>\n",
419
+ " <td>33864</td>\n",
420
+ " <td>CAM044299_d.JPG</td>\n",
421
+ " <td>batch2.Peru.image.names.Zenodo.csv</td>\n",
422
+ " <td>https://zenodo.org/record/4287444</td>\n",
423
+ " </tr>\n",
424
+ " <tr>\n",
425
+ " <th>7117</th>\n",
426
+ " <td>CAM001175</td>\n",
427
+ " <td>7908</td>\n",
428
+ " <td>CAM001175_d.JPG</td>\n",
429
+ " <td>CAM.coll.images.batch4.csv</td>\n",
430
+ " <td>https://zenodo.org/record/2682669</td>\n",
431
+ " </tr>\n",
432
+ " </tbody>\n",
433
+ "</table>\n",
434
+ "</div>"
435
+ ],
436
+ "text/plain": [
437
+ " CAMID X Image_name \\\n",
438
+ "22895 CAM017512 5226 CAM017512_d.JPG \n",
439
+ "36246 CAM041681 39690 CAM041681_d.CR2 \n",
440
+ "38630 CAM043178 29793 CAM043178_fwv.CR2 \n",
441
+ "45984 CAM044484 34635 CAM044484_hwd.CR2 \n",
442
+ "15393 CAM011382 28038 CAM011382_d.JPG \n",
443
+ "44443 CAM044299 33864 CAM044299_d.JPG \n",
444
+ "7117 CAM001175 7908 CAM001175_d.JPG \n",
445
+ "\n",
446
+ " zenodo_name zenodo_link \n",
447
+ "22895 CAM.coll.images.batch1_v2.csv https://zenodo.org/record/3082688 \n",
448
+ "36246 0.gmk.broods.all.csv https://zenodo.org/record/4291095 \n",
449
+ "38630 batch1.Peru.image.names.Zenodo.csv https://zenodo.org/record/3569598 \n",
450
+ "45984 batch2.Peru.image.names.Zenodo.csv https://zenodo.org/record/4287444 \n",
451
+ "15393 2001_2.broods.batch.2.csv https://zenodo.org/record/2550097 \n",
452
+ "44443 batch2.Peru.image.names.Zenodo.csv https://zenodo.org/record/4287444 \n",
453
+ "7117 CAM.coll.images.batch4.csv https://zenodo.org/record/2682669 "
454
+ ]
455
+ },
456
+ "execution_count": 8,
457
+ "metadata": {},
458
+ "output_type": "execute_result"
459
+ }
460
+ ],
461
+ "source": [
462
+ "jiggins_imgs = jiggins[['CAMID', 'X', 'Image_name', 'zenodo_name', 'zenodo_link']].dropna()\n",
463
+ "jiggins_imgs.sample(7)"
464
+ ]
465
+ },
466
+ {
467
+ "cell_type": "code",
468
+ "execution_count": 9,
469
+ "metadata": {},
470
+ "outputs": [
471
+ {
472
+ "data": {
473
+ "text/html": [
474
+ "<div>\n",
475
+ "<style scoped>\n",
476
+ " .dataframe tbody tr th:only-of-type {\n",
477
+ " vertical-align: middle;\n",
478
+ " }\n",
479
+ "\n",
480
+ " .dataframe tbody tr th {\n",
481
+ " vertical-align: top;\n",
482
+ " }\n",
483
+ "\n",
484
+ " .dataframe thead th {\n",
485
+ " text-align: right;\n",
486
+ " }\n",
487
+ "</style>\n",
488
+ "<table border=\"1\" class=\"dataframe\">\n",
489
+ " <thead>\n",
490
+ " <tr style=\"text-align: right;\">\n",
491
+ " <th></th>\n",
492
+ " <th>CAMID</th>\n",
493
+ " <th>X</th>\n",
494
+ " <th>Image_name</th>\n",
495
+ " <th>zenodo_name</th>\n",
496
+ " <th>zenodo_link</th>\n",
497
+ " </tr>\n",
498
+ " </thead>\n",
499
+ " <tbody>\n",
500
+ " <tr>\n",
501
+ " <th>10528</th>\n",
502
+ " <td>CAM008821</td>\n",
503
+ " <td>9887</td>\n",
504
+ " <td>CAM008821_d.JPG</td>\n",
505
+ " <td>CAM.coll.images.batch6.csv</td>\n",
506
+ " <td>https://zenodo.org/record/2686762</td>\n",
507
+ " </tr>\n",
508
+ " <tr>\n",
509
+ " <th>19587</th>\n",
510
+ " <td>CAM016660</td>\n",
511
+ " <td>3856</td>\n",
512
+ " <td>CAM016660_v.JPG</td>\n",
513
+ " <td>CAM.coll.images.batch1_v2.csv</td>\n",
514
+ " <td>https://zenodo.org/record/3082688</td>\n",
515
+ " </tr>\n",
516
+ " <tr>\n",
517
+ " <th>25858</th>\n",
518
+ " <td>CAM017989</td>\n",
519
+ " <td>17211</td>\n",
520
+ " <td>CAM017989_v_whitestandard.JPG</td>\n",
521
+ " <td>CAM.coll.patricio.batch1.csv</td>\n",
522
+ " <td>https://zenodo.org/record/1748277</td>\n",
523
+ " </tr>\n",
524
+ " <tr>\n",
525
+ " <th>10042</th>\n",
526
+ " <td>CAM008668</td>\n",
527
+ " <td>46436</td>\n",
528
+ " <td>CAM008668_d.JPG</td>\n",
529
+ " <td>occurences_and_multimedia.csv</td>\n",
530
+ " <td>https://zenodo.org/record/3477891</td>\n",
531
+ " </tr>\n",
532
+ " <tr>\n",
533
+ " <th>30646</th>\n",
534
+ " <td>CAM040217</td>\n",
535
+ " <td>47915</td>\n",
536
+ " <td>CAM040217_v.JPG</td>\n",
537
+ " <td>occurences_and_multimedia.csv</td>\n",
538
+ " <td>https://zenodo.org/record/3477891</td>\n",
539
+ " </tr>\n",
540
+ " <tr>\n",
541
+ " <th>42889</th>\n",
542
+ " <td>CAM044091</td>\n",
543
+ " <td>33084</td>\n",
544
+ " <td>CAM044091_fwd.JPG</td>\n",
545
+ " <td>batch2.Peru.image.names.Zenodo.csv</td>\n",
546
+ " <td>https://zenodo.org/record/4287444</td>\n",
547
+ " </tr>\n",
548
+ " <tr>\n",
549
+ " <th>39215</th>\n",
550
+ " <td>CAM043344</td>\n",
551
+ " <td>30372</td>\n",
552
+ " <td>CAM043344_fwd.JPG</td>\n",
553
+ " <td>batch1.Peru.image.names.Zenodo.csv</td>\n",
554
+ " <td>https://zenodo.org/record/3569598</td>\n",
555
+ " </tr>\n",
556
+ " </tbody>\n",
557
+ "</table>\n",
558
+ "</div>"
559
+ ],
560
+ "text/plain": [
561
+ " CAMID X Image_name \\\n",
562
+ "10528 CAM008821 9887 CAM008821_d.JPG \n",
563
+ "19587 CAM016660 3856 CAM016660_v.JPG \n",
564
+ "25858 CAM017989 17211 CAM017989_v_whitestandard.JPG \n",
565
+ "10042 CAM008668 46436 CAM008668_d.JPG \n",
566
+ "30646 CAM040217 47915 CAM040217_v.JPG \n",
567
+ "42889 CAM044091 33084 CAM044091_fwd.JPG \n",
568
+ "39215 CAM043344 30372 CAM043344_fwd.JPG \n",
569
+ "\n",
570
+ " zenodo_name zenodo_link \n",
571
+ "10528 CAM.coll.images.batch6.csv https://zenodo.org/record/2686762 \n",
572
+ "19587 CAM.coll.images.batch1_v2.csv https://zenodo.org/record/3082688 \n",
573
+ "25858 CAM.coll.patricio.batch1.csv https://zenodo.org/record/1748277 \n",
574
+ "10042 occurences_and_multimedia.csv https://zenodo.org/record/3477891 \n",
575
+ "30646 occurences_and_multimedia.csv https://zenodo.org/record/3477891 \n",
576
+ "42889 batch2.Peru.image.names.Zenodo.csv https://zenodo.org/record/4287444 \n",
577
+ "39215 batch1.Peru.image.names.Zenodo.csv https://zenodo.org/record/3569598 "
578
+ ]
579
+ },
580
+ "execution_count": 9,
581
+ "metadata": {},
582
+ "output_type": "execute_result"
583
+ }
584
+ ],
585
+ "source": [
586
+ "jiggins_imgs[jiggins_imgs.Image_name.str.contains('JPG')].sample(7)"
587
+ ]
588
+ },
589
+ {
590
+ "cell_type": "code",
591
+ "execution_count": 10,
592
+ "metadata": {},
593
+ "outputs": [
594
+ {
595
+ "data": {
596
+ "text/html": [
597
+ "<div>\n",
598
+ "<style scoped>\n",
599
+ " .dataframe tbody tr th:only-of-type {\n",
600
+ " vertical-align: middle;\n",
601
+ " }\n",
602
+ "\n",
603
+ " .dataframe tbody tr th {\n",
604
+ " vertical-align: top;\n",
605
+ " }\n",
606
+ "\n",
607
+ " .dataframe thead th {\n",
608
+ " text-align: right;\n",
609
+ " }\n",
610
+ "</style>\n",
611
+ "<table border=\"1\" class=\"dataframe\">\n",
612
+ " <thead>\n",
613
+ " <tr style=\"text-align: right;\">\n",
614
+ " <th></th>\n",
615
+ " <th>CAMID</th>\n",
616
+ " <th>X</th>\n",
617
+ " <th>Image_name</th>\n",
618
+ " <th>zenodo_name</th>\n",
619
+ " <th>zenodo_link</th>\n",
620
+ " </tr>\n",
621
+ " </thead>\n",
622
+ " <tbody>\n",
623
+ " <tr>\n",
624
+ " <th>8296</th>\n",
625
+ " <td>CAM008147</td>\n",
626
+ " <td>44302</td>\n",
627
+ " <td>8147v.jpg</td>\n",
628
+ " <td>occurences_and_multimedia.csv</td>\n",
629
+ " <td>https://zenodo.org/record/3477891</td>\n",
630
+ " </tr>\n",
631
+ " <tr>\n",
632
+ " <th>15626</th>\n",
633
+ " <td>CAM011437</td>\n",
634
+ " <td>44275</td>\n",
635
+ " <td>11437v.jpg</td>\n",
636
+ " <td>occurences_and_multimedia.csv</td>\n",
637
+ " <td>https://zenodo.org/record/3477891</td>\n",
638
+ " </tr>\n",
639
+ " <tr>\n",
640
+ " <th>16975</th>\n",
641
+ " <td>CAM012169</td>\n",
642
+ " <td>25057</td>\n",
643
+ " <td>12169v.jpg</td>\n",
644
+ " <td>Heliconius_wing_old_photos_2001_2019_part1.csv</td>\n",
645
+ " <td>https://zenodo.org/record/2552371</td>\n",
646
+ " </tr>\n",
647
+ " <tr>\n",
648
+ " <th>14097</th>\n",
649
+ " <td>CAM010773</td>\n",
650
+ " <td>23942</td>\n",
651
+ " <td>10773v.jpg</td>\n",
652
+ " <td>Heliconius_wing_old_photos_2001_2019_part1.csv</td>\n",
653
+ " <td>https://zenodo.org/record/2552371</td>\n",
654
+ " </tr>\n",
655
+ " <tr>\n",
656
+ " <th>15970</th>\n",
657
+ " <td>CAM011513</td>\n",
658
+ " <td>24565</td>\n",
659
+ " <td>11513v.jpg</td>\n",
660
+ " <td>Heliconius_wing_old_photos_2001_2019_part1.csv</td>\n",
661
+ " <td>https://zenodo.org/record/2552371</td>\n",
662
+ " </tr>\n",
663
+ " <tr>\n",
664
+ " <th>13349</th>\n",
665
+ " <td>CAM010485</td>\n",
666
+ " <td>23640</td>\n",
667
+ " <td>10485d.jpg</td>\n",
668
+ " <td>Heliconius_wing_old_photos_2001_2019_part1.csv</td>\n",
669
+ " <td>https://zenodo.org/record/2552371</td>\n",
670
+ " </tr>\n",
671
+ " <tr>\n",
672
+ " <th>16919</th>\n",
673
+ " <td>CAM012124</td>\n",
674
+ " <td>25001</td>\n",
675
+ " <td>12124v.jpg</td>\n",
676
+ " <td>Heliconius_wing_old_photos_2001_2019_part1.csv</td>\n",
677
+ " <td>https://zenodo.org/record/2552371</td>\n",
678
+ " </tr>\n",
679
+ " </tbody>\n",
680
+ "</table>\n",
681
+ "</div>"
682
+ ],
683
+ "text/plain": [
684
+ " CAMID X Image_name \\\n",
685
+ "8296 CAM008147 44302 8147v.jpg \n",
686
+ "15626 CAM011437 44275 11437v.jpg \n",
687
+ "16975 CAM012169 25057 12169v.jpg \n",
688
+ "14097 CAM010773 23942 10773v.jpg \n",
689
+ "15970 CAM011513 24565 11513v.jpg \n",
690
+ "13349 CAM010485 23640 10485d.jpg \n",
691
+ "16919 CAM012124 25001 12124v.jpg \n",
692
+ "\n",
693
+ " zenodo_name \\\n",
694
+ "8296 occurences_and_multimedia.csv \n",
695
+ "15626 occurences_and_multimedia.csv \n",
696
+ "16975 Heliconius_wing_old_photos_2001_2019_part1.csv \n",
697
+ "14097 Heliconius_wing_old_photos_2001_2019_part1.csv \n",
698
+ "15970 Heliconius_wing_old_photos_2001_2019_part1.csv \n",
699
+ "13349 Heliconius_wing_old_photos_2001_2019_part1.csv \n",
700
+ "16919 Heliconius_wing_old_photos_2001_2019_part1.csv \n",
701
+ "\n",
702
+ " zenodo_link \n",
703
+ "8296 https://zenodo.org/record/3477891 \n",
704
+ "15626 https://zenodo.org/record/3477891 \n",
705
+ "16975 https://zenodo.org/record/2552371 \n",
706
+ "14097 https://zenodo.org/record/2552371 \n",
707
+ "15970 https://zenodo.org/record/2552371 \n",
708
+ "13349 https://zenodo.org/record/2552371 \n",
709
+ "16919 https://zenodo.org/record/2552371 "
710
+ ]
711
+ },
712
+ "execution_count": 10,
713
+ "metadata": {},
714
+ "output_type": "execute_result"
715
+ }
716
+ ],
717
+ "source": [
718
+ "jiggins_imgs[jiggins_imgs.Image_name.str.contains('jpg')].sample(7)"
719
+ ]
720
+ },
721
+ {
722
+ "cell_type": "code",
723
+ "execution_count": 11,
724
+ "metadata": {},
725
+ "outputs": [
726
+ {
727
+ "data": {
728
+ "text/html": [
729
+ "<div>\n",
730
+ "<style scoped>\n",
731
+ " .dataframe tbody tr th:only-of-type {\n",
732
+ " vertical-align: middle;\n",
733
+ " }\n",
734
+ "\n",
735
+ " .dataframe tbody tr th {\n",
736
+ " vertical-align: top;\n",
737
+ " }\n",
738
+ "\n",
739
+ " .dataframe thead th {\n",
740
+ " text-align: right;\n",
741
+ " }\n",
742
+ "</style>\n",
743
+ "<table border=\"1\" class=\"dataframe\">\n",
744
+ " <thead>\n",
745
+ " <tr style=\"text-align: right;\">\n",
746
+ " <th></th>\n",
747
+ " <th>CAMID</th>\n",
748
+ " <th>X</th>\n",
749
+ " <th>Image_name</th>\n",
750
+ " <th>zenodo_name</th>\n",
751
+ " <th>zenodo_link</th>\n",
752
+ " </tr>\n",
753
+ " </thead>\n",
754
+ " <tbody>\n",
755
+ " <tr>\n",
756
+ " <th>47693</th>\n",
757
+ " <td>CAM050052</td>\n",
758
+ " <td>26152</td>\n",
759
+ " <td>CAM050052_M1_10_Hmr_mut_D_cut.tif</td>\n",
760
+ " <td>Heliconius_wing_old_photos_2001_2019_part3.csv</td>\n",
761
+ " <td>https://zenodo.org/record/2553977</td>\n",
762
+ " </tr>\n",
763
+ " <tr>\n",
764
+ " <th>47694</th>\n",
765
+ " <td>CAM050063</td>\n",
766
+ " <td>26155</td>\n",
767
+ " <td>CAM050063_M7_17_Hmr_mut_V_IMG_8293_wb_cut.tif</td>\n",
768
+ " <td>Heliconius_wing_old_photos_2001_2019_part3.csv</td>\n",
769
+ " <td>https://zenodo.org/record/2553977</td>\n",
770
+ " </tr>\n",
771
+ " <tr>\n",
772
+ " <th>47712</th>\n",
773
+ " <td>CAM050147</td>\n",
774
+ " <td>26197</td>\n",
775
+ " <td>CAM050147_DS1_HW_IMG_8537_cut_3.tif</td>\n",
776
+ " <td>Heliconius_wing_old_photos_2001_2019_part3.csv</td>\n",
777
+ " <td>https://zenodo.org/record/2553977</td>\n",
778
+ " </tr>\n",
779
+ " <tr>\n",
780
+ " <th>47637</th>\n",
781
+ " <td>CAM050006</td>\n",
782
+ " <td>26126</td>\n",
783
+ " <td>CAM050006_S1_17_Hsar_mut_V_8296_wb_cut.tif</td>\n",
784
+ " <td>Heliconius_wing_old_photos_2001_2019_part3.csv</td>\n",
785
+ " <td>https://zenodo.org/record/2553977</td>\n",
786
+ " </tr>\n",
787
+ " <tr>\n",
788
+ " <th>47626</th>\n",
789
+ " <td>CAM050001</td>\n",
790
+ " <td>26118</td>\n",
791
+ " <td>CAM050001_S1_5_Hs_mut_D_wb_cut.tif</td>\n",
792
+ " <td>Heliconius_wing_old_photos_2001_2019_part3.csv</td>\n",
793
+ " <td>https://zenodo.org/record/2553977</td>\n",
794
+ " </tr>\n",
795
+ " <tr>\n",
796
+ " <th>47692</th>\n",
797
+ " <td>CAM050052</td>\n",
798
+ " <td>26153</td>\n",
799
+ " <td>CAM050052_M1_10_Hmr_mut_V_cut.tif</td>\n",
800
+ " <td>Heliconius_wing_old_photos_2001_2019_part3.csv</td>\n",
801
+ " <td>https://zenodo.org/record/2553977</td>\n",
802
+ " </tr>\n",
803
+ " <tr>\n",
804
+ " <th>47673</th>\n",
805
+ " <td>CAM050026</td>\n",
806
+ " <td>26147</td>\n",
807
+ " <td>CAM050026_S4_1_Hs_mut_V_IMG_8453_wb_cut.tif</td>\n",
808
+ " <td>Heliconius_wing_old_photos_2001_2019_part3.csv</td>\n",
809
+ " <td>https://zenodo.org/record/2553977</td>\n",
810
+ " </tr>\n",
811
+ " </tbody>\n",
812
+ "</table>\n",
813
+ "</div>"
814
+ ],
815
+ "text/plain": [
816
+ " CAMID X Image_name \\\n",
817
+ "47693 CAM050052 26152 CAM050052_M1_10_Hmr_mut_D_cut.tif \n",
818
+ "47694 CAM050063 26155 CAM050063_M7_17_Hmr_mut_V_IMG_8293_wb_cut.tif \n",
819
+ "47712 CAM050147 26197 CAM050147_DS1_HW_IMG_8537_cut_3.tif \n",
820
+ "47637 CAM050006 26126 CAM050006_S1_17_Hsar_mut_V_8296_wb_cut.tif \n",
821
+ "47626 CAM050001 26118 CAM050001_S1_5_Hs_mut_D_wb_cut.tif \n",
822
+ "47692 CAM050052 26153 CAM050052_M1_10_Hmr_mut_V_cut.tif \n",
823
+ "47673 CAM050026 26147 CAM050026_S4_1_Hs_mut_V_IMG_8453_wb_cut.tif \n",
824
+ "\n",
825
+ " zenodo_name \\\n",
826
+ "47693 Heliconius_wing_old_photos_2001_2019_part3.csv \n",
827
+ "47694 Heliconius_wing_old_photos_2001_2019_part3.csv \n",
828
+ "47712 Heliconius_wing_old_photos_2001_2019_part3.csv \n",
829
+ "47637 Heliconius_wing_old_photos_2001_2019_part3.csv \n",
830
+ "47626 Heliconius_wing_old_photos_2001_2019_part3.csv \n",
831
+ "47692 Heliconius_wing_old_photos_2001_2019_part3.csv \n",
832
+ "47673 Heliconius_wing_old_photos_2001_2019_part3.csv \n",
833
+ "\n",
834
+ " zenodo_link \n",
835
+ "47693 https://zenodo.org/record/2553977 \n",
836
+ "47694 https://zenodo.org/record/2553977 \n",
837
+ "47712 https://zenodo.org/record/2553977 \n",
838
+ "47637 https://zenodo.org/record/2553977 \n",
839
+ "47626 https://zenodo.org/record/2553977 \n",
840
+ "47692 https://zenodo.org/record/2553977 \n",
841
+ "47673 https://zenodo.org/record/2553977 "
842
+ ]
843
+ },
844
+ "execution_count": 11,
845
+ "metadata": {},
846
+ "output_type": "execute_result"
847
+ }
848
+ ],
849
+ "source": [
850
+ "jiggins_imgs[jiggins_imgs.Image_name.str.contains('tif')].sample(7)"
851
+ ]
852
+ },
853
+ {
854
+ "cell_type": "code",
855
+ "execution_count": 12,
856
+ "metadata": {},
857
+ "outputs": [
858
+ {
859
+ "data": {
860
+ "text/html": [
861
+ "<div>\n",
862
+ "<style scoped>\n",
863
+ " .dataframe tbody tr th:only-of-type {\n",
864
+ " vertical-align: middle;\n",
865
+ " }\n",
866
+ "\n",
867
+ " .dataframe tbody tr th {\n",
868
+ " vertical-align: top;\n",
869
+ " }\n",
870
+ "\n",
871
+ " .dataframe thead th {\n",
872
+ " text-align: right;\n",
873
+ " }\n",
874
+ "</style>\n",
875
+ "<table border=\"1\" class=\"dataframe\">\n",
876
+ " <thead>\n",
877
+ " <tr style=\"text-align: right;\">\n",
878
+ " <th></th>\n",
879
+ " <th>CAMID</th>\n",
880
+ " <th>X</th>\n",
881
+ " <th>Image_name</th>\n",
882
+ " <th>zenodo_name</th>\n",
883
+ " <th>zenodo_link</th>\n",
884
+ " </tr>\n",
885
+ " </thead>\n",
886
+ " <tbody>\n",
887
+ " <tr>\n",
888
+ " <th>42543</th>\n",
889
+ " <td>CAM044049</td>\n",
890
+ " <td>32915</td>\n",
891
+ " <td>CAM044049_d.CR2</td>\n",
892
+ " <td>batch2.Peru.image.names.Zenodo.csv</td>\n",
893
+ " <td>https://zenodo.org/record/4287444</td>\n",
894
+ " </tr>\n",
895
+ " <tr>\n",
896
+ " <th>44160</th>\n",
897
+ " <td>CAM044261</td>\n",
898
+ " <td>36392</td>\n",
899
+ " <td>CAM044261_d.JPG</td>\n",
900
+ " <td>batch3.Peru.image.names.Zenodo.csv</td>\n",
901
+ " <td>https://zenodo.org/record/4288250</td>\n",
902
+ " </tr>\n",
903
+ " <tr>\n",
904
+ " <th>14298</th>\n",
905
+ " <td>CAM010848</td>\n",
906
+ " <td>27458</td>\n",
907
+ " <td>CAM010848_d.JPG</td>\n",
908
+ " <td>2001_2.broods.batch.1.csv</td>\n",
909
+ " <td>https://zenodo.org/record/2549524</td>\n",
910
+ " </tr>\n",
911
+ " <tr>\n",
912
+ " <th>19141</th>\n",
913
+ " <td>CAM016524</td>\n",
914
+ " <td>759</td>\n",
915
+ " <td>CAM016524_d.JPG</td>\n",
916
+ " <td>CAM.coll.images.batch1.csv</td>\n",
917
+ " <td>https://zenodo.org/record/1247307</td>\n",
918
+ " </tr>\n",
919
+ " <tr>\n",
920
+ " <th>3229</th>\n",
921
+ " <td>19N2383</td>\n",
922
+ " <td>22175</td>\n",
923
+ " <td>19N2383_d.JPG</td>\n",
924
+ " <td>0.sheffield.ps.nn.ikiam.batch2.csv</td>\n",
925
+ " <td>https://zenodo.org/record/4288311</td>\n",
926
+ " </tr>\n",
927
+ " <tr>\n",
928
+ " <th>34948</th>\n",
929
+ " <td>CAM041352</td>\n",
930
+ " <td>14340</td>\n",
931
+ " <td>CAM041352_d.JPG</td>\n",
932
+ " <td>CAM.coll.images.batch9.csv</td>\n",
933
+ " <td>https://zenodo.org/record/2714333</td>\n",
934
+ " </tr>\n",
935
+ " <tr>\n",
936
+ " <th>28072</th>\n",
937
+ " <td>CAM021080</td>\n",
938
+ " <td>11587</td>\n",
939
+ " <td>CAM021080_d.JPG</td>\n",
940
+ " <td>CAM.coll.images.batch7.csv</td>\n",
941
+ " <td>https://zenodo.org/record/2702457</td>\n",
942
+ " </tr>\n",
943
+ " </tbody>\n",
944
+ "</table>\n",
945
+ "</div>"
946
+ ],
947
+ "text/plain": [
948
+ " CAMID X Image_name zenodo_name \\\n",
949
+ "42543 CAM044049 32915 CAM044049_d.CR2 batch2.Peru.image.names.Zenodo.csv \n",
950
+ "44160 CAM044261 36392 CAM044261_d.JPG batch3.Peru.image.names.Zenodo.csv \n",
951
+ "14298 CAM010848 27458 CAM010848_d.JPG 2001_2.broods.batch.1.csv \n",
952
+ "19141 CAM016524 759 CAM016524_d.JPG CAM.coll.images.batch1.csv \n",
953
+ "3229 19N2383 22175 19N2383_d.JPG 0.sheffield.ps.nn.ikiam.batch2.csv \n",
954
+ "34948 CAM041352 14340 CAM041352_d.JPG CAM.coll.images.batch9.csv \n",
955
+ "28072 CAM021080 11587 CAM021080_d.JPG CAM.coll.images.batch7.csv \n",
956
+ "\n",
957
+ " zenodo_link \n",
958
+ "42543 https://zenodo.org/record/4287444 \n",
959
+ "44160 https://zenodo.org/record/4288250 \n",
960
+ "14298 https://zenodo.org/record/2549524 \n",
961
+ "19141 https://zenodo.org/record/1247307 \n",
962
+ "3229 https://zenodo.org/record/4288311 \n",
963
+ "34948 https://zenodo.org/record/2714333 \n",
964
+ "28072 https://zenodo.org/record/2702457 "
965
+ ]
966
+ },
967
+ "execution_count": 12,
968
+ "metadata": {},
969
+ "output_type": "execute_result"
970
+ }
971
+ ],
972
+ "source": [
973
+ "jiggins_imgs[jiggins_imgs.Image_name.str.contains('d.')].sample(7)"
974
+ ]
975
+ },
976
+ {
977
+ "cell_type": "code",
978
+ "execution_count": 13,
979
+ "metadata": {},
980
+ "outputs": [
981
+ {
982
+ "name": "stdout",
983
+ "output_type": "stream",
984
+ "text": [
985
+ "{'JPG', 'CR2', 'tif', 'jpeg', 'JPG(1)', 'jpg'}\n"
986
+ ]
987
+ }
988
+ ],
989
+ "source": [
990
+ "check_filetypes = []\n",
991
+ "for img_name in list(jiggins_imgs.Image_name.unique()):\n",
992
+ " check_filetypes.append(img_name.split(\".\")[1])\n",
993
+ "\n",
994
+ "print(set(check_filetypes))"
995
+ ]
996
+ },
997
+ {
998
+ "cell_type": "code",
999
+ "execution_count": 14,
1000
+ "metadata": {},
1001
+ "outputs": [],
1002
+ "source": [
1003
+ "# Note CR2 is raw, may be duplicates, would need conversion\n",
1004
+ "file_types = [\"JPG\", \"jpg\", \"jpeg\", \"tif\", \"JPG(1)\", \"CR2\"]"
1005
+ ]
1006
+ },
1007
+ {
1008
+ "cell_type": "code",
1009
+ "execution_count": 15,
1010
+ "metadata": {},
1011
+ "outputs": [
1012
+ {
1013
+ "data": {
1014
+ "text/plain": [
1015
+ "37821"
1016
+ ]
1017
+ },
1018
+ "execution_count": 15,
1019
+ "metadata": {},
1020
+ "output_type": "execute_result"
1021
+ }
1022
+ ],
1023
+ "source": [
1024
+ "images = []\n",
1025
+ "\n",
1026
+ "for img_name in list(jiggins_imgs.Image_name.unique()):\n",
1027
+ " if img_name.split(\".\")[1] in file_types:\n",
1028
+ " images.append(img_name)\n",
1029
+ "\n",
1030
+ "len(images)"
1031
+ ]
1032
+ },
1033
+ {
1034
+ "cell_type": "code",
1035
+ "execution_count": 16,
1036
+ "metadata": {},
1037
+ "outputs": [
1038
+ {
1039
+ "name": "stdout",
1040
+ "output_type": "stream",
1041
+ "text": [
1042
+ "<class 'pandas.core.frame.DataFrame'>\n",
1043
+ "Index: 49359 entries, 433 to 49791\n",
1044
+ "Data columns (total 5 columns):\n",
1045
+ " # Column Non-Null Count Dtype \n",
1046
+ "--- ------ -------------- ----- \n",
1047
+ " 0 CAMID 49359 non-null object\n",
1048
+ " 1 X 49359 non-null int64 \n",
1049
+ " 2 Image_name 49359 non-null object\n",
1050
+ " 3 zenodo_name 49359 non-null object\n",
1051
+ " 4 zenodo_link 49359 non-null object\n",
1052
+ "dtypes: int64(1), object(4)\n",
1053
+ "memory usage: 2.3+ MB\n"
1054
+ ]
1055
+ }
1056
+ ],
1057
+ "source": [
1058
+ "img = jiggins_imgs[jiggins_imgs.Image_name.isin(images)]\n",
1059
+ "img.info()"
1060
+ ]
1061
+ },
1062
+ {
1063
+ "cell_type": "code",
1064
+ "execution_count": 17,
1065
+ "metadata": {},
1066
+ "outputs": [],
1067
+ "source": [
1068
+ "def get_file_type(filename):\n",
1069
+ " jpgs = [\"JPG\", \"jpg\", \"jpeg\", \"JPG(1)\"]\n",
1070
+ " file_type = filename.split(\".\")[1]\n",
1071
+ " if file_type in jpgs:\n",
1072
+ " return \"jpg\"\n",
1073
+ " elif file_type == \"tif\":\n",
1074
+ " return \"tif\"\n",
1075
+ " elif file_type == \"CR2\":\n",
1076
+ " return \"raw\"\n",
1077
+ " else:\n",
1078
+ " print(f\"{file_type} does not match known file types\")\n",
1079
+ " return None"
1080
+ ]
1081
+ },
1082
+ {
1083
+ "cell_type": "code",
1084
+ "execution_count": 18,
1085
+ "metadata": {},
1086
+ "outputs": [
1087
+ {
1088
+ "name": "stdout",
1089
+ "output_type": "stream",
1090
+ "text": [
1091
+ "<class 'pandas.core.frame.DataFrame'>\n",
1092
+ "Index: 49359 entries, 433 to 49791\n",
1093
+ "Data columns (total 6 columns):\n",
1094
+ " # Column Non-Null Count Dtype \n",
1095
+ "--- ------ -------------- ----- \n",
1096
+ " 0 CAMID 49359 non-null object\n",
1097
+ " 1 X 49359 non-null int64 \n",
1098
+ " 2 Image_name 49359 non-null object\n",
1099
+ " 3 zenodo_name 49359 non-null object\n",
1100
+ " 4 zenodo_link 49359 non-null object\n",
1101
+ " 5 file_type 49359 non-null object\n",
1102
+ "dtypes: int64(1), object(5)\n",
1103
+ "memory usage: 2.6+ MB\n"
1104
+ ]
1105
+ }
1106
+ ],
1107
+ "source": [
1108
+ "img[\"file_type\"] = img[\"Image_name\"].apply(get_file_type)\n",
1109
+ "img.info()"
1110
+ ]
1111
+ },
1112
+ {
1113
+ "cell_type": "code",
1114
+ "execution_count": 20,
1115
+ "metadata": {},
1116
+ "outputs": [],
1117
+ "source": [
1118
+ "img.to_csv(\"../zendo_img_master.csv\", index = False)"
1119
+ ]
1120
+ },
1121
+ {
1122
+ "cell_type": "code",
1123
+ "execution_count": 21,
1124
+ "metadata": {},
1125
+ "outputs": [
1126
+ {
1127
+ "name": "stdout",
1128
+ "output_type": "stream",
1129
+ "text": [
1130
+ "Unnamed: 0 49956\n",
1131
+ "CAMID 12586\n",
1132
+ "X 49956\n",
1133
+ "Image_name 37843\n",
1134
+ "dtype: int64\n",
1135
+ "\n",
1136
+ "CAMID 12586\n",
1137
+ "X 49359\n",
1138
+ "Image_name 37821\n",
1139
+ "zenodo_name 36\n",
1140
+ "dtype: int64\n"
1141
+ ]
1142
+ }
1143
+ ],
1144
+ "source": [
1145
+ "print(jiggins[list(jiggins.columns)[:4]].nunique())\n",
1146
+ "print()\n",
1147
+ "print(img[list(img.columns[:4])].nunique())"
1148
+ ]
1149
+ },
1150
+ {
1151
+ "cell_type": "code",
1152
+ "execution_count": 22,
1153
+ "metadata": {},
1154
+ "outputs": [
1155
+ {
1156
+ "name": "stdout",
1157
+ "output_type": "stream",
1158
+ "text": [
1159
+ "<class 'pandas.core.frame.DataFrame'>\n",
1160
+ "RangeIndex: 49956 entries, 0 to 49955\n",
1161
+ "Data columns (total 4 columns):\n",
1162
+ " # Column Non-Null Count Dtype \n",
1163
+ "--- ------ -------------- ----- \n",
1164
+ " 0 Unnamed: 0 49956 non-null int64 \n",
1165
+ " 1 CAMID 49359 non-null object\n",
1166
+ " 2 X 49956 non-null int64 \n",
1167
+ " 3 Image_name 49545 non-null object\n",
1168
+ "dtypes: int64(2), object(2)\n",
1169
+ "memory usage: 1.5+ MB\n",
1170
+ "None\n",
1171
+ "\n",
1172
+ "<class 'pandas.core.frame.DataFrame'>\n",
1173
+ "Index: 49359 entries, 433 to 49791\n",
1174
+ "Data columns (total 4 columns):\n",
1175
+ " # Column Non-Null Count Dtype \n",
1176
+ "--- ------ -------------- ----- \n",
1177
+ " 0 CAMID 49359 non-null object\n",
1178
+ " 1 X 49359 non-null int64 \n",
1179
+ " 2 Image_name 49359 non-null object\n",
1180
+ " 3 zenodo_name 49359 non-null object\n",
1181
+ "dtypes: int64(1), object(3)\n",
1182
+ "memory usage: 1.9+ MB\n",
1183
+ "None\n"
1184
+ ]
1185
+ }
1186
+ ],
1187
+ "source": [
1188
+ "print(jiggins[list(jiggins.columns)[:4]].info())\n",
1189
+ "print()\n",
1190
+ "print(img[list(img.columns[:4])].info())"
1191
+ ]
1192
+ },
1193
+ {
1194
+ "cell_type": "markdown",
1195
+ "metadata": {},
1196
+ "source": [
1197
+ "We want to match these up on `X`, since all entries have a value and it is unique."
1198
+ ]
1199
+ },
1200
+ {
1201
+ "cell_type": "code",
1202
+ "execution_count": 23,
1203
+ "metadata": {},
1204
+ "outputs": [
1205
+ {
1206
+ "name": "stdout",
1207
+ "output_type": "stream",
1208
+ "text": [
1209
+ "<class 'pandas.core.frame.DataFrame'>\n",
1210
+ "Index: 49359 entries, 433 to 49791\n",
1211
+ "Data columns (total 25 columns):\n",
1212
+ " # Column Non-Null Count Dtype \n",
1213
+ "--- ------ -------------- ----- \n",
1214
+ " 0 Unnamed: 0 49359 non-null int64 \n",
1215
+ " 1 CAMID 49359 non-null object \n",
1216
+ " 2 X 49359 non-null int64 \n",
1217
+ " 3 Image_name 49359 non-null object \n",
1218
+ " 4 Side 48288 non-null object \n",
1219
+ " 5 zenodo_name 49359 non-null object \n",
1220
+ " 6 zenodo_link 49359 non-null object \n",
1221
+ " 7 Sequence 48424 non-null object \n",
1222
+ " 8 Taxonomic.Name 45473 non-null object \n",
1223
+ " 9 Locality 34015 non-null object \n",
1224
+ " 10 Sample.accession 5884 non-null object \n",
1225
+ " 11 Collected.by 5280 non-null object \n",
1226
+ " 12 Other.Id 14382 non-null object \n",
1227
+ " 13 Collected.By 0 non-null float64\n",
1228
+ " 14 Date 33718 non-null object \n",
1229
+ " 15 Dataset 40405 non-null object \n",
1230
+ " 16 Store 39485 non-null object \n",
1231
+ " 17 Eclosion.Date 97 non-null object \n",
1232
+ " 18 Brood 14942 non-null object \n",
1233
+ " 19 Death.Date 318 non-null object \n",
1234
+ " 20 Cross.Type 5133 non-null object \n",
1235
+ " 21 Stage 15 non-null object \n",
1236
+ " 22 Sex 36243 non-null object \n",
1237
+ " 23 Unit.Type 33890 non-null object \n",
1238
+ " 24 Verbatim.Coordinates 0 non-null float64\n",
1239
+ "dtypes: float64(2), int64(2), object(21)\n",
1240
+ "memory usage: 9.8+ MB\n"
1241
+ ]
1242
+ }
1243
+ ],
1244
+ "source": [
1245
+ "df_img = jiggins.loc[jiggins.X.isin(list(img.X))]\n",
1246
+ "df_img.info()"
1247
+ ]
1248
+ },
1249
+ {
1250
+ "cell_type": "markdown",
1251
+ "metadata": {},
1252
+ "source": [
1253
+ "Rename columns to have underscore"
1254
+ ]
1255
+ },
1256
+ {
1257
+ "cell_type": "code",
1258
+ "execution_count": 24,
1259
+ "metadata": {},
1260
+ "outputs": [
1261
+ {
1262
+ "name": "stderr",
1263
+ "output_type": "stream",
1264
+ "text": [
1265
+ "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_66533/3055364590.py:1: SettingWithCopyWarning: \n",
1266
+ "A value is trying to be set on a copy of a slice from a DataFrame\n",
1267
+ "\n",
1268
+ "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
1269
+ " df_img.rename(columns = {\"Side\": \"View\",\n"
1270
+ ]
1271
+ }
1272
+ ],
1273
+ "source": [
1274
+ "df_img.rename(columns = {\"Side\": \"View\",\n",
1275
+ " \"Taxonomic.Name\": \"Taxonomic_Name\",\n",
1276
+ " \"Cross.Type\": \"Cross_Type\",\n",
1277
+ " \"Sample.accession\": \"Sample_accession\",\n",
1278
+ " \"Collected.by\": \"Collected_by\",\n",
1279
+ " \"Other.Id\": \"Other_ID\",\n",
1280
+ " \"Death.Date\": \"Death_Date\",\n",
1281
+ " \"Unit.Type\": \"Unit_Type\"},\n",
1282
+ " inplace = True)"
1283
+ ]
1284
+ },
1285
+ {
1286
+ "cell_type": "code",
1287
+ "execution_count": 25,
1288
+ "metadata": {},
1289
+ "outputs": [],
1290
+ "source": [
1291
+ "null_cols = [\"Unnamed: 0\", \"Collected.By\", \"Eclosion.Date\", \"Verbatim.Coordinates\"]\n",
1292
+ "non_null_cols = [col for col in list(df_img.columns) if col not in null_cols]"
1293
+ ]
1294
+ },
1295
+ {
1296
+ "cell_type": "code",
1297
+ "execution_count": 26,
1298
+ "metadata": {},
1299
+ "outputs": [],
1300
+ "source": [
1301
+ "df_img = df_img[non_null_cols]"
1302
+ ]
1303
+ },
1304
+ {
1305
+ "cell_type": "code",
1306
+ "execution_count": 27,
1307
+ "metadata": {},
1308
+ "outputs": [
1309
+ {
1310
+ "data": {
1311
+ "text/html": [
1312
+ "<div>\n",
1313
+ "<style scoped>\n",
1314
+ " .dataframe tbody tr th:only-of-type {\n",
1315
+ " vertical-align: middle;\n",
1316
+ " }\n",
1317
+ "\n",
1318
+ " .dataframe tbody tr th {\n",
1319
+ " vertical-align: top;\n",
1320
+ " }\n",
1321
+ "\n",
1322
+ " .dataframe thead th {\n",
1323
+ " text-align: right;\n",
1324
+ " }\n",
1325
+ "</style>\n",
1326
+ "<table border=\"1\" class=\"dataframe\">\n",
1327
+ " <thead>\n",
1328
+ " <tr style=\"text-align: right;\">\n",
1329
+ " <th></th>\n",
1330
+ " <th>CAMID</th>\n",
1331
+ " <th>X</th>\n",
1332
+ " <th>Image_name</th>\n",
1333
+ " <th>View</th>\n",
1334
+ " <th>zenodo_name</th>\n",
1335
+ " <th>zenodo_link</th>\n",
1336
+ " <th>Sequence</th>\n",
1337
+ " <th>Taxonomic_Name</th>\n",
1338
+ " <th>Locality</th>\n",
1339
+ " <th>Sample_accession</th>\n",
1340
+ " <th>...</th>\n",
1341
+ " <th>Other_ID</th>\n",
1342
+ " <th>Date</th>\n",
1343
+ " <th>Dataset</th>\n",
1344
+ " <th>Store</th>\n",
1345
+ " <th>Brood</th>\n",
1346
+ " <th>Death_Date</th>\n",
1347
+ " <th>Cross_Type</th>\n",
1348
+ " <th>Stage</th>\n",
1349
+ " <th>Sex</th>\n",
1350
+ " <th>Unit_Type</th>\n",
1351
+ " </tr>\n",
1352
+ " </thead>\n",
1353
+ " <tbody>\n",
1354
+ " <tr>\n",
1355
+ " <th>433</th>\n",
1356
+ " <td>14N004</td>\n",
1357
+ " <td>15131</td>\n",
1358
+ " <td>14N004_d.JPG</td>\n",
1359
+ " <td>dorsal</td>\n",
1360
+ " <td>0.4.nn.requests2.csv</td>\n",
1361
+ " <td>https://zenodo.org/record/4289223</td>\n",
1362
+ " <td>4</td>\n",
1363
+ " <td>NaN</td>\n",
1364
+ " <td>NaN</td>\n",
1365
+ " <td>NaN</td>\n",
1366
+ " <td>...</td>\n",
1367
+ " <td>NaN</td>\n",
1368
+ " <td>NaN</td>\n",
1369
+ " <td>Nadeau Sheffield</td>\n",
1370
+ " <td>NaN</td>\n",
1371
+ " <td>NaN</td>\n",
1372
+ " <td>NaN</td>\n",
1373
+ " <td>NaN</td>\n",
1374
+ " <td>NaN</td>\n",
1375
+ " <td>NaN</td>\n",
1376
+ " <td>NaN</td>\n",
1377
+ " </tr>\n",
1378
+ " <tr>\n",
1379
+ " <th>434</th>\n",
1380
+ " <td>14N004</td>\n",
1381
+ " <td>15132</td>\n",
1382
+ " <td>14N004_v.JPG</td>\n",
1383
+ " <td>ventral</td>\n",
1384
+ " <td>0.4.nn.requests2.csv</td>\n",
1385
+ " <td>https://zenodo.org/record/4289223</td>\n",
1386
+ " <td>4</td>\n",
1387
+ " <td>NaN</td>\n",
1388
+ " <td>NaN</td>\n",
1389
+ " <td>NaN</td>\n",
1390
+ " <td>...</td>\n",
1391
+ " <td>NaN</td>\n",
1392
+ " <td>NaN</td>\n",
1393
+ " <td>Nadeau Sheffield</td>\n",
1394
+ " <td>NaN</td>\n",
1395
+ " <td>NaN</td>\n",
1396
+ " <td>NaN</td>\n",
1397
+ " <td>NaN</td>\n",
1398
+ " <td>NaN</td>\n",
1399
+ " <td>NaN</td>\n",
1400
+ " <td>NaN</td>\n",
1401
+ " </tr>\n",
1402
+ " <tr>\n",
1403
+ " <th>435</th>\n",
1404
+ " <td>14N009</td>\n",
1405
+ " <td>15134</td>\n",
1406
+ " <td>14N009_v.JPG</td>\n",
1407
+ " <td>ventral</td>\n",
1408
+ " <td>0.4.nn.requests2.csv</td>\n",
1409
+ " <td>https://zenodo.org/record/4289223</td>\n",
1410
+ " <td>9</td>\n",
1411
+ " <td>NaN</td>\n",
1412
+ " <td>NaN</td>\n",
1413
+ " <td>NaN</td>\n",
1414
+ " <td>...</td>\n",
1415
+ " <td>NaN</td>\n",
1416
+ " <td>NaN</td>\n",
1417
+ " <td>Nadeau Sheffield</td>\n",
1418
+ " <td>NaN</td>\n",
1419
+ " <td>NaN</td>\n",
1420
+ " <td>NaN</td>\n",
1421
+ " <td>NaN</td>\n",
1422
+ " <td>NaN</td>\n",
1423
+ " <td>NaN</td>\n",
1424
+ " <td>NaN</td>\n",
1425
+ " </tr>\n",
1426
+ " <tr>\n",
1427
+ " <th>436</th>\n",
1428
+ " <td>14N009</td>\n",
1429
+ " <td>15133</td>\n",
1430
+ " <td>14N009_d.JPG</td>\n",
1431
+ " <td>dorsal</td>\n",
1432
+ " <td>0.4.nn.requests2.csv</td>\n",
1433
+ " <td>https://zenodo.org/record/4289223</td>\n",
1434
+ " <td>9</td>\n",
1435
+ " <td>NaN</td>\n",
1436
+ " <td>NaN</td>\n",
1437
+ " <td>NaN</td>\n",
1438
+ " <td>...</td>\n",
1439
+ " <td>NaN</td>\n",
1440
+ " <td>NaN</td>\n",
1441
+ " <td>Nadeau Sheffield</td>\n",
1442
+ " <td>NaN</td>\n",
1443
+ " <td>NaN</td>\n",
1444
+ " <td>NaN</td>\n",
1445
+ " <td>NaN</td>\n",
1446
+ " <td>NaN</td>\n",
1447
+ " <td>NaN</td>\n",
1448
+ " <td>NaN</td>\n",
1449
+ " </tr>\n",
1450
+ " <tr>\n",
1451
+ " <th>437</th>\n",
1452
+ " <td>14N014</td>\n",
1453
+ " <td>15136</td>\n",
1454
+ " <td>14N014_v.JPG</td>\n",
1455
+ " <td>ventral</td>\n",
1456
+ " <td>0.4.nn.requests2.csv</td>\n",
1457
+ " <td>https://zenodo.org/record/4289223</td>\n",
1458
+ " <td>14</td>\n",
1459
+ " <td>NaN</td>\n",
1460
+ " <td>NaN</td>\n",
1461
+ " <td>NaN</td>\n",
1462
+ " <td>...</td>\n",
1463
+ " <td>NaN</td>\n",
1464
+ " <td>NaN</td>\n",
1465
+ " <td>Nadeau Sheffield</td>\n",
1466
+ " <td>NaN</td>\n",
1467
+ " <td>NaN</td>\n",
1468
+ " <td>NaN</td>\n",
1469
+ " <td>NaN</td>\n",
1470
+ " <td>NaN</td>\n",
1471
+ " <td>NaN</td>\n",
1472
+ " <td>NaN</td>\n",
1473
+ " </tr>\n",
1474
+ " </tbody>\n",
1475
+ "</table>\n",
1476
+ "<p>5 rows × 21 columns</p>\n",
1477
+ "</div>"
1478
+ ],
1479
+ "text/plain": [
1480
+ " CAMID X Image_name View zenodo_name \\\n",
1481
+ "433 14N004 15131 14N004_d.JPG dorsal 0.4.nn.requests2.csv \n",
1482
+ "434 14N004 15132 14N004_v.JPG ventral 0.4.nn.requests2.csv \n",
1483
+ "435 14N009 15134 14N009_v.JPG ventral 0.4.nn.requests2.csv \n",
1484
+ "436 14N009 15133 14N009_d.JPG dorsal 0.4.nn.requests2.csv \n",
1485
+ "437 14N014 15136 14N014_v.JPG ventral 0.4.nn.requests2.csv \n",
1486
+ "\n",
1487
+ " zenodo_link Sequence Taxonomic_Name Locality \\\n",
1488
+ "433 https://zenodo.org/record/4289223 4 NaN NaN \n",
1489
+ "434 https://zenodo.org/record/4289223 4 NaN NaN \n",
1490
+ "435 https://zenodo.org/record/4289223 9 NaN NaN \n",
1491
+ "436 https://zenodo.org/record/4289223 9 NaN NaN \n",
1492
+ "437 https://zenodo.org/record/4289223 14 NaN NaN \n",
1493
+ "\n",
1494
+ " Sample_accession ... Other_ID Date Dataset Store Brood \\\n",
1495
+ "433 NaN ... NaN NaN Nadeau Sheffield NaN NaN \n",
1496
+ "434 NaN ... NaN NaN Nadeau Sheffield NaN NaN \n",
1497
+ "435 NaN ... NaN NaN Nadeau Sheffield NaN NaN \n",
1498
+ "436 NaN ... NaN NaN Nadeau Sheffield NaN NaN \n",
1499
+ "437 NaN ... NaN NaN Nadeau Sheffield NaN NaN \n",
1500
+ "\n",
1501
+ " Death_Date Cross_Type Stage Sex Unit_Type \n",
1502
+ "433 NaN NaN NaN NaN NaN \n",
1503
+ "434 NaN NaN NaN NaN NaN \n",
1504
+ "435 NaN NaN NaN NaN NaN \n",
1505
+ "436 NaN NaN NaN NaN NaN \n",
1506
+ "437 NaN NaN NaN NaN NaN \n",
1507
+ "\n",
1508
+ "[5 rows x 21 columns]"
1509
+ ]
1510
+ },
1511
+ "execution_count": 27,
1512
+ "metadata": {},
1513
+ "output_type": "execute_result"
1514
+ }
1515
+ ],
1516
+ "source": [
1517
+ "df_img.head()"
1518
+ ]
1519
+ },
1520
+ {
1521
+ "cell_type": "code",
1522
+ "execution_count": 28,
1523
+ "metadata": {},
1524
+ "outputs": [
1525
+ {
1526
+ "name": "stdout",
1527
+ "output_type": "stream",
1528
+ "text": [
1529
+ "<class 'pandas.core.frame.DataFrame'>\n",
1530
+ "Index: 49359 entries, 433 to 49791\n",
1531
+ "Data columns (total 22 columns):\n",
1532
+ " # Column Non-Null Count Dtype \n",
1533
+ "--- ------ -------------- ----- \n",
1534
+ " 0 CAMID 49359 non-null object\n",
1535
+ " 1 X 49359 non-null int64 \n",
1536
+ " 2 Image_name 49359 non-null object\n",
1537
+ " 3 View 48288 non-null object\n",
1538
+ " 4 zenodo_name 49359 non-null object\n",
1539
+ " 5 zenodo_link 49359 non-null object\n",
1540
+ " 6 Sequence 48424 non-null object\n",
1541
+ " 7 Taxonomic_Name 45473 non-null object\n",
1542
+ " 8 Locality 34015 non-null object\n",
1543
+ " 9 Sample_accession 5884 non-null object\n",
1544
+ " 10 Collected_by 5280 non-null object\n",
1545
+ " 11 Other_ID 14382 non-null object\n",
1546
+ " 12 Date 33718 non-null object\n",
1547
+ " 13 Dataset 40405 non-null object\n",
1548
+ " 14 Store 39485 non-null object\n",
1549
+ " 15 Brood 14942 non-null object\n",
1550
+ " 16 Death_Date 318 non-null object\n",
1551
+ " 17 Cross_Type 5133 non-null object\n",
1552
+ " 18 Stage 15 non-null object\n",
1553
+ " 19 Sex 36243 non-null object\n",
1554
+ " 20 Unit_Type 33890 non-null object\n",
1555
+ " 21 file_type 49359 non-null object\n",
1556
+ "dtypes: int64(1), object(21)\n",
1557
+ "memory usage: 8.7+ MB\n"
1558
+ ]
1559
+ }
1560
+ ],
1561
+ "source": [
1562
+ "df_img[\"file_type\"] = df_img[\"Image_name\"].apply(get_file_type)\n",
1563
+ "df_img.info()"
1564
+ ]
1565
+ },
1566
+ {
1567
+ "cell_type": "code",
1568
+ "execution_count": 29,
1569
+ "metadata": {},
1570
+ "outputs": [],
1571
+ "source": [
1572
+ "df_img.to_csv(\"../Jiggins_Zenodo_Img_Master.csv\", index = False)"
1573
+ ]
1574
+ },
1575
+ {
1576
+ "cell_type": "markdown",
1577
+ "metadata": {},
1578
+ "source": [
1579
+ "Remaining Question is just if the raw images are duplicated as jpgs or are unique. The `CAMID`'s correspond to samples (as noted in the [zenodo records](https://zenodo.org/record/4289223)), so we can check a single view for this."
1580
+ ]
1581
+ },
1582
+ {
1583
+ "cell_type": "code",
1584
+ "execution_count": 30,
1585
+ "metadata": {},
1586
+ "outputs": [
1587
+ {
1588
+ "data": {
1589
+ "text/plain": [
1590
+ "View\n",
1591
+ "dorsal 15128\n",
1592
+ "ventral 13424\n",
1593
+ "Dorsal 8360\n",
1594
+ "Ventral 8090\n",
1595
+ "ventral 1644\n",
1596
+ "forewing dorsal 406\n",
1597
+ "hindwing dorsal 406\n",
1598
+ "forewing ventral 406\n",
1599
+ "hindwing ventral 406\n",
1600
+ "Dorsal and Ventral 18\n",
1601
+ "Name: count, dtype: int64"
1602
+ ]
1603
+ },
1604
+ "execution_count": 30,
1605
+ "metadata": {},
1606
+ "output_type": "execute_result"
1607
+ }
1608
+ ],
1609
+ "source": [
1610
+ "df_img.View.value_counts()"
1611
+ ]
1612
+ },
1613
+ {
1614
+ "cell_type": "code",
1615
+ "execution_count": 31,
1616
+ "metadata": {},
1617
+ "outputs": [
1618
+ {
1619
+ "data": {
1620
+ "text/plain": [
1621
+ "['dorsal',\n",
1622
+ " 'Dorsal',\n",
1623
+ " 'Dorsal and Ventral',\n",
1624
+ " 'forewing dorsal',\n",
1625
+ " 'hindwing dorsal']"
1626
+ ]
1627
+ },
1628
+ "execution_count": 31,
1629
+ "metadata": {},
1630
+ "output_type": "execute_result"
1631
+ }
1632
+ ],
1633
+ "source": [
1634
+ "dorsal_labels = [view for view in list(df_img.View.dropna().unique()) if \"dorsal\" in view.lower()]\n",
1635
+ "dorsal_labels"
1636
+ ]
1637
+ },
1638
+ {
1639
+ "cell_type": "code",
1640
+ "execution_count": 32,
1641
+ "metadata": {},
1642
+ "outputs": [
1643
+ {
1644
+ "name": "stdout",
1645
+ "output_type": "stream",
1646
+ "text": [
1647
+ "<class 'pandas.core.frame.DataFrame'>\n",
1648
+ "Index: 24318 entries, 433 to 49790\n",
1649
+ "Data columns (total 22 columns):\n",
1650
+ " # Column Non-Null Count Dtype \n",
1651
+ "--- ------ -------------- ----- \n",
1652
+ " 0 CAMID 24318 non-null object\n",
1653
+ " 1 X 24318 non-null int64 \n",
1654
+ " 2 Image_name 24318 non-null object\n",
1655
+ " 3 View 24318 non-null object\n",
1656
+ " 4 zenodo_name 24318 non-null object\n",
1657
+ " 5 zenodo_link 24318 non-null object\n",
1658
+ " 6 Sequence 23851 non-null object\n",
1659
+ " 7 Taxonomic_Name 22511 non-null object\n",
1660
+ " 8 Locality 16773 non-null object\n",
1661
+ " 9 Sample_accession 2953 non-null object\n",
1662
+ " 10 Collected_by 2656 non-null object\n",
1663
+ " 11 Other_ID 6931 non-null object\n",
1664
+ " 12 Date 16847 non-null object\n",
1665
+ " 13 Dataset 19935 non-null object\n",
1666
+ " 14 Store 19894 non-null object\n",
1667
+ " 15 Brood 7264 non-null object\n",
1668
+ " 16 Death_Date 107 non-null object\n",
1669
+ " 17 Cross_Type 2572 non-null object\n",
1670
+ " 18 Stage 8 non-null object\n",
1671
+ " 19 Sex 17875 non-null object\n",
1672
+ " 20 Unit_Type 16693 non-null object\n",
1673
+ " 21 file_type 24318 non-null object\n",
1674
+ "dtypes: int64(1), object(21)\n",
1675
+ "memory usage: 4.3+ MB\n"
1676
+ ]
1677
+ }
1678
+ ],
1679
+ "source": [
1680
+ "df_img_dorsal = df_img.loc[df_img[\"View\"].isin(dorsal_labels)]\n",
1681
+ "df_img_dorsal.info()"
1682
+ ]
1683
+ },
1684
+ {
1685
+ "cell_type": "code",
1686
+ "execution_count": 33,
1687
+ "metadata": {},
1688
+ "outputs": [
1689
+ {
1690
+ "data": {
1691
+ "text/plain": [
1692
+ "CAMID 12296\n",
1693
+ "X 24318\n",
1694
+ "Image_name 18539\n",
1695
+ "View 5\n",
1696
+ "zenodo_name 36\n",
1697
+ "zenodo_link 32\n",
1698
+ "Sequence 11107\n",
1699
+ "Taxonomic_Name 359\n",
1700
+ "Locality 642\n",
1701
+ "Sample_accession 1564\n",
1702
+ "Collected_by 12\n",
1703
+ "Other_ID 2897\n",
1704
+ "Date 794\n",
1705
+ "Dataset 8\n",
1706
+ "Store 142\n",
1707
+ "Brood 217\n",
1708
+ "Death_Date 64\n",
1709
+ "Cross_Type 30\n",
1710
+ "Stage 1\n",
1711
+ "Sex 3\n",
1712
+ "Unit_Type 6\n",
1713
+ "file_type 3\n",
1714
+ "dtype: int64"
1715
+ ]
1716
+ },
1717
+ "execution_count": 33,
1718
+ "metadata": {},
1719
+ "output_type": "execute_result"
1720
+ }
1721
+ ],
1722
+ "source": [
1723
+ "df_img_dorsal.nunique()"
1724
+ ]
1725
+ },
1726
+ {
1727
+ "cell_type": "markdown",
1728
+ "metadata": {},
1729
+ "source": [
1730
+ "We still have repeated `CAMID`s."
1731
+ ]
1732
+ },
1733
+ {
1734
+ "cell_type": "code",
1735
+ "execution_count": 34,
1736
+ "metadata": {},
1737
+ "outputs": [
1738
+ {
1739
+ "name": "stderr",
1740
+ "output_type": "stream",
1741
+ "text": [
1742
+ "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_66533/4002726096.py:1: SettingWithCopyWarning: \n",
1743
+ "A value is trying to be set on a copy of a slice from a DataFrame.\n",
1744
+ "Try using .loc[row_indexer,col_indexer] = value instead\n",
1745
+ "\n",
1746
+ "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
1747
+ " df_img_dorsal[\"CAM_Dupe\"] = df_img_dorsal.duplicated(subset = \"CAMID\", keep = False)\n"
1748
+ ]
1749
+ }
1750
+ ],
1751
+ "source": [
1752
+ "df_img_dorsal[\"CAM_Dupe\"] = df_img_dorsal.duplicated(subset = \"CAMID\", keep = False)"
1753
+ ]
1754
+ },
1755
+ {
1756
+ "cell_type": "code",
1757
+ "execution_count": 35,
1758
+ "metadata": {},
1759
+ "outputs": [
1760
+ {
1761
+ "data": {
1762
+ "text/plain": [
1763
+ "CAM_Dupe\n",
1764
+ "True 20765\n",
1765
+ "False 3553\n",
1766
+ "Name: count, dtype: int64"
1767
+ ]
1768
+ },
1769
+ "execution_count": 35,
1770
+ "metadata": {},
1771
+ "output_type": "execute_result"
1772
+ }
1773
+ ],
1774
+ "source": [
1775
+ "df_img_dorsal[\"CAM_Dupe\"].value_counts()"
1776
+ ]
1777
+ },
1778
+ {
1779
+ "cell_type": "code",
1780
+ "execution_count": 36,
1781
+ "metadata": {},
1782
+ "outputs": [
1783
+ {
1784
+ "name": "stdout",
1785
+ "output_type": "stream",
1786
+ "text": [
1787
+ "<class 'pandas.core.frame.DataFrame'>\n",
1788
+ "Index: 20765 entries, 709 to 49692\n",
1789
+ "Data columns (total 23 columns):\n",
1790
+ " # Column Non-Null Count Dtype \n",
1791
+ "--- ------ -------------- ----- \n",
1792
+ " 0 CAMID 20765 non-null object\n",
1793
+ " 1 X 20765 non-null int64 \n",
1794
+ " 2 Image_name 20765 non-null object\n",
1795
+ " 3 View 20765 non-null object\n",
1796
+ " 4 zenodo_name 20765 non-null object\n",
1797
+ " 5 zenodo_link 20765 non-null object\n",
1798
+ " 6 Sequence 20299 non-null object\n",
1799
+ " 7 Taxonomic_Name 19368 non-null object\n",
1800
+ " 8 Locality 15301 non-null object\n",
1801
+ " 9 Sample_accession 2657 non-null object\n",
1802
+ " 10 Collected_by 2653 non-null object\n",
1803
+ " 11 Other_ID 6107 non-null object\n",
1804
+ " 12 Date 15980 non-null object\n",
1805
+ " 13 Dataset 16862 non-null object\n",
1806
+ " 14 Store 17579 non-null object\n",
1807
+ " 15 Brood 5414 non-null object\n",
1808
+ " 16 Death_Date 26 non-null object\n",
1809
+ " 17 Cross_Type 2572 non-null object\n",
1810
+ " 18 Stage 0 non-null object\n",
1811
+ " 19 Sex 14897 non-null object\n",
1812
+ " 20 Unit_Type 13814 non-null object\n",
1813
+ " 21 file_type 20765 non-null object\n",
1814
+ " 22 CAM_Dupe 20765 non-null bool \n",
1815
+ "dtypes: bool(1), int64(1), object(21)\n",
1816
+ "memory usage: 3.7+ MB\n"
1817
+ ]
1818
+ }
1819
+ ],
1820
+ "source": [
1821
+ "duplicate_samples = df_img_dorsal.loc[df_img_dorsal[\"CAM_Dupe\"]]\n",
1822
+ "duplicate_samples.info()"
1823
+ ]
1824
+ },
1825
+ {
1826
+ "cell_type": "code",
1827
+ "execution_count": 37,
1828
+ "metadata": {},
1829
+ "outputs": [
1830
+ {
1831
+ "data": {
1832
+ "text/plain": [
1833
+ "CAMID 8743\n",
1834
+ "X 20765\n",
1835
+ "Image_name 14986\n",
1836
+ "View 5\n",
1837
+ "zenodo_name 32\n",
1838
+ "zenodo_link 31\n",
1839
+ "Sequence 8407\n",
1840
+ "Taxonomic_Name 328\n",
1841
+ "Locality 516\n",
1842
+ "Sample_accession 1268\n",
1843
+ "Collected_by 12\n",
1844
+ "Other_ID 2073\n",
1845
+ "Date 578\n",
1846
+ "Dataset 4\n",
1847
+ "Store 130\n",
1848
+ "Brood 144\n",
1849
+ "Death_Date 12\n",
1850
+ "Cross_Type 30\n",
1851
+ "Stage 0\n",
1852
+ "Sex 3\n",
1853
+ "Unit_Type 3\n",
1854
+ "file_type 3\n",
1855
+ "CAM_Dupe 1\n",
1856
+ "dtype: int64"
1857
+ ]
1858
+ },
1859
+ "execution_count": 37,
1860
+ "metadata": {},
1861
+ "output_type": "execute_result"
1862
+ }
1863
+ ],
1864
+ "source": [
1865
+ "duplicate_samples.nunique()"
1866
+ ]
1867
+ },
1868
+ {
1869
+ "cell_type": "markdown",
1870
+ "metadata": {},
1871
+ "source": [
1872
+ "All sources are impacted."
1873
+ ]
1874
+ },
1875
+ {
1876
+ "cell_type": "code",
1877
+ "execution_count": 38,
1878
+ "metadata": {},
1879
+ "outputs": [
1880
+ {
1881
+ "data": {
1882
+ "text/plain": [
1883
+ "file_type\n",
1884
+ "jpg 14788\n",
1885
+ "raw 5956\n",
1886
+ "tif 21\n",
1887
+ "Name: count, dtype: int64"
1888
+ ]
1889
+ },
1890
+ "execution_count": 38,
1891
+ "metadata": {},
1892
+ "output_type": "execute_result"
1893
+ }
1894
+ ],
1895
+ "source": [
1896
+ "duplicate_samples.file_type.value_counts()"
1897
+ ]
1898
+ },
1899
+ {
1900
+ "cell_type": "markdown",
1901
+ "metadata": {},
1902
+ "source": [
1903
+ "We will get some added duplication from `forewing dorsal` and `hindwing dorsal`, so we should filter those down to just one for a more accurate assessment."
1904
+ ]
1905
+ },
1906
+ {
1907
+ "cell_type": "code",
1908
+ "execution_count": 39,
1909
+ "metadata": {},
1910
+ "outputs": [
1911
+ {
1912
+ "data": {
1913
+ "text/plain": [
1914
+ "True 680\n",
1915
+ "False 132\n",
1916
+ "Name: count, dtype: int64"
1917
+ ]
1918
+ },
1919
+ "execution_count": 39,
1920
+ "metadata": {},
1921
+ "output_type": "execute_result"
1922
+ }
1923
+ ],
1924
+ "source": [
1925
+ "duplicate_samples.loc[duplicate_samples[\"View\"].isin([\"forewing dorsal\", \"hindwing dorsal\"])].duplicated(\"CAMID\", keep = \"first\").value_counts()"
1926
+ ]
1927
+ },
1928
+ {
1929
+ "cell_type": "code",
1930
+ "execution_count": 40,
1931
+ "metadata": {},
1932
+ "outputs": [
1933
+ {
1934
+ "data": {
1935
+ "text/plain": [
1936
+ "CAMID 132\n",
1937
+ "X 812\n",
1938
+ "Image_name 528\n",
1939
+ "View 2\n",
1940
+ "zenodo_name 3\n",
1941
+ "zenodo_link 3\n",
1942
+ "Sequence 132\n",
1943
+ "Taxonomic_Name 7\n",
1944
+ "Locality 59\n",
1945
+ "Sample_accession 0\n",
1946
+ "Collected_by 0\n",
1947
+ "Other_ID 127\n",
1948
+ "Date 16\n",
1949
+ "Dataset 1\n",
1950
+ "Store 17\n",
1951
+ "Brood 0\n",
1952
+ "Death_Date 0\n",
1953
+ "Cross_Type 0\n",
1954
+ "Stage 0\n",
1955
+ "Sex 0\n",
1956
+ "Unit_Type 0\n",
1957
+ "file_type 2\n",
1958
+ "CAM_Dupe 1\n",
1959
+ "dtype: int64"
1960
+ ]
1961
+ },
1962
+ "execution_count": 40,
1963
+ "metadata": {},
1964
+ "output_type": "execute_result"
1965
+ }
1966
+ ],
1967
+ "source": [
1968
+ "duplicate_samples.loc[duplicate_samples[\"View\"].isin([\"forewing dorsal\", \"hindwing dorsal\"])].nunique()"
1969
+ ]
1970
+ },
1971
+ {
1972
+ "cell_type": "markdown",
1973
+ "metadata": {},
1974
+ "source": [
1975
+ "This is only a couple zenodo links, so it is not contributing to the duplication across sources. It also covers two file types."
1976
+ ]
1977
+ },
1978
+ {
1979
+ "cell_type": "code",
1980
+ "execution_count": 41,
1981
+ "metadata": {},
1982
+ "outputs": [
1983
+ {
1984
+ "name": "stdout",
1985
+ "output_type": "stream",
1986
+ "text": [
1987
+ "<class 'pandas.core.frame.DataFrame'>\n",
1988
+ "Index: 3553 entries, 433 to 49790\n",
1989
+ "Data columns (total 23 columns):\n",
1990
+ " # Column Non-Null Count Dtype \n",
1991
+ "--- ------ -------------- ----- \n",
1992
+ " 0 CAMID 3553 non-null object\n",
1993
+ " 1 X 3553 non-null int64 \n",
1994
+ " 2 Image_name 3553 non-null object\n",
1995
+ " 3 View 3553 non-null object\n",
1996
+ " 4 zenodo_name 3553 non-null object\n",
1997
+ " 5 zenodo_link 3553 non-null object\n",
1998
+ " 6 Sequence 3552 non-null object\n",
1999
+ " 7 Taxonomic_Name 3143 non-null object\n",
2000
+ " 8 Locality 1472 non-null object\n",
2001
+ " 9 Sample_accession 296 non-null object\n",
2002
+ " 10 Collected_by 3 non-null object\n",
2003
+ " 11 Other_ID 824 non-null object\n",
2004
+ " 12 Date 867 non-null object\n",
2005
+ " 13 Dataset 3073 non-null object\n",
2006
+ " 14 Store 2315 non-null object\n",
2007
+ " 15 Brood 1850 non-null object\n",
2008
+ " 16 Death_Date 81 non-null object\n",
2009
+ " 17 Cross_Type 0 non-null object\n",
2010
+ " 18 Stage 8 non-null object\n",
2011
+ " 19 Sex 2978 non-null object\n",
2012
+ " 20 Unit_Type 2879 non-null object\n",
2013
+ " 21 file_type 3553 non-null object\n",
2014
+ " 22 CAM_Dupe 3553 non-null bool \n",
2015
+ "dtypes: bool(1), int64(1), object(21)\n",
2016
+ "memory usage: 641.9+ KB\n"
2017
+ ]
2018
+ }
2019
+ ],
2020
+ "source": [
2021
+ "unique_samples = df_img_dorsal.loc[~df_img_dorsal[\"CAM_Dupe\"]]\n",
2022
+ "unique_samples.info()"
2023
+ ]
2024
+ },
2025
+ {
2026
+ "cell_type": "code",
2027
+ "execution_count": 42,
2028
+ "metadata": {},
2029
+ "outputs": [
2030
+ {
2031
+ "data": {
2032
+ "text/plain": [
2033
+ "CAMID 3553\n",
2034
+ "X 3553\n",
2035
+ "Image_name 3553\n",
2036
+ "View 3\n",
2037
+ "zenodo_name 21\n",
2038
+ "zenodo_link 18\n",
2039
+ "Sequence 3016\n",
2040
+ "Taxonomic_Name 109\n",
2041
+ "Locality 160\n",
2042
+ "Sample_accession 296\n",
2043
+ "Collected_by 3\n",
2044
+ "Other_ID 824\n",
2045
+ "Date 265\n",
2046
+ "Dataset 8\n",
2047
+ "Store 76\n",
2048
+ "Brood 95\n",
2049
+ "Death_Date 52\n",
2050
+ "Cross_Type 0\n",
2051
+ "Stage 1\n",
2052
+ "Sex 3\n",
2053
+ "Unit_Type 6\n",
2054
+ "file_type 2\n",
2055
+ "CAM_Dupe 1\n",
2056
+ "dtype: int64"
2057
+ ]
2058
+ },
2059
+ "execution_count": 42,
2060
+ "metadata": {},
2061
+ "output_type": "execute_result"
2062
+ }
2063
+ ],
2064
+ "source": [
2065
+ "unique_samples.nunique()"
2066
+ ]
2067
+ },
2068
+ {
2069
+ "cell_type": "code",
2070
+ "execution_count": 43,
2071
+ "metadata": {},
2072
+ "outputs": [
2073
+ {
2074
+ "data": {
2075
+ "text/plain": [
2076
+ "file_type\n",
2077
+ "jpg 3535\n",
2078
+ "tif 18\n",
2079
+ "Name: count, dtype: int64"
2080
+ ]
2081
+ },
2082
+ "execution_count": 43,
2083
+ "metadata": {},
2084
+ "output_type": "execute_result"
2085
+ }
2086
+ ],
2087
+ "source": [
2088
+ "unique_samples.file_type.value_counts()"
2089
+ ]
2090
+ },
2091
+ {
2092
+ "cell_type": "markdown",
2093
+ "metadata": {},
2094
+ "source": [
2095
+ "Ah, well all raw images are indeed duplicated. Let's check if they're duplicated among themselves or duplicated to other file types (eg., jpg)."
2096
+ ]
2097
+ },
2098
+ {
2099
+ "cell_type": "code",
2100
+ "execution_count": 44,
2101
+ "metadata": {},
2102
+ "outputs": [
2103
+ {
2104
+ "name": "stdout",
2105
+ "output_type": "stream",
2106
+ "text": [
2107
+ "(5753, 23)\n"
2108
+ ]
2109
+ },
2110
+ {
2111
+ "data": {
2112
+ "text/plain": [
2113
+ "4944"
2114
+ ]
2115
+ },
2116
+ "execution_count": 44,
2117
+ "metadata": {},
2118
+ "output_type": "execute_result"
2119
+ }
2120
+ ],
2121
+ "source": [
2122
+ "print(duplicate_samples.loc[(duplicate_samples[\"View\"] != \"hindwing dorsal\") & (duplicate_samples[\"file_type\"] == \"raw\")].shape)\n",
2123
+ "duplicate_samples.loc[(duplicate_samples[\"View\"] != \"hindwing dorsal\") & (duplicate_samples[\"file_type\"] == \"raw\"), \"CAMID\"].nunique()"
2124
+ ]
2125
+ },
2126
+ {
2127
+ "cell_type": "markdown",
2128
+ "metadata": {},
2129
+ "source": [
2130
+ "Okay, so there are multiple raw images of the same sample. "
2131
+ ]
2132
+ },
2133
+ {
2134
+ "cell_type": "code",
2135
+ "execution_count": 45,
2136
+ "metadata": {},
2137
+ "outputs": [
2138
+ {
2139
+ "data": {
2140
+ "text/plain": [
2141
+ "View\n",
2142
+ "dorsal 4219\n",
2143
+ "Dorsal 1331\n",
2144
+ "forewing dorsal 203\n",
2145
+ "Name: count, dtype: int64"
2146
+ ]
2147
+ },
2148
+ "execution_count": 45,
2149
+ "metadata": {},
2150
+ "output_type": "execute_result"
2151
+ }
2152
+ ],
2153
+ "source": [
2154
+ "duplicate_raw = duplicate_samples.loc[(duplicate_samples[\"View\"] != \"hindwing dorsal\") & (duplicate_samples[\"file_type\"] == \"raw\")]\n",
2155
+ "duplicate_raw.View.value_counts()"
2156
+ ]
2157
+ },
2158
+ {
2159
+ "cell_type": "code",
2160
+ "execution_count": 46,
2161
+ "metadata": {},
2162
+ "outputs": [
2163
+ {
2164
+ "name": "stdout",
2165
+ "output_type": "stream",
2166
+ "text": [
2167
+ "raw_dupe\n",
2168
+ "False 4240\n",
2169
+ "True 1513\n",
2170
+ "Name: count, dtype: int64\n",
2171
+ "\n"
2172
+ ]
2173
+ },
2174
+ {
2175
+ "name": "stderr",
2176
+ "output_type": "stream",
2177
+ "text": [
2178
+ "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_66533/3049709573.py:1: SettingWithCopyWarning: \n",
2179
+ "A value is trying to be set on a copy of a slice from a DataFrame.\n",
2180
+ "Try using .loc[row_indexer,col_indexer] = value instead\n",
2181
+ "\n",
2182
+ "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
2183
+ " duplicate_raw[\"raw_dupe\"] = duplicate_raw.duplicated(\"CAMID\", keep = False)\n"
2184
+ ]
2185
+ },
2186
+ {
2187
+ "data": {
2188
+ "text/plain": [
2189
+ "View\n",
2190
+ "dorsal 1159\n",
2191
+ "Dorsal 212\n",
2192
+ "forewing dorsal 142\n",
2193
+ "Name: count, dtype: int64"
2194
+ ]
2195
+ },
2196
+ "execution_count": 46,
2197
+ "metadata": {},
2198
+ "output_type": "execute_result"
2199
+ }
2200
+ ],
2201
+ "source": [
2202
+ "duplicate_raw[\"raw_dupe\"] = duplicate_raw.duplicated(\"CAMID\", keep = False)\n",
2203
+ "print(duplicate_raw[\"raw_dupe\"].value_counts())\n",
2204
+ "print()\n",
2205
+ "duplicate_raw.loc[duplicate_raw[\"raw_dupe\"], \"View\"].value_counts()"
2206
+ ]
2207
+ },
2208
+ {
2209
+ "cell_type": "markdown",
2210
+ "metadata": {},
2211
+ "source": [
2212
+ "There does not seem to be an easy method of filtering these other than just keeping the first instance of a particular `CAMID`.\n",
2213
+ "\n",
2214
+ "It is interesting that non of the Cross Types are unique. Is that just because we have the forewing/hindwing duplication?"
2215
+ ]
2216
+ },
2217
+ {
2218
+ "cell_type": "code",
2219
+ "execution_count": 47,
2220
+ "metadata": {},
2221
+ "outputs": [
2222
+ {
2223
+ "name": "stdout",
2224
+ "output_type": "stream",
2225
+ "text": [
2226
+ "(2572, 23)\n"
2227
+ ]
2228
+ },
2229
+ {
2230
+ "data": {
2231
+ "text/plain": [
2232
+ "820"
2233
+ ]
2234
+ },
2235
+ "execution_count": 47,
2236
+ "metadata": {},
2237
+ "output_type": "execute_result"
2238
+ }
2239
+ ],
2240
+ "source": [
2241
+ "print(duplicate_samples.loc[(duplicate_samples[\"View\"] != \"hindwing dorsal\") & (duplicate_samples[\"Cross_Type\"].notna())].shape)\n",
2242
+ "duplicate_samples.loc[(duplicate_samples[\"View\"] != \"hindwing dorsal\") & (duplicate_samples[\"Cross_Type\"].notna()), \"CAMID\"].nunique()"
2243
+ ]
2244
+ },
2245
+ {
2246
+ "cell_type": "markdown",
2247
+ "metadata": {},
2248
+ "source": [
2249
+ "There still seem to be 3 images for each specimen."
2250
+ ]
2251
+ },
2252
+ {
2253
+ "cell_type": "code",
2254
+ "execution_count": 48,
2255
+ "metadata": {},
2256
+ "outputs": [
2257
+ {
2258
+ "name": "stdout",
2259
+ "output_type": "stream",
2260
+ "text": [
2261
+ "cross_dupe\n",
2262
+ "True 2572\n",
2263
+ "Name: count, dtype: int64\n",
2264
+ "\n"
2265
+ ]
2266
+ },
2267
+ {
2268
+ "name": "stderr",
2269
+ "output_type": "stream",
2270
+ "text": [
2271
+ "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_66533/2419376272.py:2: SettingWithCopyWarning: \n",
2272
+ "A value is trying to be set on a copy of a slice from a DataFrame.\n",
2273
+ "Try using .loc[row_indexer,col_indexer] = value instead\n",
2274
+ "\n",
2275
+ "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
2276
+ " duplicate_cross[\"cross_dupe\"] = duplicate_cross.duplicated(\"CAMID\", keep = False)\n"
2277
+ ]
2278
+ },
2279
+ {
2280
+ "data": {
2281
+ "text/plain": [
2282
+ "View\n",
2283
+ "dorsal 2322\n",
2284
+ "Dorsal 250\n",
2285
+ "Name: count, dtype: int64"
2286
+ ]
2287
+ },
2288
+ "execution_count": 48,
2289
+ "metadata": {},
2290
+ "output_type": "execute_result"
2291
+ }
2292
+ ],
2293
+ "source": [
2294
+ "duplicate_cross = duplicate_samples.loc[(duplicate_samples[\"View\"] != \"hindwing dorsal\") & (duplicate_samples[\"Cross_Type\"].notna())]\n",
2295
+ "duplicate_cross[\"cross_dupe\"] = duplicate_cross.duplicated(\"CAMID\", keep = False)\n",
2296
+ "print(duplicate_cross[\"cross_dupe\"].value_counts())\n",
2297
+ "print()\n",
2298
+ "duplicate_cross.View.value_counts()"
2299
+ ]
2300
+ },
2301
+ {
2302
+ "cell_type": "markdown",
2303
+ "metadata": {},
2304
+ "source": [
2305
+ "Yes, they are all duplicated."
2306
+ ]
2307
+ },
2308
+ {
2309
+ "cell_type": "code",
2310
+ "execution_count": 49,
2311
+ "metadata": {},
2312
+ "outputs": [
2313
+ {
2314
+ "data": {
2315
+ "text/plain": [
2316
+ "file_type\n",
2317
+ "jpg 1753\n",
2318
+ "raw 819\n",
2319
+ "Name: count, dtype: int64"
2320
+ ]
2321
+ },
2322
+ "execution_count": 49,
2323
+ "metadata": {},
2324
+ "output_type": "execute_result"
2325
+ }
2326
+ ],
2327
+ "source": [
2328
+ "duplicate_cross.file_type.value_counts()"
2329
+ ]
2330
+ },
2331
+ {
2332
+ "cell_type": "markdown",
2333
+ "metadata": {},
2334
+ "source": [
2335
+ "It seems there's one raw image for each sample (other than one) and then everything else is jpg. I wonder if this includes the `JPG(1)` values."
2336
+ ]
2337
+ },
2338
+ {
2339
+ "cell_type": "code",
2340
+ "execution_count": 50,
2341
+ "metadata": {},
2342
+ "outputs": [
2343
+ {
2344
+ "data": {
2345
+ "text/plain": [
2346
+ "0"
2347
+ ]
2348
+ },
2349
+ "execution_count": 50,
2350
+ "metadata": {},
2351
+ "output_type": "execute_result"
2352
+ }
2353
+ ],
2354
+ "source": [
2355
+ "count = 0\n",
2356
+ "for img_name in list(duplicate_cross.Image_name.unique()):\n",
2357
+ " if \"JPG(1)\" in img_name:\n",
2358
+ " count = count + 1\n",
2359
+ "count"
2360
+ ]
2361
+ },
2362
+ {
2363
+ "cell_type": "markdown",
2364
+ "metadata": {},
2365
+ "source": [
2366
+ "No, that's not the issue."
2367
+ ]
2368
+ },
2369
+ {
2370
+ "cell_type": "code",
2371
+ "execution_count": 51,
2372
+ "metadata": {},
2373
+ "outputs": [
2374
+ {
2375
+ "data": {
2376
+ "text/plain": [
2377
+ "0"
2378
+ ]
2379
+ },
2380
+ "execution_count": 51,
2381
+ "metadata": {},
2382
+ "output_type": "execute_result"
2383
+ }
2384
+ ],
2385
+ "source": [
2386
+ "count = 0\n",
2387
+ "for img_name in list(duplicate_samples.Image_name.unique()):\n",
2388
+ " if \"JPG(1)\" in img_name:\n",
2389
+ " count = count + 1\n",
2390
+ "count"
2391
+ ]
2392
+ },
2393
+ {
2394
+ "cell_type": "code",
2395
+ "execution_count": 52,
2396
+ "metadata": {},
2397
+ "outputs": [
2398
+ {
2399
+ "data": {
2400
+ "text/plain": [
2401
+ "0"
2402
+ ]
2403
+ },
2404
+ "execution_count": 52,
2405
+ "metadata": {},
2406
+ "output_type": "execute_result"
2407
+ }
2408
+ ],
2409
+ "source": [
2410
+ "count = 0\n",
2411
+ "for img_name in list(df_img_dorsal.Image_name.unique()):\n",
2412
+ " if \"JPG(1)\" in img_name:\n",
2413
+ " count = count + 1\n",
2414
+ "count"
2415
+ ]
2416
+ },
2417
+ {
2418
+ "cell_type": "code",
2419
+ "execution_count": 53,
2420
+ "metadata": {},
2421
+ "outputs": [
2422
+ {
2423
+ "data": {
2424
+ "text/plain": [
2425
+ "1"
2426
+ ]
2427
+ },
2428
+ "execution_count": 53,
2429
+ "metadata": {},
2430
+ "output_type": "execute_result"
2431
+ }
2432
+ ],
2433
+ "source": [
2434
+ "count = 0\n",
2435
+ "for img_name in list(df_img.Image_name.unique()):\n",
2436
+ " if \"JPG(1)\" in img_name:\n",
2437
+ " count = count + 1\n",
2438
+ "count"
2439
+ ]
2440
+ },
2441
+ {
2442
+ "cell_type": "markdown",
2443
+ "metadata": {},
2444
+ "source": [
2445
+ "There's only one instance of this, and it's not a dorsal image, so that's not part of the issue."
2446
+ ]
2447
+ },
2448
+ {
2449
+ "cell_type": "markdown",
2450
+ "metadata": {},
2451
+ "source": [
2452
+ "Let's save all the dorsal images as another CSV (with the duplicate `CAMID` indicator)."
2453
+ ]
2454
+ },
2455
+ {
2456
+ "cell_type": "code",
2457
+ "execution_count": 54,
2458
+ "metadata": {},
2459
+ "outputs": [],
2460
+ "source": [
2461
+ "df_img_dorsal.to_csv(\"../Jiggins_Zenodo_dorsal_Img_Master.csv\", index = False)"
2462
+ ]
2463
+ },
2464
+ {
2465
+ "cell_type": "code",
2466
+ "execution_count": null,
2467
+ "metadata": {},
2468
+ "outputs": [],
2469
+ "source": []
2470
+ }
2471
+ ],
2472
+ "metadata": {
2473
+ "kernelspec": {
2474
+ "display_name": "std",
2475
+ "language": "python",
2476
+ "name": "python3"
2477
+ },
2478
+ "language_info": {
2479
+ "codemirror_mode": {
2480
+ "name": "ipython",
2481
+ "version": 3
2482
+ },
2483
+ "file_extension": ".py",
2484
+ "mimetype": "text/x-python",
2485
+ "name": "python",
2486
+ "nbconvert_exporter": "python",
2487
+ "pygments_lexer": "ipython3",
2488
+ "version": "3.11.3"
2489
+ },
2490
+ "orig_nbformat": 4
2491
+ },
2492
+ "nbformat": 4,
2493
+ "nbformat_minor": 2
2494
+ }