Skip to content

Instantly share code, notes, and snippets.

View wboykinm's full-sized avatar

Bill Morris wboykinm

View GitHub Profile
@wboykinm
wboykinm / config.xml
Created October 11, 2012 16:10
score panels
<ScorePanels>
<!-- For the sidebar -->
<ScorePanel id="panel1" type="district" position="1" title="Panel 1" cssclass="district_demographics wards" template="demographics.html">
<Score ref="score1"/>
</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>
@wboykinm
wboykinm / config.xml
Created October 11, 2012 17:03
score displays
<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" />
@wboykinm
wboykinm / config.xml
Created October 11, 2012 17:06
db validation
<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>
@wboykinm
wboykinm / wards.sld
Created October 11, 2012 18:27
wards
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Default Polygon</Name>
<UserStyle>
<Title>Default polygon style</Title>
<Abstract>A sample style that just draws out a solid gray interior with a black 1px outline</Abstract>
<FeatureTypeStyle>
@wboykinm
wboykinm / config.xml
Created October 12, 2012 13:30
DB config as of 10/12/12
<!-- 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>
@wboykinm
wboykinm / celeryd.log
Created October 12, 2012 14:18
Celerylog
[2011-04-21 22:34:47,382: WARNING/MainProcess] celery@ip-10-118-182-207 v2.1.4 is starting.
[2011-04-21 22:34:47,390: WARNING/MainProcess] Configuration ->
. broker -> ghettoq.taproot.Database://guest@localhost/
. queues ->
. celery -> exchange:celery (direct) binding:celery
. concurrency -> 4
. loader -> djcelery.loaders.DjangoLoader
. logfile -> /var/log/celeryd.log@INFO
. events -> OFF
. beat -> OFF
@wboykinm
wboykinm / celeryd.log
Created October 12, 2012 14:30
debug true log
[2012-09-19 15:10:52,141: WARNING/MainProcess] Configuration ->
. broker -> ghettoq.taproot.Database://guest@localhost/
. queues ->
. celery -> exchange:celery (direct) binding:celery
. concurrency -> 2
. loader -> djcelery.loaders.DjangoLoader
. logfile -> /var/log/celeryd.log@INFO
. events -> OFF
. beat -> OFF
. tasks ->
@wboykinm
wboykinm / celeryd.log
Created October 12, 2012 15:04
updated celery log
[2012-10-12 11:01:16,387: WARNING/MainProcess] Stale pidfile exists. Removing it.
[2012-10-12 11:01:16,516: WARNING/MainProcess] [email protected] has started.
[2012-10-12 11:01:18,259: WARNING/PoolWorker-2] /usr/local/lib/python2.6/dist-packages/django/utils/translation/__init__.py:63: DeprecationWarning: Translations in the project directory aren't supported anymore. Use the LOCALE_PATHS setting instead.
DeprecationWarning)
[2012-10-12 11:01:18,681: WARNING/PoolWorker-2] /usr/local/lib/python2.6/dist-packages/djcelery/loaders.py:116: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
warnings.warn("Using settings.DEBUG leads to a memory leak, never "
@wboykinm
wboykinm / hoods1.js
Created October 24, 2012 02:18
BTVHoods population 1
<script src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js" type="text/javascript"> {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AsDSuiodUlFIdEU3OVpPOXhIVWNyakhVTzJNSG9wdGc&transpose=0&headers=1&range=A1%3AB10&gid=1&pub=1","options":{"vAxes":[{"useFormatFromData":true,"minValue":null,"viewWindowMode":null,"viewWindow":null,"maxValue":null},{"useFormatFromData":true}],"titleTextStyle":{"bold":true,"color":"#000","fontSize":16},"series":{"0":{"errorBars":{"errorType":"none"},"color":"#1155cc"}},"fontName":"Sans Serif","booleanRole":"certainty","title":"BTV Major Neighborhood Populations (2010)","animation":{"duration":500},"backgroundColor":{"fill":"#ffffff"},"domainAxis":{"direction":1},"legend":"none","hAxis":{"title":"Population (US Census, 2010)","useFormatFromData":true,"minorGridlines":{"count":"10"},"minValue":null,"viewWindowMode":"explicit","gridlines":{"count":"5"},"logScale":false,"viewWindow":{"min":null,"max":13000},"maxValue":13000},"isStacked":false,"width":670,"height":3
@wboykinm
wboykinm / hoods2.js
Created October 24, 2012 02:20
BTVHoods population 2
<script src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js" type="text/javascript"> {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AsDSuiodUlFIdEU3OVpPOXhIVWNyakhVTzJNSG9wdGc&transpose=0&headers=1&range=A1%3AB6&gid=5&pub=1","options":{"titleTextStyle":{"bold":true,"color":"#000","fontSize":16},"vAxes":[{"useFormatFromData":true,"minValue":null,"viewWindowMode":null,"viewWindow":null,"maxValue":null},{"useFormatFromData":true}],"series":{"0":{"errorBars":{"errorType":"none"},"color":"#6fa8dc"}},"title":"BTV Minor Neighborhood Populations (2010)","booleanRole":"certainty","fontName":"Sans Serif","animation":{"duration":500},"domainAxis":{"direction":1},"backgroundColor":{"fill":"#ffffff"},"legend":"none","hAxis":{"useFormatFromData":true,"title":"Population (US Census, 2010)","minorGridlines":{"count":"10"},"minValue":null,"viewWindowMode":"explicit","viewWindow":{"min":null,"max":1000},"logScale":false,"gridlines":{"count":"5"},"maxValue":1000},"isStacked":false,"width":670,"height":348}