palewire / first-visual-story Goto Github PK
View Code? Open in Web Editor NEWA step-by-step guide to publishing a standalone story from a dataset.
Home Page: https://palewi.re/docs/first-visual-story/
License: MIT License
A step-by-step guide to publishing a standalone story from a dataset.
Home Page: https://palewi.re/docs/first-visual-story/
License: MIT License
Ie., using npm
to install required libraries as we get to that point in the class. This would show people that these dependencies are flexible and can be adjusted to the needs of the project.
The downside is there might be hiccups if internet connections are wonky.
sudo npm install -g yo gulp
sudo npm install -g generator-yeogurt
I think maybe. At least the first time we drop something new in.
Each record includes a "slug" which can be converted a URL on the site so the slug "baby-blanche" can be inserted like so http://homicide.latimes.com/post/baby-blanche/
Right now some of the docs talk about the city.
We should cruise the web, find their starter code. Paste that in. Work off that. Better than us just giving it as the voice of God.
Figure we should have these addressed and outlined. How does this look?
project name: first-graphics-app
Javascript preprocessor: None (we could use Babel but no real need here)
Write styles: Sass
Sass syntax: SCSS (I don't think we'll be using this but going with what I'm familiar with)
Javascript testing framework: None (assuming we don't need this)
I just pushed to change so you could consider it, @emamd.
var countyHomicides = annualTotals.map(a => a.homicides_total);
var harvardParkHomicides = annualTotals.map(a => a.homicides_harvard_park);
var years = annualTotals.map(a => a.year);
Save this work until we have a strong, finished draft
I know it's a hassle, but it seems much better and more applicable than plotly.
For the good of the people.
This would be solved by a fix to the gulp task in copy.js
, but would change things from the default Yeogurt setup, I believe. Also having trouble dissecting that regex.
The alternative is to request the data directly from the github repo, with the caveat that it could get super slow if the internet gets wonky.
There is a point in the docs when building charts that the layout
variable changes to chartLayout
in the example code:
var chartLayout = { //should be `layout`
xaxis: {
title: 'Year',
fixedrange: true
},
yaxis: {
fixedrange: true
},
// Add the margin here
margin: {
l: 45,
r: 15,
t: 45,
b: 30
},
// Add a height parameter to the bottom of your file
height: 250
};
If a student copy 'n' pastes the whole block, their variable will change and it won't work anymore.
That's what I did on firstpythonnotebook.org.
I'm on the fence about the tradeoff here but with all the images and GIFs our single page is getting real heavy.
My thought is that we use the scripts block to write/include any data to the template, and then do all the charting/mapping/data manipulation inside of main.js.
For example,
{% block scripts %}
<script>
var homicides = {% include '_data/annual_totals.json' %}
</script>
{% endblock %}
and then inside of charts.js
which is called from (or could be directly written into main.js) you can directly refer to the homicides
variable which exists as a global on the template.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.