Museums and Nature Centers - Project - Intermediate Data Visualization with ggplot2

Hello

I am trying to complete the Intermediate Data Visualization with ggplot2 course but when dealing with the final Project Museums and Nature Centers looks like the codes do not run. Anybody finding my same kind of bug, maybe?

Thanks for your help

I’m assuming that if there are no results/output then there’s an error in the code.
If you have code to post it would help others to help you debug it.

---
title: "Museums and Nature Centers"
output:
  html_document:
    df_print: paged
---

```{r data, message=FALSE}

library(dplyr)
library(ggplot2)
library(stringr)
library(tidyr)
library(plotrix)

Data Exploration

# Load file as data frame
museums_df <- read_csv("museums.csv")
# Inspect data frame
head(museums_df)



I just loaded and inspected the dataframe with head ... no output at all..

What’s the link to the lesson, please?

https://www.codecademy.com/courses/learn-ggplot-2/projects/data-visualization-in-r-museums

here it is…

It worked for me when I used read.csv(ā€œmuseums.csvā€).

However the code seemed to stop working once I got to the facet bar plot.

In my case, it does not work from the very beginning… :confused:

It works. I just tried it. (I don’t know r either. I just followed the hints).

You have to write the code in between the tick marks, like this:

and then scroll to see all the columns.

I made it. There was a typo error in the code that I could not find … now I found it…

thanks for your help

1 Like

Hi, I encounter the same problem. Do you still remember what was wrong back then?

Hi, I did not fix it unfortunately… so I left it uncomplete. If you’ll get through a solution let me know…
Sorry not being helpful…

Hey,
I’ve found the solution file on the learning platform.


Click on the tiny little file icon and you can access the solution and also the csv data.
If you want to run your code, you can manually copy the data, make the relevant csv file, and work on your device’s RStudio.

But I can’t solve the problem of the server being unresponsive. Perhaps there are some site connection issues.
Good luck

Hi,
I am stuck in this part of the project:
Create a new bar plot called museum_class , mapping Is.Museum to the x axis. Since ā€œTRUEā€ and ā€œFALSEā€ aren’t very descriptive, use scale_x_discrete() to rename the x axis labels to more easily understood terms – for example, ā€œMuseumā€ vs ā€œNon-Museumā€.

Any advice to create the museum_class barplot?

Thank you for the help!

Beyond around the 200th row (task 17 onwards for me) the code stopped working.

I deleted some earlier tasks & the same lines of code worked. Apologies if this is common knowledge, but worth trying this if the latter tasks stop working for you.

Use a period instead of an underscore to read the csv. read.csv, not read_csv. I know it should work, but it doesn’t on code_academy.

1 Like