Let $\alpha \in (0,1)$. Find a Borel subset $E$ of $[-1,1]$ s.t. $$\lim_{r\to 0^{+}} \frac{m(E\cap [-r,r])}{2r}=\alpha.$$
In fact, for a similar result in $\mathbb{R}^d$ also holds: $$D_{E}(x)=\lim_{r\to 0} \frac{m(E\cap B(r,x))}{m(B(r,x))}$$ we just consider the unit circle and $E$ is a sector with angle $2\pi \theta$ where $\theta\in(0,1)$, then $$D_{E}(x)=\frac{2\pi \theta }{2\pi}=\theta$$
But how about the $\mathbb{R}$?
There is a standard construction that helps elicit all kinds of possible values for limits of the form $$ \lim_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r} \tag{1}\label{1} $$
Choose a strictly decreasing sequence $a_n\xrightarrow{n\rightarrow\infty}0$ with $0<a_n\leq 1$. and define $E$ as a symmetric set around $0$ such that $$ E\cap(0,\infty)=\bigcup_{n=0}[a_{2n+1},a_{2n}]$$
The sequence $a_n=\theta^n$, where $0<\theta<1$, provides an example where along $r=(1-\alpha)\theta^{2n} + \alpha\theta^{2n-1}$, where $0\leq \alpha\leq 1$, $$\frac{\theta}{1+\theta}\frac{1}{(1-\alpha)+\alpha\theta}=\lim_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r}$$ This shows that any value between $\theta/(1+\theta)$ and $1/(1+\theta)$ is a possible (sub)limit value of \eqref{1}.
The sequence $a_{2n}=\frac{n+\alpha}{n(n+1)}$, $a_{2n+1}=\frac{1}{n+1}$, where $0<\alpha<1$ gives $$\alpha=\lim_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r}$$
You can try to use technique to find other interesting examples.