Support files for a data visualization course and book
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
This is an R package of datasets, functions, and course materials to go along with the book Data Visualization: A Practical Introduction (Princeton University Press, 2019).
socvizpackage contains about twenty five datasets and a number of utility and convenience functions. Most of them are used in Data Visualization: A Practical Introduction (
http://socviz.co), and there are also a few others as well for self-learners and students to practice their skills on.
A course packet is also included. This is a zipped file containing an R Studio project consisting of a nine R Markdown documents that parallel the chapters in the book. They contain the code for almost all the figures in the book (and a few more besides). Some support files are also included, to help demonstrate things like reading in your own data locally in R.
To install the package, you can follow the instructions in the Preface to the book. Alternatively, first download and install R for MacOS, Windows or Linux, as appropriate. Then download and install RStudio. Launch RStudio and then type the following code at the Console prompt (
>), hitting return at the end of each line:
To install the development version ofsocviz, instead ofinstall.packages("socviz")do the following:devtools::install_github("kjhealy/socviz")
Once everything has downloaded and been installed (which may take a little while), load thesocvizpackage:library(socviz)
The Course Packet
The supporting materials are contained in a compressed.zipfile. To extract them to your Desktop, make sure thesocvizpackage is loaded as described above. Then do something like this:setup_course_notes(folder = "~/Desktop")
You can choose the destination folder, but you must supply one. Here, thedataviz_course_notes.zipfile will be copied to your Desktop, and uncompressed there into a folder calleddataviz_course_notes. Open the folder, and double-click the file nameddataviz.Rprojto launch the project as a new RStudio session. If you want to uncompress the file somewhere other than your Desktop, e.g. your Documents folder, you can do this:setup_course_notes(folder = "~/Documents")
More about the Datasets and Functions
The included datasets and functions are documented at http://kjhealy.github.io/socviz/reference/.