NICAR session on how to make some essential visualization types just using jQuery, while going over best practices.
- Maureen Linke, Associated Press @maureenlinke
jQuery is a simpler, more concise way to select elements on the page:
Selecting with jQuery
Highly recommend this book. Download the code for examples in the book to follow along.
A text editor. I recommend:
Google Chrome for debugging
Localhost or a local webserver installed
[For Mac users] (http://brianflove.com/2013/10/23/os-x-mavericks-and-apache/)
- Open the Terminal application (in Applications)
- Type this command: sudo apachectl start
- By default, your web files live in /Library/WebServer/Documents . So when you unzip the project files, move the folder into that directory.
- Download file for installation wizard.
- Follow the prompts to the server information screen. For each of the 2 fields enter 'localhost' and for the email add email@example.com. These fields do not matter, but must be filled out completely.
- Radio button should be selected "for All Users, on Port 800", and "Typical" install type.
- Next, save the Apache Files in your C:/Program files directory.
- Complete the installation process and donwload the GitHub repository, unzip and drop the files into the htcdocs folder of your C:/program files/apache
- Open your web browser and type in localhost/practical-dataviz-js/start/.