Skip to content

Commit

Permalink
ready to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon McClure committed Dec 12, 2017
1 parent 7271fa3 commit 032ae64
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 44 deletions.
2 changes: 1 addition & 1 deletion theshow/staticapp/src/js/race-app/containers/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const App = (props) => {
</div>
) : (
<div className="content-extra-large too-few-results">
<p>Check back soon for more results, maps and live analysis!</p>
<p>Check back after polls close for results, maps and live analysis!</p>
</div>
);

Expand Down
8 changes: 4 additions & 4 deletions theshow/staticapp/src/js/race-app/containers/ScatterPlots.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const ScatterPlots = (props) => {
variable: 'B15003',
data_key: 'college_educated',
trendX: 'educated',
title: 'College educated population',
title: 'College-educated population',
accessor: d => d.college_educated / d.total,
},
{
variable: 'B19001',
data_key: 'middle_class',
trendX: 'middle class',
title: 'Middle class population',
title: 'Middle-class population',
accessor: d => d.middle_class / d.total,
},
{
Expand Down Expand Up @@ -68,7 +68,7 @@ const ScatterPlots = (props) => {
note="
These charts show the relationship between the percentage of the population in
each county that identifies
with a demographic characteristic (minority, college-educated, etc.) and
with a demographic characteristic (minority, college educated, etc.) and
the split of that county&rsquo;s vote
between the Democratic and Republican candidate (GOP 45% - Dem. 40% = GOP +5).
The relationship with party vote shows the value of the&nbsp;
Expand All @@ -82,7 +82,7 @@ const ScatterPlots = (props) => {
come from the latest U.S. Census American Community Survey. We use total
population estimates as a proxy for the voting-age population that actually
turns out on Election Day, so, political strategists, take these stats
with a pinch of salt. 😊 🇺🇸
with a pinch of salt. 😊
"
/>
<div className="clear" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ const SwingChartContainer = props => (
<div>
<NerdBox
note="
Vote percents represent the head-to-head vote split between only Democrats and Republicans
and don&rsquo;t include third party votes. So, for example, Dem. votes /
(Dem. votes + GOP votes) = Dem. percent.
Vote margins represent the head-to-head vote split between only Democrats and Republicans
and don&rsquo;t include third-party votes. So, for example, GOP 45% - Dem. 40% = GOP +5.
"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions theshow/staticapp/src/js/race-app/containers/TurnoutTrend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TurnoutChartContainer = props => props.hidden ? null : (
<h4>How to read this chart</h4>
<div className="float-left left">
<p>
This chart measures the change in the number of votes cast between the 2016 presidential election and this one. We compare that change with the same shift in the head-to-head vote split. Look for counties further in the corners of the chart. They are areas where a change in turnout different from most counties overwhelming benefited one party.
This chart measures the change in the number of votes cast between the 2016 presidential election and this one. We compare that change with the same shift in the head-to-head vote split. Look for counties further in the corners of the chart. They are areas where a change in turnout different from most counties overwhelmingly benefited one party.
</p>
</div>
<div className="float-left right">
Expand All @@ -39,7 +39,7 @@ const TurnoutChartContainer = props => props.hidden ? null : (
<div>
<NerdBox
note="
Change in turnout in this chart is estimated using the percent change in the raw number of votes by county. Large changes in the number of registered voters in a county can affect how well that change represents a true change in turnout. Each county is only displayed on this chart after all its precincts have reported votes.
Change in turnout in this chart is estimated using the percent change in the raw number of votes by county. Large changes in the number of registered voters in a county can affect how well that change represents a true change in turnout. Each county is displayed on this chart only after all its precincts have reported votes.
"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions theshow/staticapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5864,7 +5864,7 @@ pluralize@^7.0.0:

"politico-elections-turnout@git+ssh://git@github.com/The-Politico/module_elections-turnout.git":
version "1.0.0"
resolved "git+ssh://git@github.com/The-Politico/module_elections-turnout.git#e94892d9853ddce4e32ab0de29f54ece90be1563"
resolved "git+ssh://git@github.com/The-Politico/module_elections-turnout.git#d723c24cd278f4079091096bc76006f95cf1dbad"
dependencies:
autoprefixer "^7.2.1"
babel-core "^6.26.0"
Expand Down Expand Up @@ -5911,7 +5911,7 @@ pluralize@^7.0.0:

"politico-module-elections-county-arrow-swing-chart@git+ssh://git@github.com:The-Politico/module_elections-county-arrow-swing-chart":
version "1.0.0"
resolved "git+ssh://git@github.com:The-Politico/module_elections-county-arrow-swing-chart#fc8eba2a3aef8039159ba168ffae6719c30856e7"
resolved "git+ssh://git@github.com:The-Politico/module_elections-county-arrow-swing-chart#7b18c1e46f45e724a8f81875594f5391f6fc0163"
dependencies:
autoprefixer "^7.1.6"
babel-core "^6.26.0"
Expand Down
35 changes: 35 additions & 0 deletions theshow/templates/theshow/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,41 @@
</footer>
{%endblock%}

<script type="text/javascript">
(function(a,b,c,d){
a='//tags.tiqcdn.com/utag/politico/main/prod/utag.js';
b=document;c='script';d=b.createElement(c);d.src=a;
d.type='text/java'+c;
d.async=true;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a)
})();
var utag_data = {
"page_level_1":"interactives",
"free_paid_content":"free",
"site_section":"elections",
"ad_unit_section":"elections-2017",
"page_type":"election results",
"content_author":"Tyler Fisher|Sarah Frostenson"|"Jeremy C.F. Lin|Jon McClure|Lily Mihalik ",
"content_byline":"By Tyler Fisher, Sarah Frostenson, Jeremy C.F. Lin, Jon McClure and Lily Mihalik ",
"site_domain":"www.politico.com",
"internal_site_id":"politico",
"page_name":"{{year}} {{state}} Election Results: Live map, real-time voting updates",
};

window.$('.icon-facebook').click(function(e){
e.preventDefault();
const uri = encodeURIComponent(window.location.href);
window.open('https://www.facebook.com/sharer/sharer.php?u=' + uri);
});

window.$('.icon-twitter').click(function(e){
e.preventDefault();
const uri = window.location.href;
const status = encodeURIComponent('{{year}} {{state}} Election Results: Live map, real-time voting updates ' + uri);
window.open('https://twitter.com/home?status=' + status);
});
</script>

<script>
// Responsive ads script
!function(a){var b=function(){var a=document.createElement("p");a.style.width="100%",a.style.height="200px";var b=document.createElement("div");b.style.position="absolute",b.style.top="0px",b.style.left="0px",b.style.visibility="hidden",b.style.width="200px",b.style.height="150px",b.style.overflow="hidden",b.appendChild(a),document.body.appendChild(b);var c=a.offsetWidth;b.style.overflow="scroll";var d=a.offsetWidth;return c===d&&(d=b.clientWidth),document.body.removeChild(b),c-d},c=function(){"undefined"!=typeof googletag&&googletag.cmd.push(function(){googletag.pubads().refresh()})},d=function(){var a="alpha";return i>=748&&i<990?a="beta":i>=990&&i<l?a="gamma":i>=l&&i<1028?a="delta":i>=1028&&(a="epsilon"),"epsilon"!=a&&"delta"!=a&&(jQuery(".global-utility-bar .reveal-toggle .reveal").removeClass("is-active"),jQuery(".utility-bar-bottom").removeClass("is-active"),jQuery(".dynamic-ad-wrapper .ad-slot").remove(),jQuery(".global-utility-bar .dynamic-ad-wrapper").html("")),a},e={currentAdThreshold:""},f=function(){var a=d();e.currentAdThreshold!==a&&(e.currentAdThreshold=a,c())},g=function(){e.currentAdThreshold=d()};a(window).on("resize",function(){i=document.documentElement.clientWidth+h,f()});var h=b(),i=document.documentElement.clientWidth+h,l=1012;g()}(jQuery);
Expand Down
24 changes: 0 additions & 24 deletions theshow/templates/theshow/meta.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
<!-- telium -->
<script type="text/javascript">
(function(a,b,c,d){
a='//tags.tiqcdn.com/utag/politico/main/prod/utag.js';
b=document;c='script';d=b.createElement(c);d.src=a;
d.type='text/java'+c;
d.async=true;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a)
})();
var utag_data = {
"page_level_1":"interactives",
"free_paid_content":"free",
"site_section":"elections",
"ad_unit_section":"elections-2017",
"page_type":"election results",
"content_author":"Tyler Fisher|Sarah Frostenson"|"Jeremy C.F. Lin|Jon McClure|Lily Mihalik ",
"content_byline":"By Tyler Fisher, Sarah Frostenson, Jeremy C.F. Lin, Jon McClure and Lily Mihalik ",
"site_domain":"www.politico.com",
"internal_site_id":"politico",
"page_name":"{{year}} {{state}} Election Results: Live map, real-time voting updates",
};
</script>


<!-- icons -->
<link rel="shortcut icon" type="image/x-icon" href="https://static.politico.com/cf/05/ee684a274496b04fa20ba2978da1/politico.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://static.politico.com/dims4/default/9d80474/2147483647/legacy_thumbnail/144x144/quality/90/?url=http%3A%2F%2Fstatic.politico.com%2Fcf%2F05%2Fee684a274496b04fa20ba2978da1%2Fpolitico.png">
Expand Down
16 changes: 8 additions & 8 deletions theshow/templates/theshow/specials/state.live.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
<meta property="og:url" content="https://www.politico.com/interactives/elections/{{year}}/{{state.slug}}/special-election/{{election_day.special_election_datestring}}/" />
<link rel="canonical" href="https://www.politico.com/interactives/elections/{{year}}/{{state.slug}}/special-election/{{election_day.special_election_datestring}}/" />
<!-- Project title -->
<meta property="twitter:title" content="{{year}} {{state}} Special Election Results | {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}}" />
<meta property="og:title" content="{{year}} {{state}} Special Election Results | {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}}" />
<meta property="twitter:title" content="{{state}} {{office.body.slug|capfirst}} Election Results {{year}} | {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}}" />
<meta property="og:title" content="{{state}} {{office.body.slug|capfirst}} Election Results {{year}} | {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}}" />
<!-- Project description -->
<meta property="twitter:description" content="Results, maps and live coverage." />
<meta property="og:description" content="Results, maps and live coverage." />
<meta name="description" content="Results, maps and live coverage." />
<meta property="twitter:description" content="{{candidates.GOP.person.first_name}} {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.first_name}} {{candidates.Dem.person.last_name}} in a {{year}} {{state}} special election. Live election results, maps, stats and coverage." />
<meta property="og:description" content="{{candidates.GOP.person.first_name}} {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.first_name}} {{candidates.Dem.person.last_name}} in a {{year}} {{state}} special election. Live election results, maps, stats and coverage." />
<meta name="description" content="{{candidates.GOP.person.first_name}} {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.first_name}} {{candidates.Dem.person.last_name}} in a {{year}} {{state}} special election. Live election results, maps, stats and coverage." />
<!-- Keywords -->
<meta property="og:keywords" content="politico,election,elections,{{state}} election,special election,results,maps,analysis,{{candidates.GOP.person.last_name}},{{candidates.Dem.person.last_name}}" />
<meta property="og:keywords" content="politico,election,elections,{{state}},{{state}} election,special election,map,results,votes,maps,analysis,{{candidates.GOP.person.last_name}},{{candidates.Dem.person.last_name}}, {{candidates.GOP.person.first_name}} {{candidates.GOP.person.last_name}},{{candidates.Dem.person.first_name}} {{candidates.Dem.person.last_name}},statistics" />

<!-- title and description -->
<!-- update this lily -->
<title>{{year}} {{state}} Special Election Results | {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}} live results and maps</title>
<title>{{state}} {{office.body.slug|capfirst}} Election Results {{year}} | {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}} live results and maps</title>
<meta name="description" content="POLITICO's live {{year}} {{state}} special election results, maps and demographic charts.">

{%endblock%}
Expand All @@ -43,7 +43,7 @@
<a class="icon icon-mail" target="_blank"></a>
</div>
<h1>
{{year}} {{state.name}} special election results: {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}}
{{state.name}} {{office.body.slug|capfirst}} {{year}} special election: {{candidates.GOP.person.last_name}} vs. {{candidates.Dem.person.last_name}}
</h1>
<h3 class="live-results">LIVE Results last updated: <span class="red"></span></h3>

Expand Down

0 comments on commit 032ae64

Please sign in to comment.