-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from chihacknight/planned-timeseries
Add planned projects to timeseries
- Loading branch information
Showing
6 changed files
with
70 additions
and
116 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,102 +23,15 @@ cd data/scripts | |
bash run_all.sh | ||
``` | ||
|
||
You can also run each script individually from the `data/scripts` folder: | ||
|
||
```bash | ||
# combine 3 source files into one | ||
python combine_projects.py | ||
|
||
# assign il house and senate districts based on tract centroids | ||
python get_tract_districts.py | ||
|
||
# aggregate data by county, tract and legilsative districts | ||
python aggregate_data.py | ||
``` | ||
|
||
## Publishing data with kepler.gl | ||
|
||
The interactive map is powered with [kepler.gl](https://kepler.gl/), an open source geospatial analysis tool. | ||
|
||
The project is managed in kepler.gl and exported as an HTML page. This page is then renamed to `index.html` and [this patch is applied](https://github.com/keplergl/kepler.gl/pull/2292/files#r1268629776) to load the appropriate version of kepler.gl (2.5.5). | ||
|
||
We replace part of the html header meta tags for the site for custom title, description and image: | ||
|
||
```html | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title>Illinois Solar Map - Chi Hack Night / ICJC</title> | ||
|
||
<!--Uber Font--> | ||
<link rel="stylesheet" href="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/uber-fonts/4.0.0/superfine.css"> | ||
|
||
<!--MapBox css--> | ||
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.1.1/mapbox-gl.css" rel="stylesheet"> | ||
|
||
<!-— facebook open graph tags --> | ||
<meta property="og:url" content="http://ilsolarmap.com/" /> | ||
<meta property="og:title" content="Illinois Solar Map - Chi Hack Night / ICJC" /> | ||
<meta property="og:description" content="See how and where over 2,170,000 kilowatts of solar have been installed by zip code in the State of Illinois" /> | ||
<meta property="og:site_name" content="Illinois Solar Map" /> | ||
<meta property="og:image" content="https://ilsolarmap.com/images/il-solar-map-x4.jpg" /> | ||
<meta property="og:image:type" content="image/png" /> | ||
<meta property="og:image:width" content="800" /> | ||
<meta property="og:image:height" content="800" /> | ||
|
||
<!-— twitter card tags --> | ||
<meta name="twitter:card" content="summary_large_image"> | ||
<meta name="twitter:site" content="Illinois Solar Map"> | ||
<meta name="twitter:creator" content="Chi Hack Night / ICJC"> | ||
<meta name="twitter:title" content="Illinois Solar Map - Chi Hack Night / ICJC"> | ||
<meta name="twitter:description" content="See how and where over 2,170,000 kilowatts of solar have been installed in the State of Illinois"> | ||
<meta name="twitter:image" content="https://ilsolarmap.com/images/il-solar-map-x4.jpg" /> | ||
|
||
<!-- Load React/Redux --> | ||
<script src="https://unpkg.com/[email protected]/umd/react.production.min.js" crossorigin></script> | ||
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js" crossorigin></script> | ||
<script src="https://unpkg.com/[email protected]/dist/redux.js" crossorigin></script> | ||
<script src="https://unpkg.com/[email protected]/dist/react-redux.min.js" crossorigin></script> | ||
<script src="https://unpkg.com/[email protected]/dist/styled-components.min.js" crossorigin></script> | ||
|
||
<!-- Load Kepler.gl --> | ||
<script src="https://unpkg.com/[email protected]/umd/keplergl.min.js" crossorigin></script> | ||
|
||
<style type="text/css"> | ||
body {margin: 0; padding: 0; overflow: hidden;} | ||
</style> | ||
|
||
<!--MapBox token--> | ||
<script> | ||
/** | ||
* Provide your MapBox Token | ||
**/ | ||
const MAPBOX_TOKEN = 'pk.eyJ1IjoiZGF0YW1hZGUiLCJhIjoiaXhhVGNrayJ9.0yaccougI3vSAnrKaB00vA'; | ||
const WARNING_MESSAGE = 'Please Provide a Mapbox Token in order to use Kepler.gl. Edit this file and fill out MAPBOX_TOKEN with your access key'; | ||
</script> | ||
|
||
|
||
<!-- Google tag (gtag.js) --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-F7WESE4Z2K"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', 'G-F7WESE4Z2K'); | ||
</script> | ||
|
||
</head> | ||
``` | ||
|
||
## Setting up and running the website | ||
|
||
This site uses Jekyll to serve several static pages and images. The site is published to GitHub Pages. | ||
### Dependencies | ||
|
||
* [Jekyll](http://jekyllrb.com/) - Static site generator built in Ruby | ||
* [Bootstrap 5](http://getbootstrap.com) - HTML and CSS layouts | ||
* [mapbox-gl-js 2.15](https://docs.mapbox.com/mapbox-gl-js/guides) | ||
* [jQuery 3.7](https://jquery.com/) | ||
* [DataTables](http://datatables.net) - for searching and sorting tables | ||
* [CSV to HTML Table](https://github.com/derekeder/csv-to-html-table) - for sortable rollup tables | ||
|
||
|
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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