<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="popdat (“population data”) generates `Scenarios` given a map and some external census data. Some of this functionality should maybe be reorganized or incorporated into the importer crate, but for now, it’s convenient to organize it here."><metaname="keywords"content="rust, rustlang, rust-lang, popdat"><title>popdat - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptsrc="../crates.js"></script><scriptdefersrc="../main.js"></script>
<noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../favicon.svg"></head><bodyclass="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu"role="button">☰</div><aclass="sidebar-logo"href="../popdat/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.png"alt="logo"></div>
</a><h2class="location">Crate popdat</h2><divclass="block version"><divclass="narrow-helper"></div><p>Version 0.1.0</p></div><divclass="sidebar-elems"><aid="all-types"href="all.html"><p>See all popdat's items</p></a><divclass="block items"><ul><li><ahref="#modules">Modules</a></li><li><ahref="#structs">Structs</a></li><li><ahref="#enums">Enums</a></li><li><ahref="#functions">Functions</a></li></ul></div><divid="sidebar-vars"data-name="popdat"data-ty="mod"data-relpath=""></div><scriptdefersrc="sidebar-items.js"></script></div></nav><main><divclass="width-limiter"><divclass="sub-container"><aclass="sub-logo-container"href="../popdat/index.html"><imgclass="rust-logo"src="../rust-logo.png"alt="logo"></a><navclass="sub"><divclass="theme-picker"><buttonid="theme-picker"aria-label="Pick another theme!"aria-haspopup="menu"title="themes"><imgwidth="18"height="18"alt="Pick another theme!"src="../brush.svg"></button><divid="theme-choices"role="menu"></div></div><formclass="search-form"><divclass="search-container"><div><selectid="crate-search"><optionvalue="All crates">All crates</option></select><inputclass="search-input"name="search"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"></div><buttontype="button"id="help-button"title="help">?</button><aid="settings-menu"href="../settings.html"title="settings"><imgwidth="18"height="18"alt="Change settings"src="../wheel.svg"></a></div></form></nav></div><sectionid="main-content"class="content"><h1class="fqn"><spanclass="in-band">Crate <aclass="mod"href="#">popdat</a><buttonid="copy-path"onclick="copy_path(this)"title="Copy item path to clipboard"><imgsrc="../clipboard.svg"width="19"height="18"alt="Copy item path"></button></span><spanclass="out-of-band"><spanid="render-detail"><aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass="inner">−</span>]</a></span><aclass="srclink"href="../src/popdat/lib.rs.html#1-133"title="goto source code">[src]</a></span></h1><detailsclass="rustdoc-toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>popdat (“population data”) generates <code>Scenarios</code> given a map and some external census data.
<divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="activities/index.html"title="popdat::activities mod">activities</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="distribute_people/index.html"title="popdat::distribute_people mod">distribute_people</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="import_census/index.html"title="popdat::import_census mod">import_census</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="make_person/index.html"title="popdat::make_person mod">make_person</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="od/index.html"title="popdat::od mod">od</a></div><divclass="item-right docblock-short"><p>This is a standalone pipeline for generating a Scenario, starting from origin-destination data
(also called desire lines), which gives a count of commuters between two zones, breaking down
<divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.CensusArea.html"title="popdat::CensusArea struct">CensusArea</a></div><divclass="item-right docblock-short"><p>Represents aggregate demographic data for some part of a city. These could be census tracts or
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.CensusPerson.html"title="popdat::CensusPerson struct">CensusPerson</a></div><divclass="item-right docblock-short"><p>Demographic information for a single person</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Config.html"title="popdat::Config struct">Config</a></div><divclass="item-right docblock-short"><p>Any arbitrarily chosen parameters needed should be put here, so they can be controlled from the
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Schedule.html"title="popdat::Schedule struct">Schedule</a></div><divclass="item-right docblock-short"><p>A single person’s daily schedule. It’s assumed that someone always starts at home. And for most
<divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="enum"href="enum.Activity.html"title="popdat::Activity enum">Activity</a></div><divclass="item-right docblock-short"><p>Different things people might do in the day. Maybe it’s more clear to call this a
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="enum"href="enum.PersonType.html"title="popdat::PersonType enum">PersonType</a></div><divclass="item-right docblock-short"><p>It might be useful to classify a CensusPerson into different categories to figure out their
<divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.distribute_population_to_homes.html"title="popdat::distribute_population_to_homes fn">distribute_population_to_homes</a></div><divclass="item-right docblock-short"><p>Starting from some number of total people living in a polygonal area, randomly distribute them
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.generate_scenario.html"title="popdat::generate_scenario fn">generate_scenario</a></div><divclass="item-right docblock-short"><p>Wires together all the pieces, so you can just hand this any map, and it’ll automatically find