DEV Community

Cover image for Hello World 📰
Samyuktha Ganeshkumar
Samyuktha Ganeshkumar

Posted on

Hello World 📰

Overview of my Submission

Hello World is a web app that fetches headlines from all over the world through the NewsCatcher News API and performs sentiment analysis on it using Azure Text Analytics. The backend is a FastAPI which I have deployed using Azure App Services while the frontend fetches the sentiment-analyzed news from the API and uses the react-globe package to render a React + ThreeJS globe visualization of the world news!

The thought process behind Hello World ( the most innovative name right? 😂 ) started in my head when I learned about the whole concept of "data streaming". And then I thought of how cool it would be to visualize real-time news. But what would the visualization convey? That was when I learned about sentiment analysis and thought why not build something that analyses the sentiment of headlines from all over the world and display it in a super cool and interactive way for anyone to get a sense of what is happening on the other side of the world. And that is exactly what my project Hello World is!

This is my first-ever hackathon submission though I feel like I have been a developer for ages! 🥳

It was definitely an amazing experience to test out my skills in Python and React and realize how much I still don't know. I also just realized that I spent more than 20 hours on this single project! ( PS. I used Wakatime for this )

The data is supposed to be updated every 24 hours but I cannot seem to figure out how to make it work. To anyone reading this, I would be more than happy if you could help me out! Do let me know in the comments below 😊


Submission Category

Wacky Wildcards


Link to Code on GitHub

Fast API for Hello World

This is the FastAPI backend for the HelloWorld webapp which fetches news from the NewsCatcher News API and performs sentiment analysis on it using Azure Text Analytics.

Deployment

This API has been deployed using Azure App Services and can be found here:

https://hello-world-fastapi.azurewebsites.net/

API Reference

Get all news fetched every 23 hours

  GET /api/news

Get all data processed using text analytics

  GET /api/data

Get all point objects being rendered as markers in the front end

  GET /api/points

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

API_KEY

Your NewsCatcherAPI key

AZURE_API_KEY

Your subscription key for the Azure Text Analytics Service

ENDPOINT

Endpoint for the above service

Run Locally

Clone the project

  git clone https://github.com/sam9111/HelloWorld-FastAPI
Enter fullscreen mode Exit fullscreen mode

Go to the project directory

  cd HelloWorld-FastAPI
Enter fullscreen mode Exit fullscreen mode

Install requirements

  pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

Start the server

  uvicorn main:app --host 0.0.0.0 --reload
Enter fullscreen mode Exit fullscreen mode

Demo

Here is a demo video for my project!

Top comments (0)