fabiochiu/medium-articles huggingface dataset:
Using R to identify individual trees and extract valuable information
Tags: Open Data, Vizualization, Point Cloud, Lidar, Analysis

R is a free software environment and programming language for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS. The lidR library includes LiDAR point cloud algorithms for DEMs/DSMs, canopy height models and tree detection. Here we will focus on individual tree detection and segmentation. This software is a favourite amongst academics and professionals.

The lidR library in particular only includes algorithms that have been published and peer reviewed academically.

Getting started

Head over to the R project website to download the latest release of R for your operating system.

Learning the R programming language

The PointCloudViewer library

In addition to lidR, there is also the PointCloudViewer library which has a much greater capacity for viewing points.

Identifying individual trees

This area has been taken from the Balmoral Forest in Canterbury, taken from LiDAR captured in 2018. The original data was classified as ground and unclassified, with the exception of water and noise (filtered out). After using R we can visually identify each individual tree, for further analysis.

Original data:

Unclassified points in grey and ground points in blue

After running the segment_trees function:

200 individual trees identified and coloured

R script to identify individual trees from OpenTopography Classified Point Cloud data:

Script to identify individual trees with R

Here is an excerpt from the official documentation for the segment_trees function in the lidR library:

Defining tree crowns

One of the symptoms of kauri dieback is a yellowing and thinning canopy. Identifying tree crowns in an area over time would be a great indicator of kauri dieback.

Location of Kauri Dieback Case Study — Waitakere Ranges, Auckland

For example, the following is an area identified by Auckland Council as infected with Kauri dieback. The image on the left are tree crowns identified from LiDAR captured in 2013, and again in 2016.

On closer look at the area using aerial imagery captured in 2017:

R script to create these tree crowns from OpenTopography Classified Point Cloud data:
Интернет архив, стеклянная дверь и открытые наборы данных
By: Digital Librarian
Tags: Open Science, Open Data, Creative Commons, Openglam, Web Monetization

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Announcing the ODSC Ai x West Business and Innovation Summit This Oct 28
By: Odsc - Open Data Science
Tags: Open Data, Data Science, Business, Innovation, Artificial Intelligence

Artificial Intelligence (AI) has seen rapid advancement and increasing importance in many of our key industries over the last several years. As such, to excel in your profession, and for your company to excel in its market, it’s essential to understand how AI has and will transform your industry. At the ODSC Ai x West Business and Innovation Summit October 28, you’ll get the chance to learn from some of the best and brightest minds in AI and Business and get ahead of the curve.

[Related article: Announcing the AI+ Data Science Live Training Subscription Service]

Just a few of the expert speakers who will be at the summit include:

Rich Dutton, Head of Corporate Engineering, Google

Susan Gregurick, PhD, Director, National Institutes of Health

Dave Stuart, Senior Executive, US Department of Defense

Charlie Sidoti, Executive Director, Innovation Underwriters

Sears Merritt, Head of Data, Strategy, and Architecture, Mass Mutual

Over the course of two days, our speakers will cover many topics including AI Ethics and Bias, Human-Machine Collaboration, Machine Learning in Enterprise, Using Machine Learning to Detect Disease, Inverse Reinforcement Learning, and much more.

As part of your Ai x registration, you’ll also get access to the Virtual AI Expo Hall. In the AI Expo Hall, you’ll have the opportunity to explore many cutting-edge AI solutions that can help you integrate AI into your business strategies and goals. Meet with 30+ partners and see their solutions and products demonstrated live during the 16+ Demo talks.

Our partners include DataRobot, SAS, appen, S&P Global Market Intelligence, Algorithmia, Gurobi Optimization, Microsoft Azure, LexisNexis, CloudFactory, iMerit, and many more.

They will be discussing topics such as

HPCC Systems — The Kit and Kaboodle for Big Data and Data Science

Fresh Data in Days Instead of Months

Integrating Open Source Modeling with SAS Model Manager

Next-generation Big Data Pipelines with Prefect and Dask

Although the Ai x Summit is packed full of learning opportunities, there is also plenty of time to network with attendees and speakers from across the country. The Virtual Networking Event is the perfect chance to unwind, discuss the day’s events, and make new connections.

Whatever your time or budget constraints, there is an Ai x Summit Business pass to fit your needs.

1-Day Aix Pass ($99):

Access to business talks

3-day Aix Pass ($179):

Access to business talks

Access to all ODSC talks

Access to Keynotes

Access to Virtual Events

Access to the Virtual AI Expo

Access to the AI+ Career Services Lab and Expo

All-Access Pass ($879)

Everything included in the 3-day Aix Pass

Access to ODSC Workshops

Access to ODSC Training Sessions

Access to On-Demand Training Sessions, Workshops, and Talks post-conference

AI waits for no one, so be sure to register soon to stay ahead of the AI curve and save on 20% your pass for ODSC Ai x West 2020
UN World Data Forum 2020: Increasing Open Data Literacy in the Time of Covid-19
Tags: United Nations, Open Data, Sdgs, Data, Education

Advocating for better and more open data on corporate impacts, and engaging the public in the use of that data, is the foundation of the WikiRate platform. This October we were delighted to take part in the first virtual edition of the UN World Data Forum with a Ted Talk on increasing open data literacy in the time of Covid-19.

Our Ted Talk built on one of the main conference themes, Building Trust in Data and Statistics, with an exploration of the open data movement and our work to further corporate transparency. Through this work we are trying to not only build trust in the data — by making each data point traceable through transparent source citing — but also to make the data available in the first place. In the age of big data, accessible corporate sustainability data is lagging behind.

Over the past four years we have been engaging volunteers, students and researchers in collecting open data on corporate reporting to the Sustainable Development Goals through research on the WikiRate platform. With the emergence of Covid-19, academic institutions have been faced with unprecedented disruption to their teaching schedules and confronted with new challenges in engaging students using virtual formats. In order to support this adaptation, WikiRate is working to ensure that professors are able to use our research platform as a teaching tool.

In our Ted Talk, we present our Sustainable Development Goals research program as one such example for engaging students remotely in measuring and tracking corporate sustainability. Embedding open data literacy into curriculums in this way, is providing future leaders with knowledge and understanding of where data comes from, how it is used and the need for a critical approach to interpreting data.

During what has been a turbulent year so far, the need to build trust in data and statistics, and to propel the open data movement forward, has never been clearer. We hope you enjoy our Ted Talk below!

Interested in engaging with WikiRate to further the open data movement? Get in touch via our contact form.
Récupération des données OpenStreetMap (OSM)
By: Thomas Huraux
Tags: Open Data, Bordeaux, Shapefile, Intelligence Artificielle, Simulation

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
An Update on How the Census Count is Progressing During COVID-19
By: Data Clinic
Tags: Open Data, Census, Covid 19, Insights And Methods, New York City

An Update on How the Census Count is Progressing During COVID-19

It’s been several months since we examined the potential impact of COVID-19 on Census self-response rates in NYC. Our findings revealed that higher income communities such as the West Village, Soho, Tribeca, and the Upper East Side in Manhattan were farthest away from meeting their 2010 response rates at the end of May. As the Census draws to a (contested) close, we were curious to see if this pattern held true in the current data.

Using the same methodology as in our previous analysis (accessible in our GitHub repo), we compared the cumulative change in percent self-reporting for NYC (Figure 1). May 26 is marked with a horizontal line to indicate the date of our previous post.

Figure 1: Daily and Cumulative 2020 census response rates for NYC as of October 14, 2020

Although cumulative responses have increased over time, particularly for the mail in options, as of the time of this publication, the total response rate remained short of the 2010 final hovering just below 60%. Comparing rates across the city by census tracts (Figure 2) demonstrates improvements in response rate across most of NYC with large swaths of Staten Island and Queens reaching rates over 70% response rate. However, areas we identified in our previous post as having troubling rates (namely neighborhoods of the East Side, Midtown, Jamaica, Corona, and Borough Park/Sunset Park) have not made much progress and remain below the city average.
Hablemos de Datos Abiertos…
By: Luis Alberto Palacios
Tags: Open Data, Analytics, Data Science, Data, Ciencia Y Datos

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Smarter Data Publishing with Qri
By: Chris Whong
Tags: Open Data, Metadata, Version Control, Metadata Management, Data Publishing

Data scientists, data analysts, data enthusiasts, data junkies… there are many titles we can apply to ourselves as people who work with data, and finding, getting, transforming, and munging data are daily tasks we all share in common. Data Publisher, however, is probably a bit harder to come by in the data world. Consumers are many, but publishers are few. At qri, we are trying to level that playing field, making it as easy to publish and share your data as it is to find and download data published by others.

In short, we want you to add publisher to your list of data practitioner adjectives.

Open Data as an Operational Process, not a Separate Program

Everyone’s got data, but not everyone has a data catalog. Why? Data catalogs take time and money to build and maintain. They’re a big lift. Whether you build it or buy it, it’s a project that needs staffing, design, stakeholder buy-in, and all the rest. Once it’s live, you need to maintain it, keep your content fresh, publicize new datasets, etc. Open Data/data publishing becomes a program, a process removed from the actual business activities that produce and manage data at an organization.

A helpful analogy comes from the world of open source software. Many organizations share code openly, Qri included. But the source code we share on the web isn’t the output of an established “Open Code Program” that takes source code from code owners and prepares it for public consumption. We simply allow anyone to see our source code in the same place we are actively working on it.

What if we could do the same with datasets? What if published datasets lived closer to the source? What if the team that manages a dataset could publish it on their own, pour all of their institutional knowledge into a readme file, write their own column descriptions, manage their own metadata, and control when new versions are made public?
Rightrelevance un motore di ricerca con score regolabile
By: Vincenzo Tilotta
Tags: Search Engines, Big Data, Rightrelevance, Open Data

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Is COVID-19 affecting Chicago building permits? 😟
By: Steven Vance
Tags: Real Estate Investments, Open Data, Chicago, Building Permits, Zoning

One of Chicago Cityscape’s members is a service provider for property owners and was trying to see building permit trends and if the novel coronavirus pandemic was affecting building permits in the city. They emailed me after looking at the year-over-year building permits spreadsheet in their custom sales area (which is drawn as a Personal Place). Knowing the trend is key to their forecasting and business development efforts.

The short answer of COVID-19’s impact on building permits, based purely on the rate of building permits issued, is it’s hard to tell. That’s because the rate of issuing building permits for new construction in Chicago declined by 1.5 percent from 2017 to 2018, by 10.4 percent from 2018 to 2019, and we don’t have enough information to know if would have continued through 2020. (So far, though, the decline is 44.7 percent from 2019 to 2020.)

A complete rehab of the apartment building at 1926 W Harrison St — now known as Atrio — is underway (left, before the highway), and Gateway Chicago (foreground) received building permits this year for two major buildings to follow the construction of the two visible 1-story buildings.

One impact with issuing permits happened on the supply side this year — at the Department of Buildings — when staff had to switch to working from home, and the department had to modify procedures. Additionally, inspections and violation citations fell drastically in March and April, with a particularly notable fall right after Governor Pritzker’s shelter in place order took effect on Saturday, March 21, 2020.

On the demand side — those applying for building permits — the rate has fallen, but there isn’t enough information in the Chicago Cityscape datasets to understand how much of this is due to a “natural” decline versus a COVID-related decline.
Let’s Build an Open Directory of Weather Stations
By: Christian Lamprecht
Tags: Open Data, Climate Change, Weather, Climate, Open Source

Today, Meteostat takes the next step in the effort of making meteorological data open and accessible for everyone. We are launching a GitHub repository which serves the purpose of collecting information about public weather stations worldwide. From now on, everyone is able to download and contribute to the full list of weather stations available via Meteostat.

Contributing

If you want to add a new weather station, update some information or correct an error, you can either correct/update the affected file(s) & create a pull request or fill an issue & describe your concern. Your pull requests will be reviewed by the Meteostat team. Once they are merged into the master branch your changes will be visible in all Meteostat products within a few days.

Essentially, every weather station is represented by a simple JSON file. Let’s take the weather station at John F. Kennedy airport as an example. You can view the JSON file here. It sits in the stations directory and contains an object. The file is named after the object’s first property: the Meteostat id of the weather station.

Object Properties

The name property is an object which contains the name of the weather station in multiple languages. The English name must always be present. It is defined using the en property of the name object. You can define names in other languages by adding new properties to the name object. The property keys must equal the ISO-639–1 code of the respective language.

Next in line is the country property. That’s the ISO 3166–1 alpha-2 country code of the weather station. Same goes for the region property which needs to be filled with the ISO 3166–2 state or region code.

The identifiers object holds the weather station’s IDs as defined by organizations like the International Civil Aviation Organization (ICAO) and the World Meteorological Organization (WMO). Some of the identifiers might not be shipped in the data dumps as they are only required for Meteostat-internal communication with public data interfaces.

The location object is crucial. It defines coordinates through the latitude & longitude properties and also contains the station’s elevation . Last but not least there is the history array which holds previous locations, identifiers or names of the weather station.

Data Access

Meteostat provides both a full and a lite dump of its weather station directory. The collection is available under the Creative Commons Attribution 4.0 International Public License.
UPTOWN OPEN MIC
Tags: Open Data, Uptownopenmic, Amfhouse, House, Open Source

UPTOWN OPEN MIC

Amf House

Art Media Fashion House

Wednesdays 730 PM

Thats when the doors open

With MR Loopys
Koniec Ministerstwa Cyfryzacji w Polsce
By: Transparent Data
Tags: Ministerstwo Cyfryzacji, Cryfryzacja W Polsce, Open Data, Cyfryzacja, Otwarte Dane

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Spatial Collective, Humanitarian OpenStreetMap Team, and OpenMap Development Tanzania extend their engagement to Mwanza
By: Openmap Development Tanzania
Tags: Maps, Rockfalls, Opendata, Floods, Mwanza

Mwanza is the second-largest city in Tanzania with a population of about 1.2 million. Located on the shores of Lake Victoria, it is characterized by highly dissected steep slopes, rock hills, narrow interfluves, and river valleys.

Like other towns in Tanzania, Mwanza has undergone a massive spatial expansion in recent years. According to Macrotrends, the population in Mwanza increased by 5.56 percent since 2019, with a lot of its growth concentrated in unplanned areas. Further, approximately 81 percent of households situated in hazard-prone areas fall in the low-income population bracket. These areas often lack access to adequate municipal services such as water, sanitation, solid waste, electricity, and drainage. These shortcomings, together with acute, periodic flooding, contribute to a deteriorating environment which often leads to an increase in health and safety risks.

Building on the previous projects of Ramani Huria and Zanzibar Mapping, Spatial Collective, Humanitarian OpenStreetMap Team, and OpenMap Development Tanzania recently extended their operations to Mwanza City. Under the banner of the Tanzania Urban Resilience Program (TURP), the aim of Community Mapping of Urban Risks in Mwanza is to produce high-quality, ground truth spatial information and urban risks data for selected wards in Ilemela and Nyamagana municipalities.

The consortium will achieve this by focusing on 4 core mapping campaigns:

By utilizing the rectified aerial and satellite imagery, we will produce digitized foot/roof prints of buildings as well as road and street networks suitable for OpenStreetMap. Through drainage infrastructure and river mapping, we will produce datasets of critical drainage infrastructure including condition surveys of drains, culverts, and urban rivers. Through the participatory mapping of unplanned communities, we will collect data on critical infrastructures, such as health facilities, access routes, government installations, safe spots, open spaces, businesses, schools, religious institutions, and any other relevant public amenity. Through household flood and rockfall historical incidents mapping, we will collect and analyze data on flood and rockfall histories.

Flooding in Mwanza. Photo: Ester Daniel

All four mapping campaigns will be carried out in collaboration with the Institute of Rural Development Planning, St. Augustine University of Tanzania, and government officials in selected municipalities. Furthermore, the assignment will include training of government surveyors from the Ministry of Land’s lake zone office, Ilemela and Nyamangana municipal councils, Tanzania Rural, and Urban Road Authority (TARURA), and Lake Victoria Basin Water Board (LVBWB).

The project will both transfer knowledge on community mapping to stakeholders and provide authorities and communities with data to inform urban planning and hazard-preparedness in Mwanza city.

This blog is co-written by Spatial Collective and OpenMap Development Tanzania
GraphQL ve Spring Boot ile API sorgulama
By: Tahir Kardak
Tags: Graphiql, GraphQL, Graphql Vs Rest, Java, Spring Boot

graphql-java-kickstart/graphql-spring-boot

We are looking for contributors! Are you interested in improving our documentation, working on the codebase, reviewing…
Nuxt.js Querying a GraphQL API
By: Alex Kasongo
Tags: Rick And Morty, GraphQL, Nuxtjs, Api Integration, Apollo Client

In this article, I am going to show you how to connect to a Graph-Ql API in your Nuxt.js Project.

Final Project & Github

Why Graph-QL? In a nutshell, GraphQL is a query language with an easy syntax that describes how to ask for data, and is generally used to load data from a server to a client. It lets the client specify exactly what data it needs. It makes it easier to aggregate data from multiple sources. It uses a type system to describe data. For a deep dive I recommend reading the official documentations.

To get started, we need to install a few things.

Install a new Nuxt.js Project npx create-nuxt-app <project-name> Yarn or NPM install @nuxtjs/apollo Yarn or NPM install graphql-tag

Note: Graphql-tag allows us to write template literals as GraphQL queries.

We are going to use the Rick and Morty API to build a simple character card selector using the data received from the API. We will connect to this API using the Nuxt.js Apollo Module. Internally, the Apollo Module uses Vue-Apollo which uses the Apollo Client.

Configure Apollo Client

nuxt.config.js

buildModules: [

// GraphQl Apollo Client

'@nuxtjs/apollo'

],

apollo: {

clientConfigs: {

default: {

httpEndpoint: 'https://rickandmortyapi.com/graphql',

}

}

},

Querying

yarn run dev or npm run dev to spin up your project. Copy and paste the code below in your index.vue page

<script>

import gql from 'graphql-tag'



export default {

apollo: {

characters: gql`

query getCharacters {

characters {

results {

id

name

status

}

}

}

`,

},

}

</script>

Open Vue.js devtools. You should see the queried data.

Apollo binds characters to the data() method, making it available in our template.

3. In your template copy and paste the code below.

Queries with arguments

Passing arguments to queries and getting results is easy with GraphQl. Let’s use the character query which requires a capital “ID!” A capital ID! in a GraphQl API means that this ID! is unique. To make the query dynamic we need to use a variable that starts with a “$” sign, the variable name can be anything. To pass dynamic values using “this” to the variable we need to make the variable a function.

Let’s create a <nuxt-child> component for index.vue

├── index

│ ├── _id.vue

├── index.vue



// Copy and paste the code below inside _id.vue

<script>

import gql from 'graphql-tag'



export default {

name: 'CharacterCard',

apollo: {

// Dynamic querying

character: {

query: gql`

query getCharacter($id: ID!) {

character(id: $id) {

id

name

status

species

gender

image

origin {

name

}

}

}

`,

variables() {

return {

// if the route.params.id is null make id = 1

id: this.$route.params.id || 1,

}

},

},

},

}

</script>

4. In your template copy and paste the code below.

That’s it. If you found this useful, feel free to follow me on Medium and Twitter.
JSONField Models in Graphene Django
By: Jerry Ng
Tags: Python, GraphQL, Graphene, Technology, Django

JSONField Models in Graphene Django

Graphene + GraphQL

In my humble opinion, Graphene is very stable and is probably the best library for creating GraphQL endpoints in Python.

While working with Graphene, I came across an issue where JSONFields were always returned with quotation marks and backslashes — JSONString .

Example — meta field is returned as a JSON string rather than a JSON object

This article aims to address this issue using GenericScalar , which is currently an undocumented type in the current version of Graphene documentation.

TL;DR

This can be easily solved by overriding your meta field type in your DjangoObjectType to GenericScalar such as below.

Example

Detailed Example with Code

In this section, I am going to run through a few snippets of codes for creating a simple mutation and query that we can work with.

Example folder structure of a Django app

Database Model

Simple database model for demonstration.

GraphQL Types

Creating a DjangoObjectType for our Person object.

Django Filters

Let’s add some basic filters to our code while we are at it.

GraphQL Mutations

For simplicity’s sake, we will only need a single createPerson mutation for this example. We are going to pass in metadata as a dictionary/ JSON data input for our mutation.

GraphQL Schema

Finally, we will stitch everything together inside schema.py and we are ready to try things out!

Results

Trying Out The Mutation

Let’s create a Person object using our newly created CreatePerson mutation at your /graphql endpoint using the built-in GraphiQL IDE or any API client of your choice (Postman, Insomnia REST Client, etc.)

# Create a Person object

mutation createPerson($input: CreatePersonInput!) {

createPerson(input: $input) {

person {

id

}

}

}

{

"input": {

"firstName": "Albert",

"lastName": "Joe",

"metadata": {

"is_admin": true,

"email": '

}

}

} # Query Variable"input": {"firstName": "Albert","lastName": "Joe","metadata": {"is_admin": true,"email": ' albert@example.com

Solution

As you can see in the meta field below, it’s returned as a JSONString which is not what we wanted. Things could get uglier especially when you’re dealing with a large JSON object.

The issue was apparently caused by the fact that JSONFields are by default treated as JSONString in Graphene.

However, this can simply be fixed by applying GenericScalar to types.py such as below.
Using The Graph Playground
By: Jerry Okolo
Tags: The Graph Network, GraphQL, Itsjerryokolo, The Graph Protocol, The Graph

Subgraph Schema

In fig 2, I show you the schema of the PoolTogether subgraph. Think of the schema as an instruction manual on where to find all the data you can query from the subgraph. I created a different post where I talked about what a subgraph schema is.

Fig 2— PoolTogether subgraph schema

Clicking on Draw in Fig 2, shows me the fields we can query. Think of Draw as a content inside the instruction manual and inside this content you’ll find several like fields we can query like id, drawID, feeBeneficiary, winnings, secretHash. These fields will all return data when you query them. Fig 3 shows the fields you can query from Draw.

This will make a lot more sense when we write the queries. I’ve color coded them, so you see how it all relates.

Fig 3— Contents of Draw

Query

The query is how you get those data from the instruction manual. It is written in GraphQL.

Fig 4— PoolTogether subgraph example query

I explain below, what each line of code means.

draws{ — curly braces opens or navigate into the content (Draw) id — field inside the content (Draw) secretHash — field inside the content (Draw) winner — field inside the content (Draw) rewardedAt — field inside the content (Draw) winnings — field inside the content (Draw) } — closes or navigate out of the content (Draw) (first: 5) — Think of this as a way to filter or sort the data you want to receive from that content (Draw) in the instruction manual.

Posting this example query returns only the data you requested as we can see in Fig 5. It returns only the first 5 records of content(Draw) with the 5 fields we requested. Feel free to run this query in the Graph playground.

Fig 5— Indexed Data

Additional Resources

Visit the GraphQL website to learn more.

The Graph docs

If you have any questions, email me: jerrycreative@live.co.uk
I Wrote A Tech Book And Still Maintained My Sanity
By: David Choi
Tags: GraphQL, Node, React, Typescript, AWS

I Wrote A Tech Book And Still Maintained My Sanity

In my previous story I wrote about some of the difficulties of writing a book. Well that book is finally complete and let me say again it’s freaking hard to write a book!

Way Too Much Editing and Re-Editing

The first surprise for me was the amount of editing involved. I wrote my book for Packt. It’s called Full-Stack React, TypeScript and Node, if you’re interested. But without exaggerating, every chapter was revised at least 3 times and some chapters way more than that. Since this book has 17 chapters this was exhausting.

In addition to the language and grammar edits. The team at Packt has a very specific format for writing tech books. Certain things need to be included in the title of each chapter. Each subsection requires an introduction paragraph as well as a close. And certain formatting rules apply for code, pictures, and other types of text.

On top of all this I had a technical editor who also gave feedback and suggested changes. All combined, editing alone was several months worth of work.

I Wanted To Give Up Several Times

Not exaggerating. There were a few occasions where the constant requests for edits made me want to give up. Or at least have the team get a second author who could finish the book. When you’re trying to do your day job and write this kind of book at the same time, the stress level can get quite high.

This might be difficult to understand but look at it this way. Let’s say you’re busy doing your regular job and you had just finished sending the third revision for the chapter, additionally you have many chapters left to do, but then you get an unwelcome email requesting another round of edits. Even if they’re small you still have to do a lot of re-reading to make the edits. So yeah, there were times I felt like running away.

But obviously since you’re reading this I did not give up and my book is now out. I feel terrific about it and I’m glad I worked through the pain. In the tech world writing your own book is no small feet. I’m quite certain it will open doors for me, even if only in a small way.

In fact I’m already talking to the guys at Packt to do another book. On second thought maybe I’ll take some time off first …

If you have any questions leave a comment. I’m happy to answer.

If you’re in need of a good web development book check out the book on Amazon. You can use 20FULLS for a 20% discount.

I also do Project work if you need help.
Our Favourite React Ecosystem
By: Patrik Szewczyk
Tags: GraphQL, React, Web Development, Front End Development, Programming

We know how difficult is to choose the right technologies and packages for the React application. Let us introduce you to our frontend ecosystem, custom packages, best practices, and further experience…

Photo by Gabriel Crismariu on Unsplash

Hello, my name is Patrik. 👋

I live in the Czech Republic. 🇨🇿

And I’m head of frontend team at Atlas software company.

I’ve decided to write down some thoughts about our experiences and share some of our points that we’ve been able to grasp throughout our frontend development process. I believe this article targets developers of basically any experience. If you’re junior developer, you’ll see how to start with React and it’s ecosystem and for those who are more experienced, you may compare our methods and share yours in return.

This is my first post and I wish you’ll find it somewhat usable. 🙏

What do we code?👨‍💻

At Atlas, we develop large single page web applications such as information systems for lawyers and managers. We code these applications in React and TypeScript. Our main and largest project is the Codexis.
The Graph GRT cryptocurrency FAQ
Tags: Grt, GraphQL, Cryptocurrency, Blockchain, The Graph

What is the total supply of GRT tokens?

Ans: 10,000,000,000

What is The Graph?

Ans: An indexing protocol for orgainizing blockchain data.

What are subgraphs?

Ans: Open APIS that anyone can query

What’s the query language used for Subgraphs?

Ans: GraphQL

What do Curators do?

Ans: Signal on quality subgraphs by depositing GRT (The Graphs native token) in return for curation shares.

What are Indexers?

Ans: Node operators that index data and serve queries.

Why do indexers have to stake GRT?

Ans: For economic security so if they misbehave they can be slashed (lose their GRT).

By delegating GRT to Indexers what can you do?

Ans:

Join on telegram for more: https://t.me/airdropofficial7
GraphQL Codegen: Generate reusable hooks for your React application
By: Joe Ng'Ethe
Tags: Automation, GraphQL, React, Code Generation, Front End Development

First, we install the `@graphql-codegen/cli` package, which will help us achieve this.

yarn add -D @graphql-codegen/cli

After this, we use the cli to set up our config by running;

yarn graphql-codegen init

This will ask you a few questions which will guide you through the whole process of setting up a schema, selecting and installing plugins that you prefer, picking a destination where your generated files will be stored, and much more.

Some servers don’t allow schema introspection. Ensure the server you are pointing to allows this if you want to use this feature.

Next, we need to write a query and save it in a file with a .graphql file extension. Below is an example query from the SpaceX graphql API;

# copy this and save it in launches.graphql query GetLaunches{

launchesPast(limit: 10) {

ships {

name

home_port

image

}

}

}

Great! Now you can run npm run generate , assuming you named your script generate

Note that you will need to run npm install to install the packages/plugins you selected on the setup stage before you are able to use the codegen script.

Now we can use the generated hook and use it anywhere in our app.

import { useGetLaunchesQuery } from "./generated/graphql";

function App() {

const { data, loading, error } = useGetLaunchesQuery();

if (loading) return <p>Loading...</p>;

if (error) return <p>Error :(</p>;

return (

<ul>

{data?.launchesPast?.map((launch) =>

launch?.ships?.map((ship) => <li key={ship.name}>{ship?.name}</li>)

)}

</ul>

);

}

export default App;

The biggest advantage in my opinion of using this approach is type safety and time. Now our IDE’s IntelliSense is able to give us hints of the shape of the data response. This helps us build apps fast and avoids bugs for they’d be caught really early when writing the code.

By using this approach we are able to;

Avoid generating dynamic queries at runtime.

Use graphql query language rather than a language-specific syntax like tagged template literals

Improve on the DX for we auto-generate reusable hooks with type-safety and IDE IntelliSense

Validate queries against our schema

Rebuild our code when we change our queries

I’d also like to point out that most APIs will have some kind of authentication behind them in which case you’ll need to pass some header when accessing it. You can do this by passing headers in the config like so;

More info, options, and plugins can be found on the Graphql Code generator website

I hope you found this useful and that it’ll help you build your applications much faster.
C++, GraphQL and pleasant talks
By: Uriel Rivas
Tags: C Plus Plus Language, GraphQL

This is a brief summary of everything I learned during the 12th week at Encora.

Open Source

Photo by Walling on Unsplash

I kept searching for issues I could contribute to! It’s so interesting to explore Open Source projects, understanding their purpose and getting to know how they work. Since this phase started, two of these OS projects caught my attention: react-bootstrap and Catch2.

react-bootstrap is a React library which contains Bootstrap components built with React.

Catch2 is a C++ framework for UnitTest, TDD and BDD.

Two weeks ago I opened a PR in Catch2 and along with the guidance of his maintainer, Martin, I have been working on that! Now, Martin suggested that he could continue working with the remaining docs and tests needed, which I gratefully accepted!

I also just made another PR in react-boostrap! I’m waiting now for a review :)

Pair Programming Sessions

Photo by Florian Olivo on Unsplash

I learned about GraphQL and Prisma! Carlos, my mentor, drove me through an example code that uses these two technologies. It was really exciting watching him work with it and understanding the principles of both GraphQL and Prisma!

GraphQL has only one endpoint, so you request just the info that you need. Prisma provides default functions for GraphQL.

I also learned a new Mexican word this week! I had no idea that they say reborujado in Chihuahua, where my mentor Leo is from, and I had no idea what this word means. Apparently, reborujado means something like confusing, mixed up and/or scrambled. Yes, all that in just one word. I love learning about new ways people use his language.

Chatting with Dayra and Luis

Photo by Joshua Ness on Unsplash

This week I had a feedback session with the Academy Staff (Dayra and Luis), it was really nice talking with them! Feeling how they care about me and opening perspectives is what motivates me to keep improving and demonstrate, not only to them but to me as well, that I embrace change and I’m willing to improve.

Nearsoft/Encora has taught me a lot in the time I have been here, and words are not enough to express how grateful I am for that.
GraphQL January
Tags: Hasura, GraphQL, Announcements

As 2020 draws to a close, everyone at Hasura finds themselves preparing for 2021. For some, last minute holiday plans, for others budgets and hiring, for all of us…a series of lengthy conversations about you, our users (or those yet to become).

We believe, strongly, that GraphQL will continue to become a key skill for developers (of all types) to learn, understand, and explore over the next year.

With that in mind, we are pleased to announce:

GraphQL January with Hasura — #GraphQLJanuary

Beginning 11 January 2021, the team at Hasura will be providing you with a wide variety of content, tutorials, streams, and more with which you can expand your GraphQL familiarity and start your adoption journey. This will include:

Daily blogs

Daily blog posts on the general theme of learning GraphQL. We know that we are all at different stages in our journey of understanding. Posts will range from a discussion of recorded talks, treatise on the future of GraphQL, beginner content, intermediate deep-dives, and more.

Live-streams

Once weekly we will host language specific livestreams on our Twitch channel. We will build a full stack app with a variety of frameworks and keep your ears open for some special guests joining us.

Tutorial Videos

We all learn differently. Once a week we will take one of the front-end GraphQL tutorials hosted on our learning portal and walk you through it in 30 minutes. These will be, initially, delivered by email but later hosted for future reference on the learning portal and YouTube.

Live Q&A

Come join the team from Hasura in a once a week live (text) chat in our community Discord. Bring your questions…we will bring engineers and answers. The schedule will be shared via email to all registrants and, as the dates draw closer, promoted on our social media.

Office Hours

Are you familiar with our Hasura Office Hours? If you have questions about how Hasura applies to the GraphQL journey in your company register for this weekly, live (but still informal) Zoom chat with members of the Hasura team.

Are you interested?

Do you want to know what content is coming…and when? Register here for us to keep you up to date.

Of course, it wouldn’t be a Hasura event without an eye towards interestingly designed swag. More to come on this as the month progresses. But, trust me, you will want to be signed up.
Helidon 2.2.0 Released
By: Peter Nagy
Tags: Micronaut, GraphQL, Microprofile, Microservices, Helidon

What’s New in 2.2.0

MicroProfile GraphQL Support

Over the last few years developers and enterprises have adopted GraphQL at an astonishing rate. If you haven’t tried GraphQL yet, here are some reasons why you should:

GraphQL lets the client specify exactly what data it needs. Instead of many rigid endpoints, a GraphQL API has only one smart endpoint that can take complex queries. Use of GraphQL makes it easier to aggregate data from multiple sources. Helidon has implemented MicroProfile GraphQL 1.0.3 to ensure a future-proof, portable code-first set of APIs to develop more efficient client-server communication. GraphQL has nothing to do with graph databases.

Read more and follow our tutorial to write your first GraphQL-based application!

Micronaut Integration

If you’ve been considering Micronaut Data (or Spring Data), but you want to continue using MicroProfile, then we have good news. Helidon now integrates with Micronaut Data to provide a data repository experience in the MicroProfile environment. Check out the Micronaut Data documentation and our tutorial to try it for yourself. You’ll be able to configure Micronaut features through Helidon or MicroProfile configuration and use any Micronaut Singleton beans (as CDI beans) and Micronaut interceptors. Finally, you’ll compile the application using GraalVM Native Image to take full advantage of this integration.

Virtual Threads Support — OpenJDK Project Loom

Support for Virtual Threads through Project Loom is coming soon. Team Helidon has already started to work on the integration and Helidon 2.2.0 provides experimental features to test your applications using Virtual Threads. If you haven’t done so already, check out Project Loom and the benefits that it can provide. Blocking I/O? No problem. Forget reactive programming and return to those simpler, joyful times of synchronous programming.
Why do I believe in the future of The Graph!
Tags: The Graph, The Graph Network, GraphQL, The Graph Protocol

Graph is the first networked ledger that aims to collect data from all existing blockchain projects. This noble goal is, in principle, a logical further development of the sector for working with on-chain data sources. As such, Graph offers data producers and data users the first decentralized marketplace on the web for indexed data.

The project, which was originally based on Ethereum, has a much stronger decentralized approach than what traditional data sources currently offer, as they mostly come from central sources, so-called repositories.

With The Graph, developers generate on-chain data through an interface using so-called subgraphs. In this way, complex data and datasets are indexed and ordered. Notable projects such as Uniswap, Sythentix, Decentraland and Aragon are already using the services and other projects are in development.

The infrastructure is growing, new projects do not even need to create their own subgraphs — because if the existing ones are suitable for their goals, then it will not be difficult to connect and use the high-speed and flexible services of The Graph protocol.

A special Thank You I would like to say to the community managers, protocol developers and company executives for their foresight in providing training programs for the community. Now I can say with pride and gratitude that I have acquired the skills that allow me to create subgraphs and I have a great desire to continue developing in this direction.

I believe that Web3 is the future. As the latest global incident, the corona virus pandemic, has shown us, our lives will quickly disappear from real existence online. Accordingly, the world needs efficient services and protocols that will allow applications to interact with servers so that the end user does not see the difficulty in using decentralized services.

In the process of working as a curator, I was imbued with the ideas of the company and I consider it my mission to continue to contribute to the development of society by working together with the project team The Graph!
Сравнение The Graph vs REST
Tags: The Graph, GraphQL, The Graph Protocol

I have good experience in deploying blockchain networks. I hope my articles will be useful to you.
Mock GraphQL web app
By: Ondřej Spilka
Tags: Mock, Nodejs, GraphQL, Web Applications

Documenting RESP APIs is quite easy with Swagger, but what about GraphQL interfaces?

Simple mocking server with ability to upload GraphQL files is published in the repository https://github.com/ABB-RARO/VisualQL

As we in ABB recognise value of open source software ad community, this is our team small (but I hope useful and efficient) contribution.

How easy it is?

Well, with NodeJS ApolloServer and Express library it is very easy. Full code can be reviewed in the repository, let me pinpoint some snippets with comments.

Development details one can find in the Apollo docs https://www.apollographql.com/docs/apollo-server/testing/mocking/, this is in fact recommended reading.

Let’s start with what we need:

Those are our essential imports. Core things is importSchema, GraphQLSchema, ApolloServer and makeExecutableSchema.

Straight away we define function to read schema dynamically form file:

Here SPEC_DIR is our global variable keeping folder where graphql files are stored.

Next in a row of important code pieces is how to read the schema and create middleware, which servers graphiql user interface:

Here mocks is object keeping mocking values, one can also use mock list.

Last thing we need to do is:

a) server the middlewares for GraphQL files

b) serve the application as coherent web server

Our objective a) looks like this:

Objective b) is classic express server:

Easy huh? The last thing is how we change this dynamically. In the project I used simple upload function, which accepts just PIN to provide “authentication”, stores the file and restarts the middleware:

Why setTimeout — well this is stupid, but somehow effective DDoS prevention :) As long as we do not have proper authentication, let’s have at least this.

For upload persistence we use multer, but this is really not that important.

Conclusion

I hope this will help to build, document and spread GraphQL interfaces as IMHO GraphQL is really future way of creating the portable, extensible and flexible service interfaces.