<commit_before>---
layout: D3-post
title: "Exploring ant biodiversity"
excerpt: "can I get D3 to work in this jekyll environ."
tags: [D3]
comments: true
image:
  feature: rainforest.jpg
  credit: Wikimedia Commons
  creditlink: https://commons.wikimedia.org/wiki/File:El_Yunque_panorama.jpg
---

## Exploring patterns of ant occurrence data in AntWeb
Ants are a diverse group with representation in most parts of the globe. I'm interested in using the [AntWeb.org](http://www.antweb.org) API to explore ant populations. My repo at [klevan/antweb](//github.com/klevan/antweb) has the scripts and data summarized in this post. I used `library(XML)`, `library(AntWeb)`, `library(geojsonio)`, `library(dplyr)` and `library(maps)`.

## AntWeb is huge!
As of January 2016, Ant Web has 548,926 specimen records describing the occurrence of 16,223 species/subspecies. In a first pass with their API, I downloaded 318,527 occurrence records on 9,884 species.

    map(database = "world")
    points(antData$decimal_longitude,antData$decimal_latitude,pch=21,bg="turquoise")

![Each point is an ant occurrence record](//klevan.github.io/images/rfigs/antwebMap1.jpeg)
From the distribution of recorded ant sightings, there are some obvious gaps in parts of Asia, equitorial Africa, and the Amazon.








<style>

body {
  background: #fcfcfa;
}

.stroke {
  fill: none;
  stroke: #000;
  stroke-width: 3px;
}

.fill {
  fill: #fff;
}

.graticule {<commit_msg>maps2<commit_after>---
layout: D3-post
title: "Exploring ant biodiversity"
excerpt: "can I get D3 to work in this jekyll environ."
tags: [D3]
comments: true
image:
  feature: rainforest.jpg
  credit: Wikimedia Commons
  creditlink: https://commons.wikimedia.org/wiki/File:El_Yunque_panorama.jpg
---

## Exploring patterns of ant occurrence data in AntWeb
Ants are a diverse group with representation in most parts of the globe. I'm interested in using the [AntWeb.org](http://www.antweb.org) API to explore ant populations. My repo at [klevan/antweb](//github.com/klevan/antweb) has the scripts and data summarized in this post. I used `library(XML)`, `library(AntWeb)`, `library(geojsonio)`, `library(dplyr)` and `library(maps)`.

## AntWeb is huge!
As of January 2016, Ant Web has 548,926 specimen records describing the occurrence of 16,223 species/subspecies. In a first pass with their API, I downloaded 318,527 occurrence records on 9,884 species.

    map(database = "world")
    points(antData$decimal_longitude,antData$decimal_latitude,
           pch=21,bg="turquoise")

![Each point is an ant occurrence record](//klevan.github.io/images/rfigs/antwebMap1.jpeg)
From the distribution of recorded ant sightings, there are some obvious gaps in parts of Asia, equitorial Africa, and the Amazon.








<style>

body {
  background: #fcfcfa;
}

.stroke {
  fill: none;
  stroke: #000;
  stroke-width: 3px;
}

.fill {
  fill: #fff;
}

.graticule {
{'fraction_non_alphanumeric': 0.1082012405237767, 'fraction_numerical': 0.02446588559614059, 'mean_word_length': 4.446529080675422, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2988282', 'n_tokens_mistral': 1022, 'n_tokens_neox': 927, 'n_words': 327}