aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2023-05-22 15:38:30 -0500
committerChristian Cleberg <hello@cleberg.net>2023-05-22 15:38:30 -0500
commit3bde7dc1034e1fd836bbc72a1c4237f3fe53ffa2 (patch)
treeb421580590ea17f14b0f350a7e41f6d28df4ce1e /index.html
downloadworld-incarceration-3bde7dc1034e1fd836bbc72a1c4237f3fe53ffa2.tar.gz
world-incarceration-3bde7dc1034e1fd836bbc72a1c4237f3fe53ffa2.tar.bz2
world-incarceration-3bde7dc1034e1fd836bbc72a1c4237f3fe53ffa2.zip
initial commit
Diffstat (limited to 'index.html')
-rw-r--r--index.html462
1 files changed, 462 insertions, 0 deletions
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..fe38876
--- /dev/null
+++ b/index.html
@@ -0,0 +1,462 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>World Incarceration</title>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta
+ name="description"
+ content="An interactive world map of incarceration statistics with optional choropleth overlays. Explore the map, compare countries, and dive into the source data."
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="57x57"
+ href="./assets/images/icons/apple-icon-57x57.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="60x60"
+ href="./assets/images/icons/apple-icon-60x60.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="72x72"
+ href="./assets/images/icons/apple-icon-72x72.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="76x76"
+ href="./assets/images/icons/apple-icon-76x76.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="114x114"
+ href="./assets/images/icons/apple-icon-114x114.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="120x120"
+ href="./assets/images/icons/apple-icon-120x120.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="144x144"
+ href="./assets/images/icons/apple-icon-144x144.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="152x152"
+ href="./assets/images/icons/apple-icon-152x152.png"
+ />
+ <link
+ rel="apple-touch-icon"
+ sizes="180x180"
+ href="./assets/images/icons/apple-icon-180x180.png"
+ />
+ <link
+ rel="icon"
+ type="image/png"
+ sizes="192x192"
+ href="./assets/images/icons/android-icon-192x192.png"
+ />
+ <link
+ rel="icon"
+ type="image/png"
+ sizes="32x32"
+ href="./assets/images/icons/favicon-32x32.png"
+ />
+ <link
+ rel="icon"
+ type="image/png"
+ sizes="96x96"
+ href="./assets/images/icons/favicon-96x96.png"
+ />
+ <link
+ rel="icon"
+ type="image/png"
+ sizes="16x16"
+ href="./assets/images/icons/favicon-16x16.png"
+ />
+ <link rel="manifest" href="./assets/images/icons/manifest.json" />
+ <meta name="msapplication-TileColor" content="#ffffff" />
+ <meta
+ name="msapplication-TileImage"
+ content="./assets/images/icons/ms-icon-144x144.png"
+ />
+ <meta name="theme-color" content="#ffffff" />
+ <link rel="stylesheet" href="./assets/css/bootstrap-5.0.0.min.css" />
+ <link rel="stylesheet" href="./assets/css/fontawesome-5.1.10.min.css" />
+ <link rel="stylesheet" href="./assets/css/app.css" />
+ </head>
+
+ <body>
+ <!-- navbar -->
+ <nav class="navbar navbar-expand-lg navbar-dark">
+ <div class="container-fluid">
+ <a class="navbar-brand mx-2" href="./">World Incarceration</a>
+ <button
+ class="navbar-toggler"
+ type="button"
+ data-bs-toggle="collapse"
+ data-bs-target="#navbarSupportedContent"
+ aria-controls="navbarSupportedContent"
+ aria-expanded="false"
+ aria-label="Toggle navigation"
+ >
+ <span class="navbar-toggler-icon"></span>
+ </button>
+ <div
+ class="collapse navbar-collapse"
+ id="navbarSupportedContent"
+ >
+ <ul class="navbar-nav ms-auto me-0 mb-2 mb-lg-0">
+ <li class="nav-item dropdown">
+ <button
+ class="btn btn-warning"
+ data-toggle="dropdown"
+ role="button"
+ aria-haspopup="true"
+ aria-expanded="false"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ >
+ <path
+ id="settings-icon"
+ d="M24 14.187v-4.374c-2.148-.766-2.726-.802-3.027-1.529-.303-.729.083-1.169 1.059-3.223l-3.093-3.093c-2.026.963-2.488 1.364-3.224 1.059-.727-.302-.768-.889-1.527-3.027h-4.375c-.764 2.144-.8 2.725-1.529 3.027-.752.313-1.203-.1-3.223-1.059l-3.093 3.093c.977 2.055 1.362 2.493 1.059 3.224-.302.727-.881.764-3.027 1.528v4.375c2.139.76 2.725.8 3.027 1.528.304.734-.081 1.167-1.059 3.223l3.093 3.093c1.999-.95 2.47-1.373 3.223-1.059.728.302.764.88 1.529 3.027h4.374c.758-2.131.799-2.723 1.537-3.031.745-.308 1.186.099 3.215 1.062l3.093-3.093c-.975-2.05-1.362-2.492-1.059-3.223.3-.726.88-.763 3.027-1.528zm-4.875.764c-.577 1.394-.068 2.458.488 3.578l-1.084 1.084c-1.093-.543-2.161-1.076-3.573-.49-1.396.581-1.79 1.693-2.188 2.877h-1.534c-.398-1.185-.791-2.297-2.183-2.875-1.419-.588-2.507-.045-3.579.488l-1.083-1.084c.557-1.118 1.066-2.18.487-3.58-.579-1.391-1.691-1.784-2.876-2.182v-1.533c1.185-.398 2.297-.791 2.875-2.184.578-1.394.068-2.459-.488-3.579l1.084-1.084c1.082.538 2.162 1.077 3.58.488 1.392-.577 1.785-1.69 2.183-2.875h1.534c.398 1.185.792 2.297 2.184 2.875 1.419.588 2.506.045 3.579-.488l1.084 1.084c-.556 1.121-1.065 2.187-.488 3.58.577 1.391 1.689 1.784 2.875 2.183v1.534c-1.188.398-2.302.791-2.877 2.183zm-7.125-5.951c1.654 0 3 1.346 3 3s-1.346 3-3 3-3-1.346-3-3 1.346-3 3-3zm0-2c-2.762 0-5 2.238-5 5s2.238 5 5 5 5-2.238 5-5-2.238-5-5-5z"
+ />
+ </svg>
+ </button>
+ <div class="dropdown-menu">
+ <a
+ class="dropdown-item"
+ href="#"
+ onclick="countryLabels()"
+ >Labels</a
+ >
+ <a
+ class="dropdown-item"
+ href="#"
+ onclick="reset()"
+ >Reset Map</a
+ >
+ </div>
+ </li>
+ <li class="nav-item">
+ <button
+ id="gradientbtn"
+ type="button"
+ class="btn selected"
+ data-toggle="collapse"
+ data-target="#gbar"
+ title="Gradient Maps"
+ onclick="gradientPrep()"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M13.144 8.171c-.035-.066.342-.102.409-.102.074.009-.196.452-.409.102zm-2.152-3.072l.108-.031c.064.055-.072.095-.051.136.086.155.021.248.008.332-.014.085-.104.048-.149.093-.053.066.258.075.262.085.011.033-.375.089-.304.171.096.136.824-.195.708-.176.225-.113.029-.125-.097-.19-.043-.215-.079-.547-.213-.68l.088-.102c-.206-.299-.36.362-.36.362zm13.008 6.901c0 6.627-5.373 12-12 12-6.628 0-12-5.373-12-12s5.372-12 12-12c6.627 0 12 5.373 12 12zm-8.31-5.371c-.006-.146-.19-.284-.382-.031-.135.174-.111.439-.184.557-.104.175.567.339.567.174.025-.277.732-.063.87-.025.248.069.643-.226.211-.381-.355-.13-.542-.269-.574-.523 0 0 .188-.176.106-.166-.218.027-.614.786-.614.395zm6.296 5.371c0-1.035-.177-2.08-.357-2.632-.058-.174-.189-.312-.359-.378-.256-.1-1.337.597-1.5.254-.107-.229-.324.146-.572.008-.12-.066-.454-.515-.605-.46-.309.111.474.964.688 1.076.201-.152.852-.465.992-.038.268.804-.737 1.685-1.251 2.149-.768.694-.624-.449-1.147-.852-.275-.211-.272-.66-.55-.815-.124-.07-.693-.725-.688-.813l-.017.166c-.094.071-.294-.268-.315-.321 0 .295.48.765.639 1.001.271.405.416.995.748 1.326.178.178.858.914 1.035.898.193-.017.803-.458.911-.433.644.152-1.516 3.205-1.721 3.583-.169.317.138 1.101.113 1.476-.029.433-.37.573-.693.809-.346.253-.265.745-.556.925-.517.318-.889 1.353-1.623 1.348-.216-.001-1.14.36-1.261.007-.094-.256-.22-.45-.353-.703-.13-.248-.015-.505-.173-.724-.109-.152-.475-.497-.508-.677-.002-.155.117-.626.28-.708.229-.117.044-.458.016-.656-.048-.354-.267-.646-.53-.851-.389-.299-.188-.537-.097-.964 0-.204-.124-.472-.398-.392-.564.164-.393-.44-.804-.413-.296.021-.538.209-.813.292-.346.104-.7-.082-1.042-.125-1.407-.178-1.866-1.786-1.499-2.946.037-.19-.114-.542-.048-.689.158-.352.48-.747.762-1.014.158-.15.361-.112.547-.229.287-.181.291-.553.572-.781.4-.325.946-.318 1.468-.388.278-.037 1.336-.266 1.503-.06 0 .038.191.604-.019.572.433.023 1.05.749 1.461.579.211-.088.134-.736.567-.423.262.188 1.436.272 1.68.069.15-.124.234-.93.052-1.021.116.115-.611.124-.679.098-.12-.044-.232.114-.425.025.116.055-.646-.354-.218-.667-.179.131-.346-.037-.539.107-.133.108.062.18-.128.274-.302.153-.53-.525-.644-.602-.116-.076-1.014-.706-.77-.295l.789.785c-.039.025-.207-.286-.207-.059.053-.135.02.579-.104.347-.055-.089.09-.139.006-.268 0-.085-.228-.168-.272-.226-.125-.155-.457-.497-.637-.579-.05-.023-.764.087-.824.11-.07.098-.13.201-.179.311-.148.055-.287.126-.419.214l-.157.353c-.068.061-.765.291-.769.3.029-.075-.487-.171-.453-.321.038-.165.213-.68.168-.868-.048-.197 1.074.284 1.146-.235.029-.225.046-.487-.313-.525.068.008.695-.246.799-.36.146-.168.481-.442.724-.442.284 0 .223-.413.354-.615.131.053-.07.376.087.507-.01-.103.445.057.489.033.104-.054.684-.022.594-.294-.1-.277.051-.195.181-.253-.022.009.34-.619.402-.413-.043-.212-.421.074-.553.063-.305-.024-.176-.52-.061-.665.089-.115-.243-.256-.247-.036-.006.329-.312.627-.241 1.064.108.659-.735-.159-.809-.114-.28.17-.509-.214-.364-.444.148-.235.505-.224.652-.476.104-.178.225-.385.385-.52.535-.449.683-.09 1.216-.041.521.048.176.124.104.324-.069.19.286.258.409.099.07-.092.229-.323.298-.494.089-.222.901-.197.334-.536-.374-.223-2.004-.672-3.096-.672-.236 0-.401.263-.581.412-.356.295-1.268.874-1.775.698-.519-.179-1.63.66-1.808.666-.065.004.004-.634.358-.681-.153.023 1.247-.707 1.209-.859-.046-.18-2.799.822-2.676 1.023.059.092.299.092-.016.294-.18.109-.372.801-.541.801-.505.221-.537-.435-1.099.409l-.894.36c-1.328 1.411-2.247 3.198-2.58 5.183-.013.079.334.226.379.28.112.134.112.712.167.901.138.478.479.744.74 1.179.154.259.41.914.329 1.186.108-.178 1.07.815 1.246 1.022.414.487.733 1.077.061 1.559-.217.156.33 1.129.048 1.368l-.361.093c-.356.219-.195.756.021.982 1.818 1.901 4.38 3.087 7.22 3.087 5.517 0 9.989-4.472 9.989-9.989zm-11.507-6.357c.125-.055.293-.053.311-.22.015-.148.044-.046.08-.1.035-.053-.067-.138-.11-.146-.064-.014-.108.069-.149.104l-.072.019-.068.087.008.048-.087.106c-.085.084.002.139.087.102z"
+ />
+ </svg>
+ </button>
+ </li>
+ <li class="nav-item" data-toggle="modal">
+ <button
+ id="comparebtn"
+ type="button"
+ class="btn btn-success text-white"
+ data-toggle="tooltip"
+ data-placement="bottom"
+ title="Compare"
+ onclick="compare()"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M6 11v-4l-6 5 6 5v-4h12v4l6-5-6-5v4z"
+ />
+ </svg>
+ </button>
+ </li>
+ <li
+ class="nav-item"
+ data-toggle="modal"
+ data-target="#graphModal"
+ >
+ <button
+ id="graphsbtn"
+ type="button"
+ class="btn btn-secondary text-dark"
+ data-toggle="tooltip"
+ data-placement="bottom"
+ title="Graphs"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M13.012 5.007v-1.668l2.802-2.771c.409.136.809.293 1.197.471l-3.999 3.968zm7.089-1.93l-7.089 7.058v.853h.877l7.044-7.076c-.263-.292-.541-.57-.832-.835zm-7.089-1.468l1.437-1.406c-.46-.094-.96-.163-1.437-.203v1.609zm10.789 7.962l-1.386 1.417h1.585c-.04-.47-.106-.964-.199-1.417zm-.363-1.366c-.135-.41-.292-.81-.469-1.199l-3.951 3.982h1.668l2.752-2.783zm-1.063-2.337c-.205-.346-.426-.682-.664-1.004l-6.093 6.124h1.668l5.089-5.12zm-3.225-3.57c-.322-.238-.657-.459-1.003-.665l-5.135 5.104v1.668l6.138-6.107zm-8.15 10.702v-13c-6.161.519-11 5.683-11 11.978 0 6.639 5.382 12.022 12.021 12.022 6.296 0 11.46-4.839 11.979-11h-13z"
+ />
+ </svg>
+ </button>
+ </li>
+ <li
+ class="nav-item"
+ data-toggle="modal"
+ data-target="#infoModal"
+ >
+ <button
+ id="infobtn"
+ type="button"
+ class="btn btn-primary text-white"
+ data-toggle="tooltip"
+ data-placement="bottom"
+ title="Information"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M13.25 7c0 .69-.56 1.25-1.25 1.25s-1.25-.56-1.25-1.25.56-1.25 1.25-1.25 1.25.56 1.25 1.25zm10.75 5c0 6.627-5.373 12-12 12s-12-5.373-12-12 5.373-12 12-12 12 5.373 12 12zm-2 0c0-5.514-4.486-10-10-10s-10 4.486-10 10 4.486 10 10 10 10-4.486 10-10zm-13-2v2h2v6h2v-8h-4z"
+ />
+ </svg>
+ </button>
+ </li>
+ <li
+ class="nav-item"
+ data-toggle="modal"
+ data-target="#alertModal"
+ >
+ <button
+ id="alertbtn"
+ type="button"
+ class="btn btn-danger text-white"
+ data-toggle="tooltip"
+ data-placement="bottom"
+ title="Precautions"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ >
+ <path
+ d="M12 5.177l8.631 15.823h-17.262l8.631-15.823zm0-4.177l-12 22h24l-12-22zm-1 9h2v6h-2v-6zm1 9.75c-.689 0-1.25-.56-1.25-1.25s.561-1.25 1.25-1.25 1.25.56 1.25 1.25-.561 1.25-1.25 1.25z"
+ />
+ </svg>
+ </button>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+
+ <!-- gradient bar menu -->
+ <nav id="gbar" class="collapse-navbar collapse">
+ <div class="d-flex flex-row-reverse">
+ <button
+ id="totPop"
+ type="button"
+ class="btn selected"
+ data-toggle="tooltip"
+ title="Total Prison Populations"
+ onclick="gradient(0)"
+ >
+ Total Prison Population
+ </button>
+ <button
+ id="perCapita"
+ type="button"
+ class="btn"
+ data-toggle="tooltip"
+ title="Prisoners Per Capita"
+ onclick="gradient(1)"
+ >
+ Prisoners Per Capita
+ </button>
+ <button
+ id="women"
+ type="button"
+ class="btn"
+ data-toggle="tooltip"
+ title="Percent Women Imprisoned"
+ onclick="gradient(2)"
+ >
+ Percent Women Imprisoned
+ </button>
+ <button
+ id="juveniles"
+ type="button"
+ class="btn"
+ data-toggle="tooltip"
+ title="Percent Juveniles Imprisoned"
+ onclick="gradient(3)"
+ >
+ Percent Juveniles Imprisoned
+ </button>
+ <button
+ id="occupancy"
+ type="button"
+ class="btn"
+ data-toggle="tooltip"
+ title="Prison Occupancy Level"
+ onclick="gradient(4)"
+ >
+ Prison Occupancy Level
+ </button>
+ </div>
+ </nav>
+
+ <!-- infomation modal -->
+ <div class="modal fade" id="infoModal" role="dialog">
+ <div class="modal-dialog modal-lg">
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header bg-primary">
+ <h4 class="modal-title">Information</h4>
+ </div>
+ <div class="modal-body">
+ <p>
+ Hover over any country to view its name and click to
+ see its statistics!
+ </p>
+ <p>
+ To reset the map, please click the
+ <b>Reset Map</b> button.
+ </p>
+ <p>
+ If you'd like to compare two countries' statistics,
+ please use the <b>Compare</b> button.
+ </p>
+ <p>
+ If you are wondering how to go back to the pie chart
+ in the <b>Graphs</b> modal: all you have to do is
+ click on the line and it will return to the pie
+ chart!
+ </p>
+ <hr />
+ <p><b>References:</b></p>
+ <div class="row">
+ <div class="col-sm-6">
+ <a
+ class="btn btn-primary w-100"
+ href="http://www.prisonstudies.org"
+ target="_blank"
+ >World Prison Brief</a
+ >
+ </div>
+ <div class="col-sm-6">
+ <a
+ class="btn btn-primary w-100"
+ href="https://en.wikipedia.org/wiki/List_of_countries_by_system_of_government"
+ target="_blank"
+ >Wikipedia</a
+ >
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button
+ type="button"
+ class="btn btn-outline-primary"
+ data-dismiss="modal"
+ >
+ Close
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- alert modal -->
+ <div class="modal fade" id="alertModal" role="dialog">
+ <div class="modal-dialog modal-lg">
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header bg-danger">
+ <h4 class="modal-title">Precautions</h4>
+ </div>
+ <div class="modal-body">
+ <p>
+ If any part of this site is inaccurate or confusing,
+ <a class="text-danger" href="#"
+ >send me an email</a
+ >!
+ </p>
+ </div>
+ <div class="modal-footer">
+ <button
+ type="button"
+ class="btn btn-outline-danger"
+ data-dismiss="modal"
+ >
+ Close
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- graph modal -->
+ <div class="modal fade" id="graphModal" role="dialog">
+ <div class="modal-dialog modal-lg">
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header bg-secondary text-dark">
+ <h4 class="modal-title">Top Five Prison Populations</h4>
+ </div>
+ <div class="modal-body">
+ <div id="myChart2"></div>
+ <div id="myNextChart"></div>
+ </div>
+ <div class="modal-footer">
+ <button
+ type="button"
+ class="btn btn-primary"
+ data-dismiss="modal"
+ onclick="graphInfoBtn()"
+ >
+ Help!
+ </button>
+ <button
+ type="button"
+ class="btn btn-secondary"
+ data-dismiss="modal"
+ >
+ Close
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- map area -->
+ <div id="myChart"></div>
+
+ <!-- js -->
+ <script src="./assets/js/jquery-3.5.1.min.js"></script>
+ <script src="./assets/js/bootstrap.bundle.min.js"></script>
+ <script src="./assets/js/zingchart-2.9.2.min.js"></script>
+ <script src="./assets/js/zingchart-maps-2.9.2.min.js"></script>
+ <script src="./assets/js/zingchart-maps-world-countries-2.9.2.min.js"></script>
+ <script src="./assets/js/app.js"></script>
+ </body>
+</html>