Created
November 19, 2012 17:45
-
-
Save wboykinm/4112226 to your computer and use it in GitHub Desktop.
DB config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- The application element that contains all other elements. --> | |
<DistrictBuilder> | |
<!-- Define legislative bodies referenced in the system. --> | |
<LegislativeBodies> | |
<!-- A Legislative body has an ID (for referencing in GeoLevel | |
definitions later), a name, and a label for plan items | |
("District" for Council, etc) --> | |
<LegislativeBody id="council" name="Burlington City Council" short_label="%(district_id)s" long_label="Ward %(district_id)s" maxdistricts="7" sort_key="1"/> | |
</LegislativeBodies> | |
<Regions> | |
<Region id="region1" name="region1" label="Council" description="City Council" sort_key="1"> | |
<LegislativeBodies> | |
<LegislativeBody ref="council"/> | |
</LegislativeBodies> | |
<GeoLevels> | |
<GeoLevel ref="block"/> | |
</GeoLevels> | |
</Region> | |
</Regions> | |
<!-- A list of subjects referenced in the system. --> | |
<Subjects> | |
<!-- A Subject is a measurement type, such as "Total Population". | |
The subject is mapped to an attribute during the import phase, | |
and contains a long and short display name. Subjects have IDs | |
for referencing in GeoLevel definitions later. --> | |
<Subject id="poptot" field="P0030001" name="Total Population" | |
short_name="Total Pop." displayed="true" sortkey="1" default="true"/> | |
<!-- You can alias a subject by overriding the field, if the | |
import shapefiles have different field names at different | |
geographic levels. --> | |
<!-- <Subject id="pophisp1" field="POPHISP" aliasfor="pophisp"/> --> | |
</Subjects> | |
<Scoring> | |
<!--barebones--> | |
<ScoreFunctions> | |
<ScoreFunction id="score1" type="district" calculator="publicmapping.redistricting.calculators.Interval" label="Tot Pop"> | |
<SubjectArgument name="subject" ref="poptot"/> | |
<Argument name="target" value="6060" /> | |
<Argument name="bound1" value="0.05"/> | |
<Argument name="bound2" value="0.1"/> | |
</ScoreFunction> | |
<ScoreFunction id="plan_all_blocks_assigned" type="plan" | |
calculator="publicmapping.redistricting.calculators.Interval" | |
label="All Blocks Assigned" | |
description="All blocks in the plan must be assigned."> | |
</ScoreFunction> | |
<!-- A custom calculator to do compactness. --> | |
<ScoreFunction id="district_schwartzberg" type="district" | |
calculator="publicmapping.redistricting.calculators.Schwartzberg" | |
label="Compactness" user_selectable="true"> | |
<LegislativeBody ref="council"/> | |
</ScoreFunction> | |
<!-- A custom calculator to do contiguity, and is boolean. --> | |
<ScoreFunction id="district_contiguous" type="district" | |
calculator="publicmapping.redistricting.calculators.Contiguity" | |
label="Contiguous" user_selectable="true"> | |
<LegislativeBody ref="council"/> | |
</ScoreFunction> | |
</ScoreFunctions> | |
<ScorePanels> | |
<!-- For the sidebar --> | |
<ScorePanel id="panel1" type="district" position="1" title="Panel 1" cssclass="district_demographics wards" template="demographics.html"> | |
<Score ref="score1"/> | |
<Score ref="district_contiguous" /> | |
<Score ref="district_schwatzberg" /> | |
</ScorePanel> | |
<!-- For the leaderboard --> | |
<ScorePanel id="panel_poptot_all" type="plan" position="1" title="Population" template="leaderboard_panel_all.html" is_ascending="false"> | |
<Score ref="score1"/> | |
</ScorePanel> | |
<ScorePanel id="panel_compact_all" type="plan" position="2" title="Schwartzberg" template="leaderboard_panel_all.html" is_ascending="false"> | |
<Score ref="district_schwartzberg"/> | |
</ScorePanel> | |
<ScorePanel id="panel_contiguous_all" type="plan" position="3" title="Contiguity" template="leaderboard_panel_all.html" is_ascending="false"> | |
<Score ref="district_contiguous"/> | |
</ScorePanel> | |
<!-- For the evaluation page --> | |
<ScorePanel id="report_panel_population" type="district" position="1" title="Population" template="report_panel.html" cssclass="reports population" > | |
<Score ref="score1" /> | |
</ScorePanel> | |
<ScorePanel id="report_panel_compactness" type="district" position="2" title="Compactness" template="report_panel.html" cssclass="reports compactness"> | |
<Score ref="district_schwartzberg" /> | |
</ScorePanel> | |
<ScorePanel id="report_panel_contiguous" type="district" position="3" title="Contiguity" template="report_panel.html" cssclass="reports compactness"> | |
<Score ref="district_contiguous" /> | |
</ScorePanel> | |
</ScorePanels> | |
<ScoreDisplays> | |
<!-- For the sidebar --> | |
<ScoreDisplay id="council_sidebar_basic" legislativebodyref="council" type="sidebar" title="Scores"> | |
<ScorePanel ref="panel1" /> | |
</ScoreDisplay> | |
<!-- For the leaderboard --> | |
<ScoreDisplay id="council_leader_all" legislativebodyref="council" type="leaderboard" title="Council Leaderboard - All" cssclass="leaderboard congress"> | |
<ScorePanel ref="panel_poptot_all" /> | |
<ScorePanel ref="panel_compact_all" /> | |
<ScorePanel ref="panel_contiguous_all" /> | |
</ScoreDisplay> | |
<!-- For the evaluation page --> | |
<ScoreDisplay id="council_reports" legislativebodyref="council" type="reports" title="Council Plan Reports" cssclass="reports congress"> | |
<ScorePanel ref="panel_poptot_all" /> | |
<ScorePanel ref="panel_compact_all" /> | |
<ScorePanel ref="panel_contiguous_all" /> | |
</ScoreDisplay> | |
</ScoreDisplays> | |
</Scoring> | |
<Validation> | |
<Criteria legislativebodyref="council"> | |
<Criterion id="council-assigned" name="AllBlocksAssigned - Council" description="Error: Some blocks are still unassigned to wards"> | |
<Score ref="plan_all_blocks_assigned" /> | |
</Criterion> | |
</Criteria> | |
</Validation> | |
<GeoLevels> | |
<GeoLevel id="block" name="block" label="wards" min_zoom="8" sort_key="3" tolerance="2.5"> | |
<!-- | |
You may use EITHER the "Shapefile" or "Files" element as a child | |
of geolevel to define the geography and attributes. The | |
"Shapefile" element must contain both the geography and | |
attributes, whereas the "Files" element contains an item for the | |
geography, and multiple items for the attributes. | |
This is in anticipation of loading data that has been downloaded | |
directly from the American Fact Finder web application hosted by | |
the US Census Beureau. | |
--> | |
<Shapefile path="/projects/DistrictBuilder/data/btv_blocks.shp"> | |
<Fields> | |
<!-- | |
Each Field item defines a field in the shapefile that | |
describes a different part of the geographic unit. | |
A "name" type field is used to display the name of the | |
geographic unit. | |
A "portable" type field is used to store the FIPS/GEOID | |
of the geographic unit, which is shared with other GIS | |
systems. | |
A "tree" type field is used to store information about | |
the geography, and where it resides in the tree. This type | |
of field requires a "pos" attribute, which declares which | |
position in the tree the field belongs (starting at 0); | |
a "width" attribute is also required to declare how wide | |
this portion of the tree code is. This is helpful when | |
the treecode may not be zero padded. | |
--> | |
<Field name="GEOID" type="name"/> | |
<Field name="GEOID" type="portable"/> | |
<Field name="GEOID" type="tree" pos="3" width="14"/> | |
</Fields> | |
</Shapefile> | |
<!-- | |
A reference to a legislative body. A geolevel may be used by | |
many legislative bodies. | |
--> | |
</GeoLevel> | |
<!-- | |
A child geolevel. The geography of the parent geolevel must | |
be coincident in its child. | |
--> | |
</GeoLevels> | |
<!-- | |
This element facilitates the creation of system templates. A | |
system template is a plan owned by the admin user, that all other | |
users can create derivative plans from. | |
--> | |
<Templates> | |
<Template name="Council"> | |
<!-- A reference to a legislative body. --> | |
<LegislativeBody ref="council"/> | |
<!-- | |
The path to the district index file. The index file must be | |
a two column CSV file, with each row corresponding to 1) a | |
unit of geography, and 2) the district it belongs to. | |
--> | |
<Blockfile path="/projects/DistrictBuilder/data/btv_index.csv" /> | |
<Blockfile path="/projects/DistrictBuilder/data/btv_index_2000.csv" /> | |
</Template> | |
</Templates> | |
<!-- | |
Configuration settings for the components of the application. The | |
"root" attribute defines the location in the file system, under | |
which the rest of the application components can be found. | |
--> | |
<Project root="/projects/DistrictBuilder" sessionquota="5" sessiontimeout="15" temp="/projects/Districtbuilder/temp"> | |
<!-- | |
Database connection information. | |
If you change the user to something different than | |
'publicmapping', you will have to define a schema in | |
postgresql by the same name as the user. | |
The 'host' attribute is optional. | |
--> | |
<Database name="publicmapping3" user="publicmapping" password="snupipo05" host="localhost"/> | |
<!-- | |
Administrative user information. This will create an administrative | |
superuser in django with these credentials. | |
--> | |
<Internationalization timezone="US/Eastern" default="en"> | |
<Language code="en" label="English"/> | |
</Internationalization> | |
<Admin user="admin" email="vtcraghead@gmail.com" password="Queencity1"/> | |
<!-- Configuration items specific to the redistricting app. --> | |
<Redistricting> | |
<!-- | |
Information about the mapserver and geoserver settings. | |
The "basemaps" attribute is optional, and can be any set to | |
any combination (CSV) of the following: | |
osm-road | |
google-road | |
google-aerial | |
google-hybrid | |
bing-road | |
bing-aerial | |
bing-hybrid | |
The options are displayed in the order in which they are set, | |
with the first one being set to the default base layer. If | |
this is not set, it will default to osm-road. If the desire | |
is to have no base layer, set it to the empty string. | |
--> | |
<MapServer hostname="ec2-23-20-163-79.compute-1.amazonaws.com" ns="gmu" nshref="http://gmu.azavea.com/" | |
adminuser="admin" adminpass="admin" maxfeatures="100" | |
styles="/projects/publicmapping/trunk/sld/sld2" basemaps="bing-hybrid"/> | |
<!-- | |
Use a GoogleAnalytics account to tract the usage of the | |
application. This requires an account and domain. | |
<GoogleAnalytics account="" domain=""/> | |
--> | |
<!-- Upload file size restrictions. This is in KB --> | |
<Upload maxsize="5300"/> | |
</Redistricting> | |
<!-- | |
Configure the engine used for reporting. Currently, BARD is the | |
only supported reporting engine. | |
--> | |
<Reporting> | |
<!--<BardBodyConfigs> | |
<BardBodyConfig | |
id="council_blocks" | |
legislativebodyref="council" | |
bardconfigref="blocks" /> | |
</BardBodyConfigs>--> | |
</Reporting> | |
<!-- Information about the mailer configuration. --> | |
<Mailer server="localhost" port="25" username="" password=""/> | |
</Project> | |
</DistrictBuilder> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment