## Create a data portal with a single dataset
Welcome to the PortalJS tutorials series. In this first tutorial, we are going to take a look at a simple data portal example built with PortalJS, understand its structure and learn how we can customize it, specially with data components.
The resulting data portal is our _Hello World_ equivalent: a single dataset, and it looks like this:
This tutorials series is sequential, so the next tutorials starts from where this one left, don't forget to save your progress, and, finally, let's get started!
### Create a new PortalJS project
First step is to create a new PortalJS project. To do that, please follow the instructions on the [Getting Started](#getting-started) section of the docs.
Now, make sure you have the project running on your local environment (`npm run dev`) and access http://localhost:3000 on your browser. As you can see, the new project is not empty, it already contains some content which we will use as a base in this tutorial. Here's what the page looks like:
### Basics
As you can see, the page is very generic, and consists of a header, some text, a table and a line chart (built with Vega). Soon we are going to make it more interesting, but first, how did we end up with this?
#### The content routing system
Let's start by analyzing the main components of the folder strucutre of the project:
```bash
content/
my-dataset/
README.md
public/
data_1.csv
data_2.csv
```
You see that `README.md` file inside the content folder? That's exactly what's being rendered on your browser. PortalJS uses a filesystem approach to content routing, this means that the folder structure inside the content folder determines the routes used to access the pages in the application, a page being a `.md` (Markdown) file, analogously to a HTML document. When the file is named "README.md", it means that it's an index file. Take a look at the following example:
```bash
content/
README.md # => Page rendered at /
folder-1/
README.md # => Page rendered at /folder-1
folder-2/
README.md # => Page rendered at /folder-2
folder-2-1/
README.md # => Page rendered at /folder-2/folder-2-1
```
INTERNAL NOTE: let's change that to index.md instead of README.md. Add examples of non-index pages? The MDX pipeline should be handling other .md files but it's not doing that rn. Maybe remove next paragraph
Note that it's also possible to create non-index pages, but this is not going to be demonstrated on this tutorial for the sake of simplicity.
#### The pages
_Cool, a Markdown file becomes a page, but what is a Markdown file :thinking_face:?_
Without getting into much detail, Markdown is a markup language which allows users to write structured and formatted text using a very simple syntax, with the beauty of not leaving the realm of plain text and keeping the document completely human-readable (opposite of, for instance, HTML, in which the document might get messy and very hard to read when it's not being rendered on a browser).
It's not the intent of this tutorial to guide the user throught Markdown, but it's a requirement to understand it, so if you are not familiar with it we encourage you to take a look at [this guide](https://www.datopian.com/playbook/markdown) written by Datopian (Markdown is going to take over the world, seriously, you won't regret it!).
Now that you are aware of Markdown documents and their application on PortalJS, let's hop to how this page you were seeing on your browser looks like behind the scenes. You probably noticed the cool chart and table on the page. Plain Markdown cannot do that, but the extended Markdown on PortalJS can.
If you open `content/README.md` on your IDE or any text editor, you are going to come across the following content:
```markdown
# Data
This is the README.md this project.
## Table
#### Simple line charts
Let's use the `
#### Complex charts
Finally, PortalJS also supports the creation of visualizations with [Vega and VegaLite](https://vega.github.io/). This becomes specially interesting when it's desired to create more complex and custom visualizations. To demonstrate this, let's add a bar chart that compares Breaking Bad to Better Call Saul, a spin-off of the series, based on the data on Rotten Tomatoes. Here's the data in CSV format:
```bash
TV Show,Average Tomatometer,Average Audience Score
Breaking Bad,0.96,0.97
Better Call Saul,0.98,0.96
```
Add that to the file:
```jsx=
## Breaking Bad x Better Call Saul
### Final results
Here's the whole source code of the dataset page we built:
```markdown
# Breaking Bad Statistics
**Data source:** https://openpsychometrics.org/tests/characters/stats/BB/
Visualizations about the public perception of the Breaking Bad TV series and its characters.
## Character Notability
### Next steps
Now that you already know how to create pages and render data components, we encourage you to play around with this project. You can try adding new visualizations, changing values, or creating a new page about something you find interesting.
Finally, proceed to the next tutorial in the series.